Lot of the codes come from https://github.com/JFF-Bohdan/sim-module
- 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.
$ 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 mqttsms.sh
$ sudo cp mqttsms.sh /etc/init.d
$ sudo update-rc.d mihome.sh defaults
$ sudo service mqttsms start
$ sudo service mqttsms start
Write your message to topic home/sim900/18002001100 (your mobile number)
Write *100# (your USSD command) to topic home/sim900/ussd/balance Read result from home/sim900/ussd/balance/value
My home page: http://ptvo.info