Boron - 3rd party SIM & Local IDE - How to flash firmware?

Problems:

  • Can’t find Boron as an option to flash to in the Windows x64 Local IDE
  • Can’t connect via the standard setup using the Boron embedded SIM in Australia even though we have a CatM1 network (to get the device showing up in the WebIDE).
  • Can’t find a way to get a firmware binary at 0.8.0-rc.25

Would greatly appreciate any suggestions on how to do a USB flash of Firmware onto the Boron device :slight_smile:

Screenshots from within the Local IDE (Windows x64 and Mac versions)

imageimage

Screenshot from Web IDE, can’t add a new device unless it is ‘online’.
Can’t make the Device go online until I have flashed the 3rd party SIM APN and instruction to use the External SIM.

Also went down the path of trying to create a Product to try generate a binary. No luck there either.

image

And tried the CLI approach, no luck with finding the Mesh products there either

I still don’t think the mesh firmware is fully released.

1 Like

This is inaccurate information. Firmware is available here: GitHub - particle-iot/device-os at mesh-develop

Try particle compile boron xxx.ino

You will need to use this function once: https://docs.particle.io/reference/device-os/firmware/boron/#setactivesim-

1 Like

I’m aware of that. It still won’t compile for me.

A few things I’ve found.

  1. I can’t connect via DFU (yellow light) mode. It isn’t recognised via USB (have tried using a Windows 10 x64. I tried to install drivers and the setup utility says not required for W10.

  2. I can connect to the Serial connection, to flash via --serial (unsure if there is a difference?).

  3. The flashing doesn’t seem to work. Device will still not reconnect and I can’t get it to Serial print the available bands.

Code I’m using:

void setup() {
    SYSTEM_THREAD(ENABLED);
	SYSTEM_MODE(AUTOMATIC);
	Cellular.setCredentials("telstra.internet");
    Cellular.setActiveSim(EXTERNAL_SIM);
    Particle.keepAlive(30); 
	Serial.begin();
}

void loop() {
	SimType simType = Cellular.getActiveSim();
    Serial.printlnf("simType=%d", simType);
    
	
	CellularBand band_avail;
	if (Cellular.getBandSelect(band_avail)) {
    Serial.print("Available bands: ");
    for (int x=0; x<band_avail.count; x++) {
        Serial.printf("%d", band_avail.band[x]);
        if (x+1 < band_avail.count) Serial.printf(",");
    }
    Serial.println();
	}
	else {
    Serial.printlnf("Bands available not retrieved from the modem!");
	}
	delay(2000);
}

Rookie mistake on my part - thanks to @rickkas7 for pointing this one out. I should have had System_Thread and System_Mode outside of the setup block.

The below code works for Telstra M2M One users (https://www.m2mone.com.au)
I don’t know if other Telstra resellers have CatM1 available - but if anyone does find out… pleaes let me know.

SYSTEM_THREAD(ENABLED);
SYSTEM_MODE(AUTOMATIC);

void setup() {
    
	Cellular.setCredentials("telstra.internet");
    Cellular.setActiveSim(EXTERNAL_SIM);
    Particle.keepAlive(30); 
	Serial.begin(4800);
}

void loop() {
	SimType simType = Cellular.getActiveSim();
    Serial.printlnf("simType=%d", simType);
    
	
	CellularBand band_avail;
	if (Cellular.getBandSelect(band_avail)) {
    Serial.print("Available bands: ");
    for (int x=0; x<band_avail.count; x++) {
        Serial.printf("%d", band_avail.band[x]);
        if (x+1 < band_avail.count) Serial.printf(",");
    }
    Serial.println();
	}
	else {
    Serial.printlnf("Bands available not retrieved from the modem!");
	}
	
	CellularBand band_sel;
	if (Cellular.getBandSelect(band_sel)) {
    Serial.print("Selected bands: ");
    for (int x=0; x<band_sel.count; x++) {
        Serial.printf("%d", band_sel.band[x]);
        if (x+1 < band_sel.count) Serial.printf(",");
    }
    Serial.println();
}
else {
    Serial.printlnf("Bands selected not retrieved from the modem!");
}
	
	delay(2000);
	
}
1 Like

Final Solution to flash a Boron with 3rd Party SIM.

Part 1: Get the Device unique ID

  1. Connect the device via USB to your computer.
  2. When the device is flashing Green, hold down the Mode button for a good 5 seconds till it goes to Flashing Blue (serial mode)
  3. Using the Particle CLI run the command: “particle identify” to get the device ID

Part 2: Flash the new firmware
Note: The new firmware will tell the device to both:
A. Use the external SIM card slot
B. Use a different APN

  1. Create an empty text file on your desktop: firmware.ino
  2. Use the firmware code below (remember to change out your APN for your providers one)
SYSTEM_THREAD(ENABLED);
SYSTEM_MODE(AUTOMATIC);

void setup() {
    
    Cellular.setCredentials("YOUR PROVIDERS APN HERE");
     //For Telstra it is Cellular.setCredentials("telstra.internet");
    Cellular.setActiveSim(EXTERNAL_SIM);
    Particle.keepAlive(30); //Keep alive may not be necessary - depends on your providers session time outs - 30 seconds seems to work well, but it does use up some data.
}

void loop() {
//Your normal code here
}
  1. Using the Particle CLI, run the command:
    particle compile boron C:\Users\<MyUserNameHere>\Desktop\firmware.ino --saveTo firmware.bin
  2. Get the device into the blue flashing serial state again (hold down the Mode button for 5 seconds)
  3. Run the command:
    particle flash --serial C:\Users\<MyUserNameHere>\Desktop\firmware.bin
    (Note the .bin and .ino file name difference between the commands)

The device will restart and should then connect

2 Likes

Drivers are not required for serial connection only. For DFU Mode you still need drivers.
The easiest way IMO is using zadig and installing the libusbK drivers.
After that you should see the device as libusbK device in DevMgr and be able to use particle flash --usb again.

I'd also put the APN settings into a STARTUP() macro, in order to have the APN set ASAP.
With SYSTEM_THREAD(ENABLED) there won't be much difference, but if you make it a habit, the selected mode will be irrelevant, it'll always work.

1 Like

On the Boron it’s no longer necessary to put the APN setting in STARTUP because it’s stored in configuration flash. You only need to set it once and not have to worry about it again. It works properly in safe mode as well.

You still need to set the APN in STARTUP on the Electron and E series.

3 Likes

Good to know :+1: - I must have missed the memo :wink:

I guess this also applies to the selected SIM (internal vs. external) and keepAlive?

The APN (name, username, password) and antenna selection is stored in configuration flash. The keep-alive is not. I’m not sure why.

1 Like

I guess it should be :wink:
It maybe even should be an additional parameter for Cellular.setCredentials() as it is directly tied to the provider.

3 Likes

Agree!

Thanks, zadig worked to get flashing via --usb vs .–serial

Was a little tricky but got it working :slight_smile:

1 Like

After switching my Boron to third party SIM, I’m not able to switch back to the internal one. Setting Cellular.setActiveSim(INTERNAL_SIM) causes it to stop working with the third-party SIM, but it also does not connect with the internal one. My diagnosisi is that I need to set the APN for the internal SIM when I switch back, but I don’t know what that is. Can anyone tell me the factory APN for the Boron LTE?

Looking at the docs before posting is no bad idea
https://docs.particle.io/reference/device-os/firmware/boron/#setcredentials-

1 Like

Thanks for the pointer. I did try to search the docs, but it’s not always easy for new user to know what to look for. (I was looking for things like “Boron factory APN” which, of course, did not lead me here.

1 Like