??? 03/26/07 17:23 Read: times |
#135911 - Code; modem commands & responses Responding to: ???'s previous message |
Eugene Yong said:
... it is very messy to post a code here. Not if you do it properly, as Dave mentioned. Full instructions in the FAQs: http://www.8052.com/faqs.phtml?FAQ=120199 if( SBUF != 'n') // If character received is not carriage return, stroe character in array str[] Note that '\n' is not a carriage return (CR) - it is a line feed (LF). Note also that AT commands sent to the modem must end with the Command-Termination character specified in the S3 register - usually CR Responses from the modem are both preceded and followed by the Command-Termination character and the repsonse formatting character specified in the S4 register - usually LF Thus, you send "AT\r", the modem echoes "AT\r", then the modem responds with "\r\nOK\r\n" |