I am using a third party sim card and when the Electron first connects it works and flashes fine but after 5 mins or so nothing will communicate to the Electron, flashing OTA or doing API commands.
The Electron has three bars and still connected to the tower.
And I have the same problem with third party sim card, with SIM Particle works great.
I do not know what the problem is. I will try with an operator who uses Particle for roaming in my country so we’ll see whether it is maybe a problem.
Just chiming in, I have the identical issue. Since the SIM I am using (t-mobile) belongs to another device, I assumed that T-mobile was cutting the data after a few minutes. I’ve even tried three different APNs for the carrier, all the same result. Interestingly, if I publish to the cloud every 15 seconds or less, I never lose connectivity. I have enough data available with the carrier that this wouldn’t be a problem, but it’s not the solution.
I tried with SIM card from T-mobile operator used for roaming in my country but the same problem occurs.
The method of sending the Publish every 45sec contributes to the connection is not lost.But why this does not occur with sim cards from Particle? With other cards need in some way keep alive function.
It would be good to engage in discussion and engineers from Particle.
Yes, to debug, can you tell us does the problem go away if you publish data every 4 minutes? It could be the teleco is destroying the UDP connection after a 5 minute timeout. On particle sims, this timeout is 24 minutes, so the firmware pings the server every 23 minutes.
Hi @mdma ,
Even if used as TCP communication with another server, the communication with Particle Cloud lost if not used Publish.
Also lost communication with TCP server if the interval greater than 45s.
Experimental I got somewhere during the 45S for the interval.
It would be good to make API which can be set interval for keep alive.
Right - the UDP IP/port mapping that the cellular network establishes and later tears down with inactivity is independent of any separate TCP connection. We will be adding an API to set the ping timeout for the UDP cloud connection, at least as an intermediate solution while we look to find ways to make these connections persistent.
How has your keep_alive code been working out so far? I kinda have same problem here in Thailand but using your code doesn’t seem to fix it here. Thanks!