Can I send UDP packets to my router with Cellular.connect() only? Or do I need to also Particle.connect() to the cloud for this to work? I’m trying to avoid connecting to the cloud to save 5-6k when I wake every hour. Since I’m only using UDP in this application. Using manual system mode. Firmware 0.5.0 from IDE. Any short code samples? If not, I will try it.
That should be possible, but it might not save you all of the 5-6k since cell connect negotiation might use some of that too.
But have you checked if this data impact still happens with 0.5.0?
I believe there will be no 5k overhead if I wake every 20 minutes in automatic mode. I want 60 minutes.
@sbright33 have you tried the new data counter api code that’s in the 0.5.0 firmware? Check the firmware update list for the link to the code and post your results on the data consumption using different sleep modes. I have not had time to test this yet.
For reducing data usage, we have the NO_ACK flag Particle.publish() in 0.5.0. Releases after 0.5.0 will add further data saving measures, including the ability to deep sleep, and wake up with a quick connect to the cloud, as we now have with regular sleep.
@mdma so is the NO ACK flag feature automatically used with particle publish in the 0.5.0 firmware or does this have to be enabled in code?
@RWB I’ve tried
sprintf(publishStr, "%.2f %.2f", fuel.getVCell(), fuel.getSoC());
Particle.publish("e1", publishStr, 60, NO_ACK);
and what used to consume ~122 RX bytes now consumes 0 RX and the TX is about the same as before NO_ACK.
I don’t understand how to keep the publish private though. I have a photon that subscribes to the event using MY_DEVICES and it’s no longer retrieving the publish since I started using NO_ACK - PRIVATE & NO_ACK doesn’t compile for me.
Check out the docs for how to use the NO_ACK flag and private events - https://docs.particle.io/reference/firmware/electron/#particle-publish-
@bpr Good to know it cuts data down and you have verified it. Soon you should be down to the bare minimum data required which is what we are all looking for.
I guess the NO_ACK is only allowable if your are OK with the possibility of the data not being successfully transferred. Still it’s nice to have all these tools to work with to keep data cost down.
Hopefully the data in the link above helps you figure out how to make the publish private.