FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
655 views 0 comments
by anonymous
Hi there,

Is there any api or ssh command to read and then delete all SMS messages in the modem storage?

1 Answer

0 votes
by anonymous

Hello,

The simplest way to read/send/delete messages would be by doing it via WebUI Services -> Mobile utilities -> Messages -> Read messages section.

If your preference is CLI, you may need to set message format to text with the following command:

  • gsmctl -A 'AT+CMGF=1' 

then you can list received SMS with one of the following commands:

  • gsmctl -A 'AT+CMGL="REC UNREAD"'
  • gsmctl -A 'AT+CMGL="REC READ"'
  • gsmctl -A 'AT+CMGL="ALL"'

To read a specific message, you need to specify the index of the message in the following command:

  • gsmctl -A 'AT+CMGR=<index>'

Replace <index> with an integer.

To delete message, use this command:

  • gsmctl -A 'AT+CMGR=<index>'

Replace <index> with an integer. Several messages can be deleted by writing more index numbers separated by a comma ",".

For more details and commands you can refer to EC25 modem's AT commands manual.

Best regards,

Best answer