Particle Electron + 3rd Party Sim - Does it remember?

I’ve just received the Particle Electron and added a 3rd party sim card to the device (after activation, adding funds to it, getting 500mb of data).

I’m getting the status lights as they should be (breathing the correct colors). Does this mean the 3rd party sim is working and communicating as it should?

I’m only asking as some thread says you must include 2 lines of code at the top of every script for 3rd party cellular to work, but I’ve not, and it still breaths as it should. The code I’m supposed to use (but not)…

#include "cellular_hal.h"
STARTUP(cellular_credentials_set("broadband", "", "", NULL));

So…

  1. Do we not need this code at all now?
  2. Does the firmware remember cellular data now? (I remember flashing it locally after tell Particle my APN details, so guessing it probably does)
  3. Is there a quick and easy way to tell? I’ve tried httpclient but not got it working as yet.

Thanks for your time. Just looking to clarify this for me and future users.

It is not remembered; you need to set it in every app you flash.

This, any many, many more helpful tips can be found here:

1 Like

If your 3rd party SIM worked without the “normally required” setup code, it’s most likely that they use the same APN settings as the Particle SIM (I think to remember that the default is “broadband”).
But you may have to set Particle.keepAlive() since I doubt other providers will have a similarly long keep alive periode as Particle SIMs.

@ScruffR What is the “keep alive periode for Particle SIMs”? So that we can set the time to the same as with those of a Particle sim card?

@GrtVHecke, default keepAlive() is 23 minutes (1380sec).
If you don’t set Particle.keepAlive() it’ll be that.

@ScruffR Thank you!

Thanks for the info all, very helpful.

One last question, just so I’m 100% sure.

Would a Particle.publish guarantee the data on the Electron was working if it sent it to the particle.io cloud? I’m guessing yes because it’s no other way to send data?

Thanks, the support on here is top rate!

You'd probably want to set it much shorter, since the keep-alive of 3rd party providers might not be as long as those from Particle :wink:

@gordi555, yeah, that should work. Function calls and/or variables should also be a good indicator :slight_smile: