Setup 20 BSOM's in a product without USB og reset/mode buttons

Here some findings that may help others for a Gen3 BSOM cellular product with a product set up in Console.

DFU mode (buttons/USB) is NOT needed at all - docs mentioned above, at the time of reading, are directly misleading and unfortunately wasted a lot of time in this case (also for support).

BUT, you must add you own SWD pads/connector on a PCB to flash in place as BSOM module SWD pads are on the >backside< of the module!

Alternatively flash module in the bsom breakout. The connector is not suited for large volume, but your own would be no different, so keep a stack and replace.

For a brick + app flashing config, use nRF tools + J-Link (4 secs) referenced in the link above)

For a no install setup use an updated Particle debugger + drag and drop (30 secs) or more complicated - a programmed J-Link standalone unit.

You can let you main SW check and set the "setup done flag" (reading likely only work in later OS versions):

PRODUCT_ID(01234);
PRODUCT_VERSION(117);

#include "dct.h"

void setup() {

    // Set "setup done flag" during production if not set
    // 0x01 = setup done
    // 0xff = setup not done (go into listening mode at boot)
    uint8_t setupDoneFlagCopy = 0x00;
    dct_read_app_data_copy(DCT_SETUP_DONE_OFFSET, &setupDoneFlagCopy, 1);  //int dct_read_app_data_copy(uint32_t offset, void* ptr, size_t size);
    if(setupDoneFlagCopy != 0x01){
	    const uint8_t val = 0x01;
	    dct_write_app_data(&val, DCT_SETUP_DONE_OFFSET, 1);
	    pinMode(D7, OUTPUT);
	    digitalWrite(D7, HIGH); // Solid blue on breakout signals done
	    delay(2*60*1000); // Nasty, replace with you own statemachine approach
    }
}

Steps I took:

  • Build a bin file w. your preferred tool including product ID/version
  • Convert bin to hex image (Chrome browser!): https://docs.particle.io/hex-generator/
  • Place B5 module in BSOM breakout board and power it
  • Connect an updated Particle debugger to the breakout and to Mac/PC
  • Drag and drop the hex file to the drive created by the Particle debugger
  • When the breakout board blue LED lights solid blue you are done
  • In console>product>devices>add module, enter serial (activates SIM with carriers)
  • The serial can be copied via the QR code on the module (the first of two series of chars)

In console product devices will have no owner. After plowing through all the documentation all day, I found this mention that indicates, you can claim via CLI if you want to, but for a cellular no credentials/customer/user product setup in Console, it should work without (see "for products only"):

For production test, this specific product is designed to be able to do an extensive self-test. Saves a lot of gear/scripting.

I have verified flashing and adding devices to a product in console this way, but have yet to see them running for a while.

1 Like