Strange error while adding a device with the Particle app

I have a Boron that was up and running with a 3rd party SIM. As a test I decided to do a factory reset, pull the 3rd party SIM, unclaim, and re-add the device with the Particle app (iphone). The QR code scan and initial connection worked, but the next step failed with the following error message:


There is no longer an external SIM and the APN from initial use has been reset. The internal SIM was also released so it could be reclaimed. Has anyone seen this error and gotten past it?

The ext SIM setting is sticky. You need to explicitly tell the device to start using the internal SIM again in code via Cellular.clearCredentials() and Cellular.setActiveSim(INTERNAL_SIM);

Originally I set it with this:

#include "Particle.h"
#include "dct.h"
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
	pinMode(D7, OUTPUT);
	digitalWrite(D7, HIGH);
void loop() {

Then set it back with this before attempting to reset it:

#include "Particle.h"
void setup() {
	// This is just so you know the operation is complete
	pinMode(D7, OUTPUT);
	digitalWrite(D7, HIGH);
void loop() {

One thing that might also be going on, there is no backup firmware already saved on this device, so I can’t honestly say that what the factory reset did. At this point when powering the device on the following sequence of flashes are presented:

  • OTA firmware update mode flashing (for 2 seconds)
  • dfu mode flashing (for 7 seconds)
  • fast white flashing (for 2 seconds)
  • solid white (for 1 second)
  • listening mode flashing

What else can I try at this point?

What firmware have you flashed after your reset code?
Since you are using SEMI_AUTOMATIC in that code the device won’t connect unless you either put it in Safe Mode or flash some code that would allow it to connect.
You can try particle flash --usb tinker in DFU Mode.

I may be stuck since the APN reset firmware was the last item flashed. At this point the device won’t stay in DFU mode and the host computer never detects the USB device. After 7 seconds it proceeds from DFU flashing light to the rest of the cycle - white flash, white solid, blue flash.

Going back to the original symptom, is it possible that, since this is a Boron that was added once before, there is some sticky info on the server side for this device ID? Otherwise, how did it determine that an external sim card was once in use?

That sounds weird. 3rd party SIM setup should not have that side effect.

If you can go into Listening Mode, you should also be able to flash via particel flash --serial tinker

Does your device eventually make it to breathing cyan or magenta?

Some progress!

Still stuck though in the following ways:

  • claim is not working
  • Particle ios app still hits original error related to external sim
  • Boron will not go into DFU mode

Just compiled Doctor.ino and flashed that, connected to Serial with PuTTY, could type commands. Next compiled and flashed the SIM reset program, so now that ran. It is so strange that for all the things that are working, the ios app still complains about an external sim.

Is it possible to refresh/reload the DeviceOS on the Boron?

particle update should be the command that flashes the most recent device OS.
If you want to go to any earlier version you’d need to download the binaries from here

and flash via particle --usb flash <systemBinary>

Thank you. I think that dfu-mode for this Boron is not possible. The hardware button combination starts out promising but after 7 seconds of dfu-mode blinking proceeds into white breathing followed by blue listening. No interrupts on the USB are detected by my laptop. I wonder if Particle would want this one to take a closer look at?

EDIT: Appears I was wrong, seems like you can set active sim before modem is fully on.

Regardless, make sure you have fully followed all the steps in this post by rickkas7: Setting up a Boron with a 3rd-party SIM card

And DFU mode stuff is still strange, sorry that I don’t have any thoughts beyond the earlier ones already mentioned. If you have access to a JTAG programmer you can update the system firmware that way if needed, though.

You may need to refresh your bootloader via particle flash --serial <bootloaderBinary.bin>
DFU Mode is executed via the bootloader and should not just end without external reasons.

This little guy is not happy:

C:\Users\THINKCENTRE\Downloads>particle flash --serial bootloader-0.9.0-boron.bin
! PROTIP: Hold the SETUP button on your device until it blinks blue!
? Press ENTER when your device is blinking BLUE
sending file: bootloader-0.9.0-boron.bin
(blinks safe mode...)
Error writing firmware: unknown message

I appreciate everyone who is slogging through this with me.