Electron 3G modem - criteria for lost connection


#1

Hi,

I have a scenario where my firmware is sending UDP messages at a short interval (20 seconds) and the Electron (3G, US model) is located in a vehicle. Periodically the vehicle will move through areas with poor cell coverage and the Internet connection will drop.

The dropped connections are expected, but the Cellular.ready() method seems to take a bit to “realize” the connection has dropped, and my UDP messages during this window of time just get blasted off into the void and never reach the recipient.

I experimented with connecting and disconnecting a 3G antenna. When I disconnect the antenna, the signal strength quickly drops to -113 (as expected), but Cellular.ready() returns true for almost exactly 30 seconds after this, after which it finally flips to false. If any UDP messages are sent in this window of time, they are lost.

I am trying to figure out if there’s a way to more proactively detect if the connection has dropped, or at least learn more about why Cellular.ready() takes 30 seconds to flip the flag when the antenna is unplugged. Also, is there any other useful low-level info available on the modem that I can inspect in my code that may not currently be exposed in the Particle firmware SDK?

Note: My 3rd party SIM keep-alive value is set to 30 seconds, if that is related in some way.

Any thoughts would be appreciated.

Thanks,
Mike


#2

Hi, how did u set the sim keep alive? Im having a similar issue with Cellular.Ready() and real connection to internet.


#3

You can use the Cellular.command() instruction to send any AT command the ublox module supports.


#4

@fcabrera23,

@rickkas7 did a nice post on using 3rd party SIMs-- this is what I used to get mine running smoothly:

@ScruffR,

Understood, although I was wondering if anyone had insight on this scenario from digging through the U-Blox AT commands in the past. I didn’t see anything obvious from looking at the command list. I know @rickkas7 has posted some good info on using low-level modem commands but I haven’t seen anything about this particular scenario.

To look at it from another angle, any idea where I can find the Cellular.ready() logic in the source code?

Thanks,
Mike