P1 to Hotspot Connection. How to optimize data usage

I have a P1 that I am connecting to a 3g hotspot. I had the 2 connected for 12 hours and 1.2MB of data was used.

I was wondering if anyone know of things to do in the firmware to optimize the data usage of the hotspot?

The P1’s open a TCP connection to the hotspot, but I am not sure what can be done to decrease data usage.

Any suggestions will be greatly appreciated.


That depends on your needs.
If you don’t need permanent Particle cloud connection, you can Particle.disconnect() and save the cloud pings.
Also how much of the 1.2MB are produced by your code?
Hard to say more without any info about your code.

The Electron for example was set up to use UDP instead of TCP for the cloud in order to save on data consumption.

1 Like

@ScruffR, our product needs a permanent connection right now, but I am unsure how much our code is using vs particle pings. It should be very low comparatively. ours only publishes upto 20 time a day or less, 16bytes per transmission

Excuse my ignorance, but how does this line up?
Why do you need cloud connection in the time between the publishes?
Do you intend to retrieve Particle.variable()s and/or call Particle.function()s at random times or are you Particle.subscrib()ing?
If not, I would not see the need for a permanent cloud connection. Not even for OTA updates, since they could be scheduled.

Or do you rather mean you need WiFi connection permanently?
If so, then Particle.disconnect() will not interfere with that. The WiFi connection is independent of the Particle cloud connection.

1 Like

Originally we wanted real time updates on the device such as if it was unplugged or moved or some other variable changed the state of the device we would get an update. With a newer format of coding i think we can changed this to only connect to particle when there is a status change. But we still need to figure out how to handle OTA updates.

Thanks for the idea and questioning the need for something.

1 Like