hello all
I'm working with a modem reading sms and is working very well.I need to prevent a possible problem in my code that is expecting to read sms in location from 0-9 in modem memory.In case modem is offline and someone seend sms to it I will lose control of reading sms from it because I dont know any more on what position the sms memory are.
There is a AT command that list me all the sms on the memory but give me lots of data that will certain overload the Serial buffer if I try to read it at once.The location is just after "CMGL: ", for example "+CMGL: 1,"REC READ","+351xxxxxxxx",,"12/03/15,12:34:17+00"
123" says there is a message on first location and so on
All I need is the final position like 11 on this case above to then do a if cycle to clean down all sms until position 1
Can someone give me a hint how can I just filter this and discard all the rest
at+cmgl="all"
+CMGL: 1,"REC READ","+351xxxxxxxx",,"12/03/15,12:34:17+00"
123
+CMGL: 2,"REC READ","+351xxxxxxxx",,"12/03/15,12:43:10+00"
123
+CMGL: 3,"REC READ","+351xxxxxxxx",,"12/03/22,23:25:43+00"
123
+CMGL: 4,"REC UNREAD","+351xxxxxxxx",,"12/03/23,17:41:11+00"
1
+CMGL: 5,"REC UNREAD","+351xxxxxxxx",,"12/03/23,17:41:50+00"
A
+CMGL: 6,"REC UNREAD","+351xxxxxxxx",,"12/03/23,17:42:06+00"
B
+CMGL: 7,"REC UNREAD","+351xxxxxxxx",,"12/03/23,17:42:25+00"
M
+CMGL: 8,"REC UNREAD","+351xxxxxxxx",,"12/03/23,17:42:41+00"
Mj
+CMGL: 9,"REC UNREAD","+351xxxxxxxx",,"12/03/23,17:42:58+00"
Jg
+CMGL: 10,"REC UNREAD","+351xxxxxxxx",,"12/03/23,17:43:10+00"
6
+CMGL: 11,"REC UNREAD","+351xxxxxxxx",,"12/03/23,17:43:37+00"
5
Thanks for all