Ok, so don't you think that by pausing for 1/2 second after sending the command, you might miss the incoming data, or at least maybe the beginning of it, thereby causing you to think you might not have gotten anything at all?
Code:LOOP: HSEROUT["at+cpms=",34,"SM",34,13] : PAUSE 500 HSEROUT ["AT+CMGR=1",13,10] : PAUSE 500
Hi,
Ive put HSEROUT["at+cpms=",34,"SM",34,13] and HSEROUT ["AT+CMGR=1",13,10] and them it give me error back, sow back to HSEROUT ["AT+CMGR=1",13,10]:PAUSE 500 and
HSEROUT["at+cpms=",34,"SM",34,13] : PAUSE 500 and then i thang the HSERIN 5000,POR,[WAIT("OK"),STR myarray\62] to HSERIN 500, .............. data came faster but keep looping
then to HSERIN 1000,............. same problem
Just because I'm using l/c letters doesn't mean you have to change yours...
So what does your program look like now...
And again, if your phone responds inside of a second, usually faster, and you add in a pause after sending the command that will get a response, what's going to come first, the pause or the response? And are you going to miss it or not?
This is the last time I am going to state this: DON't use pause statements or ignore the responses of the serial devices. When you send a command ALWAYAS check for the response.-
Ioannis
Hi,
Let see if i get it.
LOOP:
HSEROUT["at+cpms=",34,"SM",34,13] : PAUSE 500
HSEROUT ["AT+CMGR=1",13,10] : PAUSE 500
Change to.
LOOP:
HSEROUT["at+cpms=",34,"SM",34,13]
HSERIN 5000, [WAIT("OK")]
HSEROUT ["AT+CMGR=1",13,10]
HSERIN 5000, [WAIT("OK")]
Is this what you ment?
Thanks for caring.
Bookmarks