Receiving Real-time SMS messages from an iPhone into OF

Hello everyone!

I have been cracking my head against the desk trying to get this working; and whenever I get close it ends up being close enough to smell but not to taste :frowning:

Anyhow, basically I want to be able to get SMS messages into OF in real-time. The problem is that I cannot get Gnokkii to work on the iPhone and some other phones haven’t worked too well for me either. I ended up jailbreaking an iPhone and being able to SSH into it directly to read a sms.db file which got me thinking … wouldn’t it be awesome to be able to using the extremely handy ofxSQLite ( Roxlu ) addon to read that .db file directly. Poll it at some interval and get new messages?

So to get a file path to the sms.db on the iPhone I mounted it using both PhoneDisk ( ) and through ExpanDrive ( ) and can directly query the sms.db with either!

The problem is that the sms.db doesn’t update when new messages are sent. If I stop and rerun the OF program it will ( with Expandrive. Phone disk requires an unmount then remount ) but while running it will not ( so close! ).

I think I am hitting the ceiling of my knowledge of these things and am hoping someone more knowing could possibly help me out here. Though using a web service such as Notify Pro and does work by reading emails with the email addon it is way too unreliable. As this will be for a large public projection I would rather hook up directly to a phone instead of using a bunch of middlecompys.

Thanks in advance! ( I hope )

Hey PlumCantaloupe,

I’ve worked with this kind of stuff for a while. There are really many approaches you can take but for your OF setup, I would recommend getting an HTTP Server going inside your OF app that receives messages and who they’re from via some GET or POST variables. Now you just have to send them to the app in HTTP so that’s abstracted and you just focus on getting them there.

Now for the middle layer:

  1. get an old Nokia phone like the 6310i and a DLR-3P serial cable for it. Then use something like “smstools” to poll the phone via serial every X seconds, get the SMS, throw it into some Python or bash script to send it to the HTTP server running on your OF instance.

  2. use something like to get an incoming phone number for SMS’s and use that to receive to some server and then send to OF or directly to OF and parse the headers and XML inside there. This has the disadvantage though of needing a publicly exposed IP for Twilio to hit.

  3. Get an Android phone and hook it up to a Wifi AP that the computer running OF is connected to as well. Use the Android SDK to listen for incoming SMS’s, parse them, send them over HTTP to the OF instance. Could do this for the iPhone too if you want.

There are more methods than this but something to get you started. I’m starting to lean toward 3) lately since the phones are cheap and I’m starting to use hostapd on the servers I run OF code on for Wifi access. Could in fact even do this with OSC or something but IMO SMS’s are important enough that I’d rather get them over TCP than risking UDP.

1 Like

Hi @nemik - this info looks great but as a newbie I didn’t quite follow all of it! Are there any resources/links you could refer me to with greater detail in this regard pls?

(I realise this is like 10+ yrs later, so maybe tech has moved on since?)

Hi, I did this recently for a project and I used Twilio. Works really well and it is well documented.
Although, you need to set a middle layer server where the messages are send and stored and you query that server from OF. I used Firebase as this middle layer server.

I can share that code is you want to.