|
For a while, John and I have been discussing an SMS to MessageBoard gateway. You can find out what John wrote about it in his article.
However, I thought I'd also put a little page together to illustrate the somewhat gash process further. You can find the everything you need to set this up yourself here, including where to get all the supporting software.
John and I spent just a couple of hours hashing together a few bits of software with a little Visual Basic Script (vbs).
John has worked with this far more than I have, so I let him drive and mainly pointed out where he'd made typos. Occasionally,
I even added a bit to the process with an idea or two.
The software used for each stage is as follows:
- Gnokii
- This forms our interface to the phone. It can get and send data via command line.
- Cygwin
- Gnokii is a Un*x port, and requires at least the cygwin DLL's.
- Coalesys HTTP Client Library
- We call this DLL to perform the HTTP POST to the board. There were no other reasons for choosing this library other than the cost (free!) and that me found it in a google search.
- WinCron
- Originally, we were planning to use the built in Windows scheduler, but this isn't really up to running something every x minutes. We'd recommend WinCron instead.
- sms2mds.vbs
- This is the script that John and I worked on. I can't say "wrote" in all honesty, most of it come together from searching on Google and MSDN newsgroups. Well. Ok, so there was an ounce or two of originality here and there.
The process that the system follows for each message is as shown here:
delete sms
+-----------------------------------------+
| |
| |
\/ |
+-----------+ +-----------+ +-----------+ +-----------+
| | | 8210 | | temp | | HTTP |
| sms_msg | ----> | Sim Card | -----> | message | -----> | POST to |
| | | memory | getsms | file | script | Maison |
+-----------+ +-----------+ +-----------+ /\ +-----------+
| |
| |
| |
| +-----------+
| | name and |
+-----------------------> | number |
download | database |
+-----------+
As John put it in his article:
We knocked up a visual basic script that is ran on a regular basis. When the
script runs, it uses the rather good gnokii
to connect to the phone over the serial cable, retrieve all the SMS messages and
write them into a file. Our script then parses this file, extracting the index,
date/time, sender's number and the message's actual text. We also use gnokii to
generate a text file of the phone's phonebook. So then, we do a lookup on
the sender's number and turn it into a readable name. With all the information
now assembled, we log it locally just to be on the safe side, and then use an
ActiveX control to do an HTTP post to the normal message board perl script.
Finally the script uses the index number we extracted to delete the message from
the phone's SIM card and it's all done. Robert is, indeed, your aunty's live-in
lover.
|