B402 Stuck after Firmware Upgrade

My B402 Eval kit is currently stuck in listen mode after a firmware update and I can’t seem to figure out what the issue is.

I downloaded latest from https://github.com/particle-iot/device-os/releases/tag/v1.5.0-rc.2 and flashed as per the following:

particle flash --usb .\bsom-system-part1@1.5.0-rc.2.bin
particle flash --usb .\bsom-tinker@1.5.0-rc.2.bin
particle flash --usb .\bsom-softdevice@1.5.0-rc.2.bin

I believe I flashed bootloader via serial as it was noted that DFU did not support bootloader at this point.

Particle serial inspect returns:

Platform: 23 - B SoM
Modules
  Bootloader module #0 - version 501, main location, 49152 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
  System module #1 - version 1501, main location, 671744 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      Bootloader module #0 - version 501
      Radio stack module #0 - version 202
  User module #1 - version 6, main location, 131072 bytes max size
    UUID: FB4B9E74A9805AFC801DE489EF198FD62E1D85668D61DC235FE63ED618991B10
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #1 - version 1501
  Radio stack module #0 - version 202, main location, 192512 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS

I can hold MODE for 3+ seconds in order to get to flashing green, but it will not connect via Ethernet despite including STARTUP(System.enableFeature(FEATURE_ETHERNET_DETECTION))

I attempted to flash as per this post: Unable to Leave Listening Mode on BoronLTE but didn’t seem to make any difference.

Thanks in advance.

Regards,
Alex

EDIT: For what it’s worth, it would be great to have a step-by-step for the Boron and other mesh-series as I found most of the instructions are for the second-generation devices

Hi Alex,

You did not flash everything required.
Please download the following:
https://github.com/particle-iot/device-os/releases/download/v1.5.0-rc.2/b5som-bootloader@1.5.0-rc.2.bin
https://github.com/particle-iot/device-os/releases/download/v1.5.0-rc.2/b5som-softdevice@1.5.0-rc.2.bin
https://github.com/particle-iot/device-os/releases/download/v1.5.0-rc.2/b5som-system-part1@1.5.0-rc.2.bin
https://github.com/particle-iot/device-os/releases/download/v1.5.0-rc.2/b5som-tinker@1.5.0-rc.2.bin

Connect the BSom via USB and run

particle usb listen
particle usb dfu
particle flash --usb b5som-bootloader@1.5.0-rc.2.bin
particle flash --usb b5som-softdevice@1.5.0-rc.2.bin
particle flash --usb b5som-system-part1@1.5.0-rc.2.bin
particle flash --usb b5som-tinker@1.5.0-rc.2.bin

This is the correct order and everything you need.

Hi no1089. I believe I have a bsom, not a b5som so I’ve used the bsom files as per the following:

PS \firmware_150rc2> particle usb dfu
PS \firmware_150rc2> particle flash --usb .\bsom-bootloader@1.5.0-rc.2.bin
Error writing firmware: unknown module function 2, use --force to override
PS \firmware_150rc2> particle flash --usb .\bsom-bootloader@1.5.0-rc.2.bin --force
Flash success!
PS \firmware_150rc2> particle flash --usb .\bsom-softdevice@1.5.0-rc.2.bin
Flash success!
PS \firmware_150rc2> particle flash --usb .\bsom-system-part1@1.5.0-rc.2.bin
Flash success!
PS \firmware_150rc2> particle flash --usb .\bsom-tinker@1.5.0-rc.2.bin
Flash success!

PS \firmware_150rc2> particle serial inspect
Platform: 23 - B SoM
Modules
  Bootloader module #0 - version 501, main location, 49152 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
  System module #1 - version 1501, main location, 671744 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      Bootloader module #0 - version 501
      Radio stack module #0 - version 202
  User module #1 - version 6, main location, 131072 bytes max size
    UUID: FB4B9E74A9805AFC801DE489EF198FD62E1D85668D61DC235FE63ED618991B10
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #1 - version 1501
  Radio stack module #0 - version 202, main location, 192512 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS

I then flashed the following firmware which was compiled in Cloud IDE (Target 1.5.0-r.c2) to leave auto-listen, which left me back in listen after a reboot.

