Unable to set up Boron LTE


#21

carin, just curious, does your win10 recognize your android handset thru bluetooth? is your phone listed on the bluetooth page?


#22

Thanks for the help! I’ll try flashing the hybrid and tinker bin files when I get home from work tonight and I’ll report back.

@dkryder Yes, my Windows 10 computer recognizes and pairs with my android phone over Bluetooth.


#23

I reloaded the firmware on the Xenon using dfu mode. Loaded the hybrid-0.8.0-rc.25-xenon.bin, then the tinker-0.8.0-rc.25-xenon.bin. Both were successful. Then tried pairing with my phone again (after holding mode button for 10 seconds until it was rapidly flashing blue), but it still won’t pair. Tried several times (power-cycled phone and Xenon), but no luck.

Interestingly, the Xenon does show up as a COM port on my Windows 10 machine after flashing the hybrid and tinker firmware, so now it responds to particle cli commands.

Haven’t tried flashing the Boron yet (I’d rather try the risky stuff with the cheaper Xenon first).


#24

I’ve now updated both the Boron and Xenon with the 0.8.0-rc.25 hybrid and tinker firmwares. I’m still unable to pair either device in the app. Is there anything else I can do at this point?


#25

Have you set up the Boron? You need to set up the gateway Boron first - you can’t set up an isolated Xenon at this time.


#26

I can’t set up the Boron. It won’t pair in the app even after updating the firmware.


#27

@cairn did you have particle cli installed?

If you do, can you run particle serial inspect in listening mode and paste the results here?


#28

Sure thing! Here’s the Boron:

Platform: 13
Modules
  Bootloader module #0 - version 214, main location, 49152 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
  System module #1 - version 324, main location, 671744 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      Bootloader module #0 - version 101
      undefined module #0 - version 0
  User module #1 - version 5, main location, 131072 bytes max size
    UUID: E6E3E437EC1162F1434A742BB0F388D0B6884E97EFE08AF01BA49FB9224977AD
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #1 - version 324
      undefined module #0 - version 0
  empty - factory location, 131072 bytes max size

and the Xenon:

Platform: 14
Modules
  Bootloader module #0 - version 214, main location, 49152 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
  System module #1 - version 324, main location, 671744 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      Bootloader module #0 - version 101
      undefined module #0 - version 0
  User module #1 - version 5, main location, 131072 bytes max size
    UUID: B9736B3CF53FCD1F56F0B3EF6C69108E238DFAA4A96FE0920860EE192BD4165D
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #1 - version 324
      undefined module #0 - version 0
  empty - factory location, 131072 bytes max size

#29

Cool… Definitely looks good.

Something with the Bluetooth on the phone is not working properly.

Let me do some testing and get back to you.


#30

Sounds good, thanks! In case it’s at all helpful, I’m using a Google Nexus 6 running android 7.1.1 and the Particle app version is 2.3.4.


[Updated 12/17] Particle Mesh Known Issues and Fixes
#31

Flash this binary in DFU mode using particle flash --usb boron-tinker-serial-debugging.bin
–> https://drive.google.com/file/d/1ycJi1ajS-1nKCaii4qNyctfp4Sb7mkAN/view?usp=sharing

In case you want to check the binary integrity:

$ shasum -a 256 …/build/target/main/platform-13/tinker-serial-debugging.bin
1dce743846e615e1969d7cd026491909c8f7863315e98b2ed045ff833cf4393f …/build/target/main/platform-13/tinker-serial-debugging.bin


You can:

  1. connect to the Boron serial port via Putty/CoolTerm/any serial software you prefer
  2. attempt to pair your Boron with the :particle: :iphone: app
  3. capture the logs and share it here

Example when i paired with the mobile app:


How i compile this debugging app (if you don’t trust the shared binary)

$ git clone https://github.com/particle-iot/firmware
$ cd firmware
$ git submodule update --init
$ #create a tinker-serial-debugging folder in users/application/
$ cd main
$ make clean all -s PLATFORM=boron MODULAR=n COMPILE_LTO=n DEBUG_BUILD=y APP=tinker-serial-debugging

tinker serial debugging code used:

/*
 ******************************************************************************
  Copyright (c) 2015 Particle Industries, Inc.  All rights reserved.

  This program is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation, either
  version 3 of the License, or (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public
  License along with this program; if not, see <http://www.gnu.org/licenses/>.
  ******************************************************************************
 */

