Hi,
Please explain what you said.
Now i want to read a sms line code HSEROUT ["AT+CMGR=1",13,10]
but i do not now read it and compare with the IF SMS="pdu array" then .....
Can you please hellp me on that?
Thanks
Hi,
Please explain what you said.
Now i want to read a sms line code HSEROUT ["AT+CMGR=1",13,10]
but i do not now read it and compare with the IF SMS="pdu array" then .....
Can you please hellp me on that?
Thanks
pbp does not have string comparison commands (Hey Darrel, what about a macro for this??)
So you have to compare one character at a time using nested if-then.
Ioannis
Hi,
Sow i can not store the sms full received pdu array as var word and then compar it with IF...THEN... ?
Im very new at all this can you please give me a example sow i can see how to do?
Thanks
Last edited by camolas; - 7th July 2008 at 19:17.
You ca store in an array of bytes whatever you want, but cannot do this if myarray="1234567890" then do that.
You have to do a nested if-then comparison like that:
if myarray[1]="1" then
if myarray[2]="2" then
if myarray[3]="3" then
....
if myarray[0]="0" then
goto success
endif
....
endif
endif
endif
no_success:
success:
Of course this can be done with a for-next loop more elegant, but for the sake of simplicity I left it like that.
Ioannis
Hi,
Thanks for caring one more timesow i need:
...............
myarray var byte
...........
...........
Loop:
HSEROUT ["AT+CMGR=1",13,10]
Pause 1000
Hserin 6000,loop,[STR myarray]
if myarray[1]="1" then
if myarray[2]="2" then
if myarray[3]="3" then
....
if myarray[0]="0" then
goto success
endif
....
endif
endif
endif
no_success:
success:
Is ok the code?
Thanks
No. You need array not byte variable. Read the Manual. I am not going to teach you the abc's of PBP! That is what YOU have to do! Sorry...
I wrote on a previous post that you have to read back what the module is responding. By waiting 1 sec. I am sure, don't know about you, that you are quaranteed to lose data. Wait for the OK and read immediately.
The above was an example! You have to complete the puzzle...
No, I don't think is 100% OK, as I don't know PDU as I stated before and the example I gave has nothing to do with PDU that needs to be decoded first.
Last, you are welcome, but please, read, read, read the PBP manual as to how the compiler is used. Blink a LED and then try this hardcore stuff...
Ioannis
Bookmarks