#include "Particle.h"
#include "dct.h"
SYSTEM_MODE(AUTOMATIC); // <-- Note use of AUTOMATIC mode!

void setup() {
    // This clears the setup done flag on brand new devices so it won't stay in listening mode
    const uint8_t val = 0x01;
    dct_write_app_data(&val, DCT_SETUP_DONE_OFFSET, 1);
}

void loop() {
}

I then flashed my basic config (as follows) but it hit a red SOS sequence (single blink between SOS).

#include "Particle.h"

STARTUP(System.enableFeature(FEATURE_ETHERNET_DETECTION));

void setup() {
    Serial.begin();
    Serial.println("Hello World!");
}

void loop() {
    Serial.println(".");
    delay(1000);
}

I then retried the whole sequence but used serial for the bootloader flash:

PS \firmware_150rc2> particle flash --serial .\bsom-bootloader@1.5.0-rc.2.bin                           ! PROTIP: Hold the SETUP button on your device until it blinks blue!
? Press ENTER when your device is blinking BLUE
sending file: .\bsom-bootloader@1.5.0-rc.2.bin
PS \firmware_150rc2> particle usb dfu                                                                   Done.
PS \firmware_150rc2> particle flash --usb .\bsom-softdevice@1.5.0-rc.2.bin                              
Flash success!
PS \firmware_150rc2> particle flash --usb .\bsom-system-part1@1.5.0-rc.2.bin                            
Flash success!
PS \firmware_150rc2> particle flash --usb .\bsom-tinker@1.5.0-rc.2.bin                                  
Flash success!
PS \firmware_150rc2> particle serial inspect                                                            Platform: 23 - B SoM
Modules
  Bootloader module #0 - version 501, main location, 49152 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
  System module #1 - version 1501, main location, 671744 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      Bootloader module #0 - version 501
      Radio stack module #0 - version 202
  User module #1 - version 6, main location, 131072 bytes max size
    UUID: FB4B9E74A9805AFC801DE489EF198FD62E1D85668D61DC235FE63ED618991B10
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #1 - version 1501
  Radio stack module #0 - version 202, main location, 192512 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS

Apparently no difference… and same outcome when flashing config.

Not sure, why you use AUTOMATIC mode when trying to set the “setup-done” flag.
If the flag is not set, the device will automatically check that flag and fall into listening mode preventing your setup code from running and hence keeping the flag unset.

Hey thanks for that ScruffR, I had accidentally copied out the wrong script from that thread. Okay so using the corrected sketch (below) allowed me to get serial transmitting.

#include "Particle.h"
#include "dct.h"

SYSTEM_MODE(SEMI_AUTOMATIC);

void setup() {
    // This clears the setup done flag on brand new devices so it won't stay in listening mode
    const uint8_t val = 0x01;
    dct_write_app_data(&val, DCT_SETUP_DONE_OFFSET, 1);

    // This is just so you know the operation is complete
    Serial.begin();
}

void loop() {
    Serial.println(".");
    delay(1000);
}

Every time I flash the following however, I get a red SOS.

#include "Particle.h"

STARTUP(System.enableFeature(FEATURE_ETHERNET_DETECTION));

void setup() {
    Serial.begin();
}

void loop() {
    Serial.println(".");
    delay(1000);
}

EDIT: Attempting to use the Particle App to setup the ethernet results in an SOS also. Perhaps an issue with this firmware and Ethernet?

I have no experience with the B-SoM dev boards, so I wouldn’t know whether the System.enableFeature() is supposed to work that way.
You could try non-AUTOMATIC mode and have your code connect gradually to see whether the SOS+1 occures only on connection attempt (and where exactly) or already when enabling the feature.

Try to provide as much background info about the issue as possible.

Also check whether your wired network actually accepts the new device and if the required ports are open

I should point out that I was trying an OS upgrade following advice is on this thread: B402 Eval Kit Via Ethernet: Losing Cloud Connection (but remains breathing cyan)

Prior to the firmware upgrade Ethernet was working, just dropping out. (Which has since been explained in the above thread)

I’ll test with non automatic mode tomorrow.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.