Parsing esp at commands

michael98
Posts: 3
Joined: Tue May 31, 2022 10:25 am

Parsing esp at commands

Postby michael98 » 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!

ESP_Sun
Posts: 326
Joined: Thu Dec 30, 2021 9:52 am

Re: Parsing esp at commands

Postby ESP_Sun » Mon Jun 13, 2022 2:36 am

Hi,

The OK you said sometimes starts with \r\n and sometimes doesn't start with \r\n, I guess it depends on the order in which OK is returned, maybe you can look at the AT+CIPSEND and AT+CIPRECVDATA command documentation(https://docs.espressif.com/projects/esp ... t-commands), maybe you can find Why is there such a difference, in fact, I am a little curious about the "read 80 bytes\r\r\n" you tested, can you tell me which version of the log you tested?

Who is online

Users browsing this forum: No registered users and 18 guests