Raspberry Pi, Python, and 3G Dongles - oh my!


A 3G dongle stuck in a Raspberry Pi computer.

This is a bit of a brain dump / diary of what I've discovered about using 3G dongles to send SMS using Python on the Raspberry Pi. Here is how to use Python to send an SMS from the Raspberry Pi via a 3G USB dongle. In order to talk to the dongle, we need to install pyserial wget http://pypi.python.org/packages/source/p/pyserial/pyserial-2.6.tar.gz gunzip pyserial-2.6.tar.gz tar -xvf pyserial-2.6.tar cd pyserial-2.6 sudo python setup.py install Save this file as sms.py - make sure you change …

Continue reading →

SMS PDU in Python for Raspberry Pi


A 3G dongle stuck in a Raspberry Pi computer.

Cracking on with my Raspberry Pi, I've written my first program in Python. The aim - to be able to send an SMS via a 3G USB dongle. The problem - the way SMS needs to be encoded is hideously complicated. For example, suppose you want to send "This is a very simple message :-)" to the phone number +447700900123. This is the command that you need to send to your dongle: AT+CMGS=42 079144872000626001000C9144770009103200112154747A0E4ACF416190BD2CCF83E6E9369C5D06B5CBF379F85C06E95A29 WHAT? THE? …

Continue reading →