SMS Troubleshooting

When creating some of the SMS demo scripts a basic error was made when deleting the mass of "Hey, welcome to your air time package" SMS messages from the SIM.

Somewhere along the line a few stray messages had not been deleted properly and caused problems until it was noted that the index number of the message did not match the reported one in the demo program (doh!)

Breaking out into a minicom session and directly listing the SMS messages highlighted this :

MyPi Industrial Raspberry Pi SMS Troubleshooting Step 1

You can see there that the message index numbers were 24 and 41 (and not 0 and 1!) so running the below commands then solved this problem and zapped the remaining messages

AT+CMGD=24

AT+CMGD=41

If you want to delete ALL the SMS messages in one go this can also be achieved via a single AT command, see the example below:

MyPi Industrial Raspberry Pi SMS Troubleshooting Step 2

Here we have a total of 6 messages, we can the use a AT command "AT+CMGD=1,4" to delete the lot in one go (this has been included as a handy command deleteallsmsmessages in /usr/local/bin)

MyPi Industrial Raspberry Pi SMS Troubleshooting Step 3

As expected once this has been competed the messages are now all deleted :

MyPi Industrial Raspberry Pi SMS Troubleshooting Step 4

These pages give further information on reading and deleting SMS messages

SMS Message Reading Link #1

SMS Message Reading Link #2

Contact us now to discuss your project

Ready to order, contact us today for pricing or samples

Contact Us