Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By pquinton
#9617 Hi,

I've got an ESP8266 running v0.95 from here: http://www.electrodragon.com/w/Wi07c#Latest_firmware.

I've got it wired to an AT Tiny841 and I'm experiencing some strange behaviour with carriage returns. Everything works as expected until I initiate a AT+CIPSEND. Essentially the ESP8266 drops carriage returns and only passes through line feeds to the web server at the other end. A side effect is that the AT+CIPSEND stalls waiting because it thinks it's one character short. If you send some random data on the end it forces the AT+CIPSEND to complete and send the string to the webserver.

Take the following string:
Code: Select allGET /cgi-bin/log_elec_value.pl?elecval=4276 HTTP/1.0\r\n


When I run wireshark on the web server the "\r" has been dropped.

The obvious reason is that I've got something doing \r conversion in my code, which I've not. I've also confirmed that the string ( which is in flash ) is intact and the \r is in there.

Has anyone come across this before?
Thanks.
Phil.
User avatar
By pquinton
#9724 I've done some more playing around and I can't get it to send '\r'. It just gets filtered out. Transparent mode, however, works.

Some tips if you are attempting to use transparent mode direct from code, rather than by hand over a serial terminal:

1. You need to wait between 500 and 1000ms (1 sec) after your last transmission before sending +++ (no CRLF)
2. You need to wait between 500 and 1000ms (1 sec) after you send +++. If you do not wait, it will assume you want to send +++ to the server you are connected to.

On another note, I'm send to an apache server and it requires "\r\n\r\n" at the end of the GET string to consider it a valid request. I've seen some example code on the net that only uses one set of "\r\n".

Hope this helps someone.
Thanks,
Phil.