tags:

views:

526

answers:

2

Hi there!

I connected a GSM/GPRS-modem to my microcontroller and everything works fine. When I want to delete all messages in the ME storage, I should use this command:

AT+CMGD=1,4

->OK

The deleteflag '4' indicates that I want to delete all messages and flag '1' is overridden. However, when I check if the storage is empty, I get:

AT+CPMS?
+CPMS: 8,100,8,100,8,100

Indicating that the memory is still occupied and no message got deleted.

Does anyone know what I'm doing wrong?

Thanks in advance!

A: 

I use the CMGD command to delete messages.

As far as I can see the CMGR command is used to read messages and not delete them.

Edit (since you were using the CMGD command)

It is possible that your modem doesn't support multiple parameters to the CMGD command - my Siemens modem does not (or if it does it doesn't list it in the AT command set document). Instead of deleting all the messages in a single command I do a CMGL to get read messages, parse the results to get the index and them delete them one at a time using CMGD. If you do find another way I'd be interested.

Use the AT+CMGD=? command to find valid values of the parameters.

Edit (since you verified the modem supports CMGD with two parameters

I don't know what the problem is. I did notice that your CPMS command gives different results to mine, example of mine:

AT+CPMS?
+CPMS: "SM",10,10,"MT",12,35,"MT",12,35

Yours doesn't have any storage memory string. I'm guessing the command you actually did was:

AT+CPMS="ME"

When you switch to ME storage and do a CMGL command does it list the undeleted messages?

CiscoIPPhone
Well, using AT+CMGD=? returns0-255, 0-4Meaning that it should support deleting all messages. That's also correct according to the documentation (we're talking about a Sagem HiLo btw). I have a strong hunch that it deletes all the messages from the SM storage (SIM), although I set my preferences to 'ME'. Yet, when I send this command:AT+CMGD=1it deletes the message on index 1 of the ME as it should.What's your wisdom on this?
Hehe, sharp-eyed.That's because I was typing that response out of my head (working on different computers, that's why).Thus the response (and I verified this now) is:+CPMS: "ME",8,100,"ME",8,100,"ME",8,100
*shrug* I have no further ideas that could help, good luck solving the problem. :)
CiscoIPPhone
A: 

Have the same issue here. No Idea what do with it, apart from looping through all the msges :-/

Mick