The docs show us that to switch to internal/external SIM, we need to flash a new firmware. Is there any potential harm in switch between the internal and external SIM by simply a reset on the Boron 2g/3g?
I've tested this code:
void loop() {
}
void setup() {
if(Cellular.getActiveSim() == INTERNAL_SIM) {
Cellular.setActiveSim(EXTERNAL_SIM);
Cellular.setCredentials("apn_here");
} else if (Cellular.getActiveSim() == EXTERNAL_SIM) {
Cellular.setActiveSim(INTERNAL_SIM);
Cellular.clearCredentials();
}
// signal that the switch happened
pinMode(D7, OUTPUT);
digitalWrite(D7, HIGH);
}
And running particle identify shows that the SIMs have successfully switched. I also read
You must both call Cellular.setActiveSim(INTERNAL_SIM) and remove the external SIM card on the Boron LTE. Just deactiving the SIM in software won't completely disable the external SIM and will cause connection failures.
This just applies to the Boron LTE, correct? Meaning I could switch between SIMs without taking the SIM out in the Boron 2g/3g without problems?
I believe you should be able to switch between internal and external SIM on the Boron 2G/3G (but not Boron LTE) entirely in software.
The main thing is that you need to power down the modem completely when switching. You’ll probably want to use SYSTEM_MODE(SEMI_AUTOMATIC). After switching the active SIM and credentials, power down the modem using Cellular.off() for several seconds, then turn it back on.
Thanks for the quick reply. When I turn on semi automatic mode, and call Cellular.on() after Cellular.off(), my Boron starts to breathe blue (not cyan). Is there something else I need to do?