I've been working on a GSM project with the GSM shield. I can find no way in the GSM library to delete messages after they have been read from the SIM. To be clear, I need to be able to delete message received and stored on the SIM.
sms.flush() does not perform this function.
I know it can be done with AT commands, but these have to be sent over Serial. As the project will not be connected to a computer when it is running, I cannot using Serial commands. Does anyone know of a way to do this without using Serial?
On a SIM800 GSM module the command AT+CMGD=X,0 will delete an SMS message from the Sim card (where X is the unique Sim SMS message ID). You can send that AT command straight out of an Arduino device to a SIM800 module using a hardware or softwareserial library serial connection.
For the SIM800 module I use (and I presume other modules) the AT+CMGD=X,0 needs to be used in conjunction with the AT+CPMS="SM","SM","SM" command to select the preferred data store for SMS messages.
SMS messages that end up in the SIM800 module's own memory (or on the Sim card) cannot be deleted with the AT+CMGD=X,0 command if the correct/matching SMS message preferred data store is not active.
I really appreciate the response. I'll have a look at the code in your other post and have a go at fixing my application. If I have any questions about your code I'll post back here. Hope that's ok? I saw in the link you sent I should be specific about hardware I'm using when posting here. My configuration is an Arduino Mega ADK with the Arduino GSM Shield.
I'm new in using the GSM shield from Arduino, and I have an issue.
The project is at the beginning, and I use now only SMS's, maybe I will update to data in the future, but I need it up an running until then. It will be installed on a stand alone car, without connection to a PC.
The issue is, while developing the software I did a lot of tests, and that means a lot of SMS send and received. The problem is, from what I think, the SMS send by the Shield to my personal phone. How can I delete also those messages.
The example in the received SMS is using flush() function, but I guess this is only for the received ones. How can I delete also the ones that I sent without connecting the Arduino throw serial to computer.
Maybe @MrBuzny, maybe you have a solution for me also.