??? 03/30/10 10:02 Read: times |
#174621 - how to read a reply ?? Responding to: ???'s previous message |
I am sucessfully able to turn on and off 4 LEDS connected to my microcontroller by sending commands from the serail port like "TURN LED 1 ON", TURN LED 1 OFF" but in this program i am using a terminating character '#' so that the microcontroller is able to know that the presend command has completed and it needs to compare the string that is recieved to the stored strings. what i do is that i repace the '#' with a ' ' and then work on it.
Now the problem is that the GSM module sends no such terminating character. I send AT<enter> : 65 84 13 10 I get AT<enter>OK : 65 84 13 13 10 79 75 13 10 I am using COMMCHK in which i am able to see all the characters that have been sent back. now how should i let microcontroller know that one reply ahs ended and it needs to compare it and get ready for the next one. i was thinking about the use of 13 10 but bthe as well appear many times in a single reply.. |