Electron resets after antenna disconnect

Hi All,

I am trying to understand electron basic functionality. I observed that, if I disconnect antenna for about >1 hour, and then when I connect it back, electron code starts again from setup function. Is it expected behavior? How can I change it to "do not start from setup again after reconnecting antenna?? I just want my other process and loop should work as it is all the time whether an antenna is connected or not.

@d.chauhan, you should not be operating the Electron without an antenna nor should you be reconnecting it while the Electron is powered. Besides, the small antenna connector is not designed for a lot of extraction/insertion cyles. Why exactly are you disconnecting the antenna?

2 Likes

Thanks for the reply.
I am trying to recreate a scenario where cellular signal is lost for more than 2-3 hours. Does antenna re-connection when electron is ON, resets the electron?

@d.chauhan, the best way to simulate the signal loss is to put your Electron in a Faraday box - a metal box or a microwave oven for example. No one has asked this question because this is not how they test.

1 Like

Thanks. I will test with Microwave oven. But electron resets after 2-3 hours of cellular disconnect. Is it expected?

@rickkas7, can you please comment on this?

The modem will reset after 5 minutes. I don’t believe there is anything in the code to reset the whole device.

Resetting the whole device is a good idea in case the device is in a bad state, I use it in the electronsample fault tolerance sample code.

If the system is resetting on its own, maybe there is an indication in the debug trace logs. You can capture those using:

Or you can add the

SerialLogHandler logHandler(LOG_LEVEL_TRACE);

to your own code and monitor the USB serial port.

That is interesting.

Can i disable the feature of "Modem Reset after 5 minutes ? If cellular is lost, i don’t want to reset the modem. I don’t want that code starts again from setup function. Because i know that cellular will come back when i change location of the device. The modem reset clears all RAM data. I want to keep all RAM data as it is even if cellular is lost for hours. Is it possible?

Resetting of the modem cannot be disabled. However it does not reset the device - setup will not be run again when the modem is reset. Your code continues to run as normal (at least with SYSTEM_THREAD(ENABLED)).

2 Likes