Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nokia N900 #5

Open
umcisou opened this issue Sep 3, 2010 · 1 comment
Open

Nokia N900 #5

umcisou opened this issue Sep 3, 2010 · 1 comment
Labels

Comments

@umcisou
Copy link

umcisou commented Sep 3, 2010

Hi,

I'm trying to use pygsm with the nokia N900.

There is no problem when starting the pygsm.GsmModem object, and when sending a message. But reading incoming messages raise an error.

Here is the log:

>>> modem = pygsm.GsmModem(port="/dev/ttyACM0")
debug Booting
debug Connecting
write 'ATE0\r'
read 'ATE0\r\r\n'
read 'OK\r\n'
write 'AT+CMEE=1\r'
read '\r\n'
read 'OK\r\n'
write 'AT+WIND=0\r'
read '\r\n'
read 'ERROR\r\n'
write 'AT+CSMS=1\r'
read '\r\n'
read 'ERROR\r\n'
write 'AT+CMGF=0\r'
read '\r\n'
read 'OK\r\n'
write 'AT+CNMI=2,2,0,0,0\r'
read '\r\n'
read 'ERROR\r\n'
write 'AT+CMGL=0\r'
read '\r\n'
read 'ERROR\r\n'

>>> print modem.next_message()
write 'AT\r'
read '\r\n'
read 'OK\r\n'
write 'AT+CMGL=0\r'
read '\r\n'
read 'ERROR\r\n'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/francis/Projects/virtualenv/pygsm/lib/python2.6/site-packages/pygsm/gsmmodem.py", line 567, in next_message
self._fetch_stored_messages()
File "/home/francis/Projects/virtualenv/pygsm/lib/python2.6/site-packages/pygsm/gsmmodem.py", line 544, in _fetch_stored_messages
lines = self.command('AT+CMGL=%s' % self.smshandler.CMGL_STATUS)
File "/home/francis/Projects/virtualenv/pygsm/lib/python2.6/site-packages/pygsm/gsmmodem.py", line 375, in command
raise(err)
pygsm.errors.GsmModemError: Unknown GSM Error

Thanks,
Francis

@adammck
Copy link
Owner

adammck commented Sep 3, 2010

many nokia handsets don't support the hayes AT command set very well. it doesn't appear that the N900 supports AT+CMGL or AT+CNMI, at least one of which is required to receive messages with pygsm.

if you can find a documented alternative method for fetching messages from the device, i'd be happy to implement it. but i wouldn't count on it. if you have the nokia sync software, a serial dump would be useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants