Comments (3)
Same error here on a Raspberry Pi 4 with a Sim7600X Waveshare Hat :
DEBUG: response: ['+CMGS: 40', 'OK']
SMS sent.
DEBUG: write: AT+CMGD=3,0
DEBUG: response: ['OK']
DEBUG: notification: ['+CDSI: "SR",8']
DEBUG: SMS status report received
DEBUG: write: AT+CPMS="SR"
DEBUG: response: ['+CPMS: 0,0,3,23,3,23', 'OK']
DEBUG: write: AT+CMGR=8
DEBUG: response: ['+CMS ERROR: 321']
Exception in thread Thread-11:
Traceback (most recent call last):
File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
self.run()
File "/usr/lib/python3.9/threading.py", line 892, in run
self._target(*self._args, **self._kwargs)
File "/home/proto/.local/lib/python3.9/site-packages/gsmmodem/modem.py", line 1205, in __threadedHandleModemNotification
self._handleSmsStatusReport(line)
File "/home/proto/.local/lib/python3.9/site-packages/gsmmodem/modem.py", line 1373, in _handleSmsStatusReport
report = self.readStoredSms(msgIndex, msgMemory)
File "/home/proto/.local/lib/python3.9/site-packages/gsmmodem/modem.py", line 1428, in readStoredSms
msgData = self.write('AT+CMGR={0}'.format(index))
File "/home/proto/.local/lib/python3.9/site-packages/gsmmodem/modem.py", line 492, in write
raise CmsError(data, int(errorCode))
gsmmodem.exceptions.CmsError: CMS 321
from python-gsmmodem.
The '+CMS ERROR: 321' is an error code from the GSM modem, which indicates that an invalid memory index was specified in your AT command (AT+CMGR=6). This can happen if you're trying to access a message storage index that doesn't exist or is not accessible. Speaking of which I'm hitting this same issue I plan to check the device's SMS storage configuration and indices. I'll write an update if I when I get better success
from python-gsmmodem.
try [https://github.com/babca/python-gsmmodem/blob/master/tools/sendsms.py], it should run without a bother use the right flags tho! i.e. /usr/bin/python3 /home/pi/FINAL/python-gsmmodem/examples/send_sms_demo.py -i [PORT] [DESTINATION] "[MESSAGE]"
from python-gsmmodem.
Related Issues (20)
- Question: Support for modems with multiple SIMS ? HOT 1
- dial_polling_demo.py throws gsmmodem.exceptions.TimeoutException: ['NO CARRIER']
- TimeoutException with Sim800 module HOT 1
- Delivery Reports can't be disabled when in PDU mode HOT 2
- Modem working but having Timeout Exception HOT 3
- incompatibility with latest pyserial 3.5
- (removed - useless)
- Sms not receiving
- Support for RFC2217 (serial port over network)
- how best to extend? HOT 1
- Add an example to demonstrate the Sending SMS HOT 2
- Does not work on Python 3.x HOT 2
- Still Alive? HOT 5
- Question: support for windows? HOT 12
- Timeout exception raised for any command. HOT 16
- Error: 'GsmModem' object has no attribute 'rxThread' HOT 3
- sms_handler fails HOT 2
- Instant timeout exception
- PDU Decoding Error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-gsmmodem.