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>
Hi Steve,
thank you to consider my problem.
1 - Pyro4 installed version is 4.77
2 - Successfully installed version 4.76
And ... same problem.
3 - installed updated version of python-gsmmodem-advanced-read.py :
(after a reboot to kill any Pyro4 instance)
pi@alarme:~ $ python2.7 python-gsmmodem-advanced-read.py &
[1] 654
pi@alarme:~ $ Initializing modem...
Waiting for new SMS message...
Note : messages are NOT received ! (With prior version, messages were received normally)
pi@alarme:~ $ python2.7 python-gsmmodem-advanced-send.py --to=06XXXXXX --message=message3
Failed to send SMS: 0021000AA16058840938000008EDF27C1E3E9767
Does it says anything to you ?
Bernard.