@wesner0019, it’s never good practice to remove the antenna on a transmitter though in the case of the Electron, I have not had any problems doing so when the power is off. Are you taking the antenna off after the device has gone to sleep? Speaking to a couple of engineers here at Particle, they don’t see any reason for the hard fault under those conditions. I assume if you replace the antenna, everything works again?
I am trying to simulate a situation where the electron can’t connect to a cellular network, so that I can test my code for when that happens. The only way I could find so that it didn’t connect was when I removed the antenna before powering it on.
if (const char* newSerialMessage = checkForNewSerialMessage(Serial, '\n')) {
if (strstr(newSerialMessage, "ON")) {
Cellular.on();
Serial.println("********** Cellular now ON **********");
} else if (strstr(newSerialMessage, "OFF")) {
Cellular.off();
Serial.println("********** Cellular now OFF *********");
}
}