#!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4 encoding=utf-8
import pygsm
import sys
import time
import StringIO
modem = pygsm.GsmModem(port="/dev/ttyS0")
sendmsg=u"வணக்கம் "
while True:
msg = modem.next_message()
if msg is not None:
if msg.text =="J":
sendmsg="joke"
msg.respond(sendmsg)
if msg.text =="Q":
sendmsg='Quotes'
msg.respond(sendmsg)
msg.respond(sendmsg)
else: time.sleep(2)
When i run this programme it shows an error message like
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/pygsm/
pdusmshandler.py", line 67, in _send_pdu
self.modem.command(pdu_string, write_term=chr(26))
File "/usr/local/lib/python2.6/dist-packages/pygsm/gsmmodem.py",
line 378, in command
raise(err)
GsmModemError: CMS ERROR 513: Lower layer failure (for SMS)
write '\x1b'
write 'AT\r'
The same program seems to run fine for sometimes and later when i
restart it again for further test these error message appeared .Why on
earth these kind of errors occurs to me?!!
Thanks for Jeff and Malthe for answering to my previous post
ganesh guptha
while True:
msg = modem.next_message()
if msg is not None:
if msg.text =="J":
sendmsg="joke"
elif msg.text =="Q":
sendmsg="quote"
else:
sendmsg=u"வணக்கம் - Type J for Jokes and Q for
Quotes"
msg.respond(sendmsg)
time.sleep(2)
Thanks
ganesh guptha
GsmModemError: CMS ERROR 513: Lower layer failure (for SMS)
write '\x1b'
write 'AT\r'
| CMS ERROR: 513 | Unable to store |