Feb

23

Neo 1973 as an SMS gateway

17 years ago, at the end of February | Leave a Comment

Builds have been broken again recently, for about 5 days or so due to this,

../../libkoto/libkoto.a(koto-task-view.o): In function `on_note_activated’:
/builder/newBuild/build/tmp/work/armv4t-angstrom-linux-gnueabi/
openmoko-tasks2-0.1.0+svnr379-r1/trunk/libkoto/koto-task-view.c:261:
undefined reference to `koto_platform_edit_task’

(just in case someone feels the need to fix it – hint hint )

but that has given me a chance to start poking about with other things. One of those things happened to be smstools3. SMS Server Tools 3 (smstools3) can take Neo running smsdan ordinary phone or gsm modem and turn it into an SMS gateway that can send and receive SMS messages. Now, I don’t have a gsm modem but I do have a Neo 1973. Within 5 minutes I had SMS Tools compiled using the Openmoko toolchain. I’ve taken to using the toolchain quite a bit for testing before I create the .bb files so I can do proper building. Once I’d got a compiled smsd, I put together a simple /etc/smsd.conf file for the Neo (listed below).


devices = NEO
logfile = /var/log/smsd.log
loglevel = 6
outgoing = /var/spool/sms/outgoing
checked = /var/spool/sms/checked
failed = /var/spool/sms/failed
incoming = /var/spool/sms/incoming

[NEO]
device = /dev/ttySAC0
baudrate=115200
incoming = yes
regular_run_interval=3600
regular_run_cmd=AT+CFUN=1
regular_run_cmd=AT+COPS
pin = 1234

Obviously the /var/spool/sms directories needed to be created too. Before you start up smsd though you need to kill off gsmd by simply issuing the command


/etc/init.d/gsmd stop

gsmd will then stop and, from what I gather, power off the gsm chip. This bit is fairly important to know, since you actually need the chip to be powered up. We can do this simply by using the command


echo 1 > /sys/devices/platform/neo1973-pm-gsm.0/power_on

smsd can then be started, if you want to stop it forking use the -t switch on the command line. Incidentally, if you want to use the regular_run_xxx commands in your configuration you need to use the latest beta of smstools3. I needed to use them to get the Neo to register with the network, particularly as I’m actually roaming while doing this. To send an sms you simply copy a text file into the /var/spool/sms/outgoing directory – The format of the file in its simplest form is


To: destination-number

message-text

That’s its most basic form, you can get much more complex. There are some very nice features in smstools particularly that you can trigger actions on the receipt of SMS messages.



»crosslinked«

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tagged with:
February 23, 2008 22:56


Comments

Name (required)

Email (required)

Website

Speak your mind

Current Electricity Use (15min)


iPhone/Webkit RSS Reader

Links


Tags

1-Wire android api Apple arduino currentcost DDAR development DVD FIC freerunner G1 google Google Phone gphone gprs GPS hardware image image builds inspiration iphone jailbreak kiosk linux Mac monitoring Music neo 1973 Nokia openmoko opensource OSX Pachube personal qtopia rhubarb rikki Rio slimp3 slimserver software tracking Trolltech u-boot


Twitpic


Graphy Stuff






Nasty Spam Monkeys