Python 3 classes for SIM 900 GSM module
Branch: master
Clone or download
Pull request Compare This branch is 3 commits ahead of JFF-Bohdan:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

MQTT - SMS bridge

Lot of the codes come from


  • INI file with all settings (see comments inside)
  • MQTT parameters for published data (QoS, Retain).
  • Processing of incoming messages
  • USSD commands in the text and PDU modes
  • Python 3 compatibility.
  • System daemon script.

How to install on Raspberry Pi or Banana Pi

$ cd ~/
$ sudo pip3 freeze --local | grep -v '^\-e' | cut -d = -f 1  | xargs -n1 pip3 install -U
$ sudo pip3 install ConfigParser
$ sudo pip3 install paho-mqtt
$ sudo chmod 0755
$ sudo cp /etc/init.d
$ sudo update-rc.d defaults
$ sudo service mqttsms start

How to start/stop the daemon

$ sudo service mqttsms start


How to send SMS

Write your message to topic home/sim900/18002001100 (your mobile number)

How to request balance

Write *100# (your USSD command) to topic home/sim900/ussd/balance Read result from home/sim900/ussd/balance/value

My home page: