Saturday, April 4, 2009

SMS with GSM Modem

Last time I wrote about sending SMS using online tools. The main problem there remains 2 way communication. Luckily, there's a simple solution to receiving problem. Since the start of 3Gmobile internet, GSM modems became quite ubiqitous and reasonably cheap. Just like the SMS software. I used Smstools that proved to be a snap to install and use.
tar -xzf smstools3-3.1.3.tar.gz
cd smstools3
sudo ./
I am using Huawei Mobile Modem E270 and E170 from Starhub. The only change I had to make now is update the config file. Here's my config file /etc/smstools.conf
devices = GSM1
logfile = /var/log/smsd.log
loglevel = 7

device = /dev/tty.HUAWEIMobile-Modem
incoming = yes
#pin = 1111
init = AT+CNMI=2,0,0,2,1
After that just start/restart the smsd daemon
sudo killall smsd; sudo smsd;
Sending of SMS is now as simple as
sudo sendsms +6584199983 'Your SMS message....'
or just put SMS File to /var/spool/sms/outgoing/
To: 491721234567

Hello, this is the sms.
More info about the structure of the file is here.
As for receiving, all the received messages will be downloaded to /var/spool/sms/incoming/ so all you have to do is create a cronjob to check this folder for new messages and then forward the message to your application.


  1. This comment has been removed by the author.

  2. Thank you.
    How it works if I use a SMS Gateway to use Voicent SMS Software from If I use it then do I have to use any Modem or others.

  3. Hi,

    Would appreciate if we can chat to discuss about this. I wonder if what is relevant 2 years ago still apply now. My number is 98075205. My name is TuckMeng.

    I am curious on the speed of the setup and how fast is your throughput on this.