So, you send:
at+cpms="SM"
HSEROUT["at+cpms=",34,"SM",34,13]
Then the phone sends:
+CPMS: 1,15,1,15,1,15
OK
HSERIN 2000,IP,[WAIT("OK")]
(But all you're checking for is the OK, not the rest of the items. How do you know the items are actually there?)
Then you send:
AT+CMGR=1
HSEROUT["AT+CMGR=1",13,10]
And the phone sends:
+CMGR: 1,,23
HSERIN 2000,LI,[WAIT("OK")]
(Where's the OK?)
0791539126010000240C915391663921010000807070819341 400453FA1B0E
OK
HSERIN 2000,POR,[WAIT("OK"),STR myarray\62]
(Where's the OK that the line is supposed to start off with? I see it at the end, not at the beginning.)
It looks to me like you need to rethink your code...a bunch. The order in which you are sending and receiving items to and from the phone doesn't match up with the order in which the phone is actually going to receive and send those items, at least not the way you've written your program.
Bookmarks