pyGSM is a Python module which uses pySerial to provide a nifty interface to send and receive SMS via a GSM Modem.
Download the pyGSM project from GitHub repository by typing:
debarm:~# git clone http://github.com/adammck/pygsm.git Cloning into pygsm... ...
Install the package python-setuptools required by the pygsm setup program.
debarm:~# apt-get update ... debarm:~# apt-get install python-setuptools ...
The install the pyGSM library by typing:
debarm:~# cd pygsm debarm:~# python setup.py install ...
Then try this example:
Change the serial port to use the right serial port where is wired your GSM modem:
Run the lettercounter.py example by typing:
debarm:~# cd playground/python/sms# debarm:~/playground/python/sms# python lettercounter.py debug Booting debug Connecting write 'ATE0\r' read '\r\n' read 'OK\r\n' write 'AT+CMEE=1\r' read '\r\n' read 'OK\r\n' ...
The demo will loop forever. Try to send a SMS from your mobile phone to the SIM number mounted on the FOX Board G20 and see what happen.
Read the Author README to understand how to use the pyGSM API and the licence terms:
COMBO-M2 - TERRA-M GPRS
Legacy Terra-M board + accessories