faucamp / python-gsmmodem

Python module to control a GSM modem attached to the system: send/receive SMS messages, handle calls, etc
GNU Lesser General Public License v3.0
385 stars 303 forks source link

Command Error #90

Open saviour123 opened 6 years ago

saviour123 commented 6 years ago

I am running this example ussd_demo.py and i get this error, I can see exactly what is wrong.


Sending USSD string: *123#
Traceback (most recent call last):
  File "ussd_demo.py", line 41, in <module>
    main()
  File "ussd_demo.py", line 30, in main
    response = modem.sendUssd(USSD_STRING) # response type: gsmmodem.modem.Ussd
  File "/home/sav/.local/lib/python2.7/site-packages/gsmmodem/modem.py", line 667, in sendUssd
    cusdResponse = self.write('AT+CUSD=1,"{0}",15'.format(ussdString), timeout=responseTimeout) # Should respond with "OK"
  File "/home/sav/.local/lib/python2.7/site-packages/gsmmodem/modem.py", line 428, in write
    raise CommandError(data)```