I can send and receive SMS in "text mode" using a Siemens GSM module connected to PIC.
I'm sending 2 chars AB from a remote mobile phone. In the PIC, it can receive AB.
I have declared
data var byte [4]
message var byte [4]
Code:ws: HSEROUT["AT+CMGL=",34,"REC UNREAD",34,13,10] HSERIN 5000,ws,[WAIT("REC UNREAD"),skip 3,str telbr\12,skip 12,str TIME\6,skip 8,STR message\3\13] data[1] ="A" data[2]="B" if I compare message[1] with data[1], message[2] with data[2] both are equal.
However, if I were to sent ABC SMS to PIC, the following comparison give an error. Why?
Code:ws: HSEROUT["AT+CMGL=",34,"REC UNREAD",34,13,10] HSERIN 5000,ws,[WAIT("REC UNREAD"),skip 3,str telbr\12,skip 12,str TIME\6,skip 8,STR message\4\13] data[1] ="A" data[2]="B" data[3]="C" if I compare message[1] with data[1], message[2] with data[2], message[3] with data[3], error in the comparison




Bookmarks