Hi, that a whait for a ok 2s if dont came goto POR if came then store the "file" to mydata.
AT+CMGR=1
+CMGR: 1,,23
0791539126010000240C915391663921010000807070819341 400453FA1B0E
OK
Its beter like this i think HSERIN 2000,POR,[WAIT("+CMGR: 1,,23"),STR myarray\62] ??
LOOP:................
HSERIN 2000,LOOP,[WAIT("OK")] Like this?
IP:..................
HSERIN 2000,IP,[WAIT("OK")] Like this ?
I do not at home the pic/gsm...... to test it only tomorow
Thanks for caring![]()
Last edited by camolas; - 10th July 2008 at 21:21.
What does this statement mean to you?
Code:
HSERIN 2000,POR,[WAIT("OK"),STR myarray\62]
That mins to me that code whaits for a ok 2s if dont came gos to POR if it came then store the "file" to mydata. (have answered on the before post alredy)
After realise that a change the code like i posted in the before post.
Please give me you feedback on this.
..............................................
LOOP:
HSEROUT["AT+CPMS=",34,"SM",34,13]
HSERIN 2000,LOOP,[WAIT("OK")]
IP:
HSEROUT["AT+CMGR=1",13,10]
HSERIN 2000,IP,[WAIT("OK")]
IT:
HSERIN 2000,IT,[WAIT("+CMGR: 1,,23"),STR myarray\62]
POR:
if myarray[0]="0"then
'0791539126010000240C91539166392101000080707081934 1400453FA1B0E
goto success
endif
goto LOOP
success:
High PortD.2
End
...............
Last edited by camolas; - 10th July 2008 at 21:52.
Here you have to skip two bytes: HSERIN 2000,IT,[WAIT("+CMGR: 1,,23"),STR myarray\62]
Why? because the string is on the next line as you show. So the phone is sending two more bytes after the 1,,23 and these bytes are.... surprise invisible!! They are 13 and 10. That's why your string appears on the next line. So correct the line as this:
HSERIN 2000,IT,[WAIT("+CMGR: 1,,23"),skip 2, STR myarray\62]
Now you will not lose your first and precious "0" byte!
As for the timeouts, I cannot tell you if 100, 200, 500 or 5000 are enough, as each phone has its own respond times. Some phones have even 15 sec to start responding after reset, or 50sec to erase all messages!
You can test it with timer, but that is another big issue...
Ioannis
Last edited by Ioannis; - 10th July 2008 at 22:45.
Hi,
Thanks a lot men with out the all hellping and caring people and i do not made to this point.
Tomorow i will test it and post it.
Thanks a lot![]()
Bookmarks