Sending Text/SMS with Electron

I'll drop some code in here... we can do better in the future but for right now it's what I have :smile: and it works well!

Here's a polled SMS app that also has a smsSend() function. Read the Info.md file for how to interact with it. Make sure you set the APN credentials correctly at the top. This method has always been available.
SMS Test App (with Tinker) · GitHub

And here's an implementation of SMS reading that is done asynchronously (not polling). When a new message is received, the handler is called with the index of the sms message. This handler needs to be treated as if it's an interrupt service routine (get in out, and let your main loop process the update). This method is available in 0.5.1 system firmware. You can grab the smsSend() function from the previous GIST example to add to this one.

Keep in mind this async method is currently unfinished, and uses the cellular_hal directly for now. In the future it will be available from the Wiring Cellular API.

Hope that helps! :smile:

5 Likes