Hi,

You can use a variant of the CMGD command. For a full description check http://www.developershome.com/sms/cmgdCommand.asp

BR,
Nikos
----- Original Message ----- From: "Harish Tella" <[email protected]>
To: <[email protected]>
Sent: Sunday, May 09, 2010 11:59 PM
Subject: Re: $50 reward for solution to +CME ERROR: 515 when sending sms on gsm modem


I think I've found a workable solution to this problem.

I simply set my init-string to:

init-string = AT+CNMI=2,1,0,0,0;+CPMS="ME","ME","ME";+CMEE=1

instead of

init-string = AT+CNMI=2,1,0,0,0;+CPMS="SM","SM","SM";+CMEE=1

Basically the +CPMS sets the modems to use its own flash memory instead of the
sim card memory.

I still sometimes get the CME 515 error when trying to send a message, but
somehow using the modem's flash memory the modem remembers the failed message
and tries to send it again.

Sometimes messages get left over in the memory (same was happening when using
sim as the storage) , so I turned on sim-buffering to
try and clean those up. It does this but sometimes ends up reading a message twice but I can live with that. It also sometimes results in my modem generating
a lot of errors.

2010-05-09 10:47:41 [3083] [6] DEBUG: AT2[/dev/ttyS0]: --> AT+CPMS?^M
2010-05-09 10:47:41 [3083] [6] DEBUG: AT2[/dev/ttyS0]: <-- +CME ERROR: 515
2010-05-09 10:47:41 [3083] [6] ERROR: AT2[/dev/ttyS0]: Generic error: +CME
ERROR: 515
2010-05-09 10:47:41 [3083] [6] DEBUG: failed to send mem select command to
modem -1
2010-05-09 10:47:41 [3083] [6] DEBUG: AT2[/dev/ttyS0]: memory check error
2010-05-09 10:47:41 [3083] [6] INFO: AT2[/dev/ttyS0]: Closing device
2010-05-09 10:47:41 [3083] [6] ERROR: AT2[/dev/ttyS0]: Couldn't connect(retrying
in 10 seconds).
2010-05-09 10:47:51 [3083] [6] INFO: AT2[/dev/ttyS0]: opening device

But I have the max-error-count = 1 and a restart usually takes
care of that.

I dont want memory to get filled up, anyone know of a way to clean memory
without having to use the sim buffering setting?

I am getting rid of the config files linked in my original post and will paste
them here for anyone looking in the future.

Lastly I'll be donating the $50 to the kannel project once I get paid. Thanks
for the help.

kannel.conf:
--------------------

group = core
admin-port = 13000
smsbox-port = 13001
admin-password = ********
log-file = "/var/log/kannel/bearerbox.log"
log-level = 0
access-log = "/var/log/kannel/bearerbox.access"
sms-resend-freq = 10

group = smsc
smsc = at
modemtype = wavecom
device =/dev/ttyS0
my-number = ********
sim-buffering = true
max-error-count = 1
log-level = 0
log-file = "/var/log/kannel/smsc.log"

group = smsbox
bearerbox-host = 127.0.0.1
sendsms-port = 13013
global-sender = ********
log-level = 0
log-file = "/var/log/kannel/smsbox.log"

group = sendsms-user
username = foo
password = bar

----------------
modems.conf
-------------------------

group = modems
id = wavecom
name = Wavecom
detect-string = "WAVECOM"
init-string = AT+CNMI=2,1,0,0,0;+CPMS="ME","ME","ME";+CMEE=1
message-storage = "ME"
need-sleep = true
sendline-sleep = 300
reset-string = "AT+CFUN=1"
speed = 9600






Reply via email to