cannot understand pygsm error message : CMS ERROR 513: Lower layer failure (for SMS)

1,201 views
Skip to first unread message

guptha

unread,
Feb 10, 2010, 4:18:53 AM2/10/10
to rapidsms
hi group,
I am struck with an error that i could not understand ,please help me
out

#!/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

guptha

unread,
Feb 10, 2010, 6:17:47 AM2/10/10
to rapidsms
Hi group,
I sorted out the problem ,its a simple mistake .I should have been
more careful in if condition.
this worked out without problem

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

Jeff Wishnie

unread,
Feb 10, 2010, 7:33:04 AM2/10/10
to rapi...@googlegroups.com

GsmModemError: CMS ERROR 513: Lower layer failure (for SMS)
  write '\x1b'
  write 'AT\r'


Hi Guptha,

CMS Errors are returned from the network, you can find them described online:

Though the description of 513 is not terribly clear:
CMS ERROR: 513Unable to store


Reply all
Reply to author
Forward
0 new messages