/* Includes ------------------------------------------------------------------*/
#include "application.h"
#include "stdarg.h"

PRODUCT_ID(PLATFORM_ID);
PRODUCT_VERSION(3);

/* Function prototypes -------------------------------------------------------*/
int tinkerDigitalRead(String pin);
int tinkerDigitalWrite(String command);
int tinkerAnalogRead(String pin);
int tinkerAnalogWrite(String command);

// FIXME: Causes uart_init to assertion fault (SOS 10) when ext flash has been erased
// STARTUP(System.enable(SYSTEM_FLAG_WIFITESTER_OVER_SERIAL1));
// STARTUP(System.enableFeature(FEATURE_WIFITESTER));

SerialLogHandler logHandler(115200, LOG_LEVEL_ALL);

SYSTEM_MODE(AUTOMATIC);

/* This function is called once at start up ----------------------------------*/
void setup()
{
    //Setup the Tinker application here

    //Register all the Tinker functions
    Particle.function("digitalread", tinkerDigitalRead);
    Particle.function("digitalwrite", tinkerDigitalWrite);

    Particle.function("analogread", tinkerAnalogRead);
    Particle.function("analogwrite", tinkerAnalogWrite);
}

/* This function loops forever --------------------------------------------*/
void loop()
{
    //This will run in a loop
}

/*******************************************************************************
 * Function Name  : tinkerDigitalRead
 * Description    : Reads the digital value of a given pin
 * Input          : Pin
 * Output         : None.
 * Return         : Value of the pin (0 or 1) in INT type
                    Returns a negative number on failure
 *******************************************************************************/
int tinkerDigitalRead(String pin)
{
    //convert ascii to integer
    int pinNumber = pin.charAt(1) - '0';
    //Sanity check to see if the pin numbers are within limits
    if (pinNumber < 0 || pinNumber > 7) return -1;

    if(pin.startsWith("D"))
    {
        pinMode(pinNumber, INPUT_PULLDOWN);
        return digitalRead(pinNumber);
    }
    else if (pin.startsWith("A"))
    {
        pinMode(pinNumber+10, INPUT_PULLDOWN);
        return digitalRead(pinNumber+10);
    }
#if Wiring_Cellular
    else if (pin.startsWith("B"))
    {
        if (pinNumber > 5) return -3;
        pinMode(pinNumber+24, INPUT_PULLDOWN);
        return digitalRead(pinNumber+24);
    }
    else if (pin.startsWith("C"))
    {
        if (pinNumber > 5) return -4;
        pinMode(pinNumber+30, INPUT_PULLDOWN);
        return digitalRead(pinNumber+30);
    }
#endif
    return -2;
}

/*******************************************************************************
 * Function Name  : tinkerDigitalWrite
 * Description    : Sets the specified pin HIGH or LOW
 * Input          : Pin and value
 * Output         : None.
 * Return         : 1 on success and a negative number on failure
 *******************************************************************************/
int tinkerDigitalWrite(String command)
{
    bool value = 0;
    //convert ascii to integer
    int pinNumber = command.charAt(1) - '0';
    //Sanity check to see if the pin numbers are within limits
    if (pinNumber < 0 || pinNumber > 7) return -1;

    if(command.substring(3,7) == "HIGH") value = 1;
    else if(command.substring(3,6) == "LOW") value = 0;
    else return -2;

    if(command.startsWith("D"))
    {
        pinMode(pinNumber, OUTPUT);
        digitalWrite(pinNumber, value);
        return 1;
    }
    else if(command.startsWith("A"))
    {
        pinMode(pinNumber+10, OUTPUT);
        digitalWrite(pinNumber+10, value);
        return 1;
    }
#if Wiring_Cellular
    else if(command.startsWith("B"))
    {
        if (pinNumber > 5) return -4;
        pinMode(pinNumber+24, OUTPUT);
        digitalWrite(pinNumber+24, value);
        return 1;
    }
    else if(command.startsWith("C"))
    {
        if (pinNumber > 5) return -5;
        pinMode(pinNumber+30, OUTPUT);
        digitalWrite(pinNumber+30, value);
        return 1;
    }
#endif
    else return -3;
}

/*******************************************************************************
 * Function Name  : tinkerAnalogRead
 * Description    : Reads the analog value of a pin
 * Input          : Pin
 * Output         : None.
 * Return         : Returns the analog value in INT type (0 to 4095)
                    Returns a negative number on failure
 *******************************************************************************/
