Can't send \r\n after AT+CIPSEND using serial
Posted: Thu Apr 16, 2015 5:24 pm
I'm trying to generate some HTTP headers with an Arduino to send before the data (a json object) in a TCP package.
This is the code I'm using, but I can't get the \r\n characters to be sent. I'm using wireshark to sniff the packets, and only one \n (0x0A) is been sent. I also used sscom to send the commands and obtained the same result. Any ideas?
Code: Select all
String header = "HTTP/1.0 200 OK\r\n\r\n";
Serial.println(String(header.length()));
if(Serial.find(">"))
Serial.println(header);
.....
This is the code I'm using, but I can't get the \r\n characters to be sent. I'm using wireshark to sniff the packets, and only one \n (0x0A) is been sent. I also used sscom to send the commands and obtained the same result. Any ideas?