Electron SMS Send Message

So what exactly do you mean by you can't sleep for more than 1 hour? Are you talking about deep sleep mode where the modem is put to sleep?

When using System.sleep the STM32 is put into Stop mode and I use the Network Standby code for quicker reconnects when waking from System.sleep. I'm assuming as long as the cellular modem is still on in System.sleep mode that I can use your trick to wake up the STM32 at any time?

Would pings be needed if the System.sleep + Network Standby code is used?

If the modem is left on, and data connectedā€¦ itā€™s tying up cellular network resources just sitting there idle. So to be a good cellular neighbor, we will ideally disconnect the data connection after 1 hour of being connected and idle.

When we rework the sleep API we will address these issues where you may ask the system to sleep for more than 1 hour with the modem on. Say 6 hoursā€¦ well after 5 hours, we should wake up and disconnect the modem to be a good neighbor. Technically it would be better in that case to just power off the modem completely because you will need to do a full handshake again anyway in 6 hours. This will be documented when the changes are made.

If you want to be available from the server during that 6 hour sleepā€¦ there needs to be more things happeningā€¦ you need to keep the data connection alive with pings, and of course keep the modem on. The STM32 would need to slice up the time to be asleep, and wake up briefly to send the keep alive.

What kind of wake up use cases do you envision for your desired applications? For example, a different way to talk to a sleeping Electron is to wait for it to wake up and ask if there are any messages waiting for it, then feed it your queued messages during that time. With that method you could truly go into deep sleep for long periods of time, and still not miss the downstream messagesā€¦ albeit delayed. The on-demand wake up method is great as well, Iā€™m sure itā€™s super useful to be able to ask ā€œwhatā€™s this sensor reading right now?ā€ at the cost of more power usage and data usage.

With the above proposed wake up system via incoming data, it would also be possible to wake up via SMS for a SIM that supports it. Right now that would mean 3rd party SIMs.

1 Like

@BDub So Iā€™m assuming when I use this sleep mode on the Electron that the Modem stays on and it could accept a SMS message which could trigger the SMT32 to wake up via a interrupt pin.

System.sleep(D0, RISING, sleepInterval * 60, SLEEP_NETWORK_STANDBY);

This sleep mode does keep the cellular modem on right?

And what exactly does SLEEP_NETWORK_STANDBY actually do?

When your API code is done could it also wake the SMT32 when using this same sleep code?

And Iā€™m not really worried about shutting off the Electron from the cell network since there are so many cellphones that stay on that I feel like the Electron makes no real difference considering the big picture of how many devices are constantly connected.

When implemented, yes that could work.. although the pin would have to change to the correct one. Also it might need to be a separate API so that we can abstract the pin requirement and better control things.

SLEEP_NETWORK_STANDBY will keep the modem on. When used it basically doesn't force a cloud disconnect and doesn't power off the modem.

And I'm not really worried

:smile: well there are rules to play by and your cell phone likely plays by the same rules... it's just sitting there gulping down a 48oz slurpie way more often than the Electron ever would or could. When you go to places with decent free Wi-Fi, you might notice a really short lease on the connection... no matter what your data usage is. This is likely to ensure the network doesn't fill up and prevent new users from joining, and also to keep the idle device data usage in check. Everyone has a system to keep their network running smoothly. If they don't, it's likely going to run pretty bumpy.

1 Like

@RWB I am using a 3rd party SIM with my Electron but I am still being billed for the particle SIM. Is it ok to go ahead and deactivate SIM using ā€˜Deactivate SIMā€™ option from console?

Thanks.

Thatā€™s what I would do.

2 Likes

I went ahead and did that just now and my electron is still breathing cyan on 3rd party SIM. I was being too paranoid that it may somehow kick my electron off the grid :stuck_out_tongue:

Thanks for your prompt reassuring response @RWB

It wonā€™t affect your 3rd party service or Particle cloud service, just billing for that Sim that you deactivated.

1 Like

@BDub, it's a while since ...

... any news on that? :smiley:

1 Like