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.
+1 vote
121 views 0 comments
by anonymous

From "gsmctl -h"

-S -l, --sms --list <TYPE> List SMS by type [all, read, new]

I take it that there should be a difference between "all, read and new" SMS in the list. But all SMS are marked as read at delivery / receiving. So using the term [new] will never work.

To replicate:

1. Sending an SMS to my cell phone.

root@Teltonika-RUTX11:~# gsmctl -S -s "((withheld cell number)) Foo Bar, this is a test"

OK

2. Send a reply from my cell phone to the routers SIM / number.

3. Without reading it, list the received SMS's

root@Teltonika-RUTX11:~# gsmctl -S -l all

Index: 1

Date: 2021-10-30 05:42:49

Sender: ((withheld cell number))

Text: Received

Status: read

------------------------------

As shown, the message already are shown as read. This is making it difficult to write script aimed towards undrad messages only. It's still doable, but having this issue fixed would be great as I'm heavily dependent on scripting my router for answering SMS's. 

1 Answer

0 votes
by anonymous
Hello,

This is because SMS_utils always first read SMS when checking if it is an SMS command. So that is why the SMS state is always shown as read. But thank you for your comment. I will check with RnD if there is a plan to change this logic, and I will get back to you.

Regards,