I spend a lot of time to replace gammu with python-gsmmodem for my Huawei E3531.
The python exemple is just an exemple, it's incomplete. It does not read sms in the memory (if you receive a sms before starting the script). And it does not concat multiple parts sms (it will print unordered parts).
Also, as your live read sms script is running, you cannot send sms with another script because the dongle is busy.
Here is my own script to read all kind of SMS and send in same time.
Don't use python-gsmmodem that is deprecated but python-gsmmodem-new
Install Pyro4:
pip install Pyro4
Install threaded:
pip install threaded
Listen for new SMS
$> python2.7 python-gsmmodem-advanced-read.py
Initializing modem...
Waiting for new SMS message...
Object <__main__.RemoteSMSHandler object at 0x764e9910>:
uri = PYRO:[email protected]:9091
Pyro daemon running.
Keep this process running in background, for exemple with screen
Send SMS:
$> python2.7 python-gsmmodem-advanced-send.py --to=<receipient_number> --message=<your_message>