Parsing esp at commands
Posted: Fri Jun 10, 2022 7:36 am
Hello,
I was looking into the documentation of esp at commands but I could'nt find information about how messages are seperated with CRLF.
When I look into the messages sent by the ESP, I see some messages start and ends with \r\n and some only ends with \r\n.
Take the message "OK" for example.
After receiving data with AT+CIPRECVDATA command the response contains first a message "to read 80 bytes\r\r\n" followed by the data to receive and finally: OK\r\n
However when I send AT+CIPSEND command, the response starts with \r\nOK\r\n followed by \r\n>
So in one case the message doesn't start with \r\n and in the other case it does start with \r\n.
This looks very inconsistent. Can somebody explain to me when the start characters and end characters are exactly used?
Thank you!
I was looking into the documentation of esp at commands but I could'nt find information about how messages are seperated with CRLF.
When I look into the messages sent by the ESP, I see some messages start and ends with \r\n and some only ends with \r\n.
Take the message "OK" for example.
After receiving data with AT+CIPRECVDATA command the response contains first a message "to read 80 bytes\r\r\n" followed by the data to receive and finally: OK\r\n
However when I send AT+CIPSEND command, the response starts with \r\nOK\r\n followed by \r\n>
So in one case the message doesn't start with \r\n and in the other case it does start with \r\n.
This looks very inconsistent. Can somebody explain to me when the start characters and end characters are exactly used?
Thank you!