The Acme Systems shipping office will be closed for holidays from 14 august to 22 august

Use pyGSM to manage SMS

pyGSM is a Python module which uses pySerial to provide a nifty interface to send and receive SMS via a GSM Modem.

Install pyGSM on FOX Board G20

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:

lettercounter.py

Change the serial port to use the right serial port where is wired your GSM modem:

  • /dev/ttyS1 if your are using a FOXGM or FOXGM2 board with the Telit GM862-QUAD
  • /dev/ttyS2 if you are a DAISY-13 data module plugged on D1
  • /dev/ttyS4 if you are a DAISY-13 data module plugged on D6
  • /dev/ttyUSB0 if you are using a Digicom USB Wave GPRS modem on a USB port

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:

Buy