int tinkerAnalogRead(String pin)
{
    //convert ascii to integer
    int pinNumber = pin.charAt(1) - '0';
    //Sanity check to see if the pin numbers are within limits
    if (pinNumber < 0 || pinNumber > 7) return -1;

    if(pin.startsWith("D"))
    {
        return -3;
    }
    else if (pin.startsWith("A"))
    {
        return analogRead(pinNumber+10);
    }
#if Wiring_Cellular
    else if (pin.startsWith("B"))
    {
        if (pinNumber < 2 || pinNumber > 5) return -3;
        return analogRead(pinNumber+24);
    }
#endif
    return -2;
}

/*******************************************************************************
 * Function Name  : tinkerAnalogWrite
 * Description    : Writes an analog value (PWM) to the specified pin
 * Input          : Pin and Value (0 to 255)
 * Output         : None.
 * Return         : 1 on success and a negative number on failure
 *******************************************************************************/
int tinkerAnalogWrite(String command)
{
    String value = command.substring(3);

    if(command.substring(0,2) == "TX")
    {
        pinMode(TX, OUTPUT);
        analogWrite(TX, value.toInt());
        return 1;
    }
    else if(command.substring(0,2) == "RX")
    {
        pinMode(RX, OUTPUT);
        analogWrite(RX, value.toInt());
        return 1;
    }

    //convert ascii to integer
    int pinNumber = command.charAt(1) - '0';
    //Sanity check to see if the pin numbers are within limits

    if (pinNumber < 0 || pinNumber > 7) return -1;

    if(command.startsWith("D"))
    {
        pinMode(pinNumber, OUTPUT);
        analogWrite(pinNumber, value.toInt());
        return 1;
    }
    else if(command.startsWith("A"))
    {
        pinMode(pinNumber+10, OUTPUT);
        analogWrite(pinNumber+10, value.toInt());
        return 1;
    }
    else if(command.substring(0,2) == "TX")
    {
        pinMode(TX, OUTPUT);
        analogWrite(TX, value.toInt());
        return 1;
    }
    else if(command.substring(0,2) == "RX")
    {
        pinMode(RX, OUTPUT);
        analogWrite(RX, value.toInt());
        return 1;
    }
#if Wiring_Cellular
    else if (command.startsWith("B"))
    {
        if (pinNumber > 3) return -3;
        pinMode(pinNumber+24, OUTPUT);
        analogWrite(pinNumber+24, value.toInt());
        return 1;
    }
    else if (command.startsWith("C"))
    {
        if (pinNumber < 4 || pinNumber > 5) return -4;
        pinMode(pinNumber+30, OUTPUT);
        analogWrite(pinNumber+30, value.toInt());
        return 1;
    }
#endif
    else return -2;
}

#32

boron_ble

There you go, thanks again for the help!


#33

Cool. I see the error getting logged.

Have passed on the screenshot and waiting for more updates from the :particle: team.

Stay tuned :sunglasses:


#34

But if you have another mobile phone/device… It’s worth a try too! Might get you up and running right away (if the ble works well)


#35

Huge thanks to @kennethlimcp for helping to troubleshoot this one. From the screenshot you shared it seems like there’s something wrong with the BLE handshake process.

We’ll have to get one of our mobile developers to take a look at this. @jensck is likely the right person to weigh in next week.

Thanks for your patience – we’ll help get the issue resolved as quickly as we can :+1:


#36

Thanks for the detailed report + debug logs, @cairn – much appreciated!

It looks like the handshake process is timing out, which narrows things down a bit. I’ve filed a bug and will look into it!


#37

Any followup on this? I’m getting the exact same problem with both of my boron lte’s. Using android phone as well. Samsung S6.


#38

We are aware of it, but I don’t know if anything is out just yet. With last week being Thanksgiving, there has been some delays with some of our team travelling.

It’s most certainly on our radar though and I’m hoping to see some developments this upcoming week.


#39

Particle’s Android dev here with a status update:

I have a Nexus 6 in hand now, and I can reliably reproduce this bug, which will help me gather more information on the problem. Thanks much to everyone who’s reported this.


Argon/Xenon - Particle App 2.3.{6,7} Android - Spins during pairing
#40

Thanks!
Is there a bug ID/issue we can track on this, or is it internal only?