wget http://smstools3.kekekasvi.com/packages/smstools3-3.1.3.tar.gz tar -xzf smstools3-3.1.3.tar.gz cd smstools3 sudo ./install.shI 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 [GSM1] device = /dev/tty.HUAWEIMobile-Modem incoming = yes #pin = 1111 init = AT+CNMI=2,0,0,2,1After 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.
3 comments: