8

First things first, if there was an ESP8266 StackExchange, I would post this there.

I am setting up a web server that will programmaticly be controlled from an external Python script, and I am currently able to send this server data using this script, but I don't receive an HTTP response back when I do, so the external script crashes.

I have googled around and not found much on this, so the question is How do I, From the Arduino, using an ESP8266 send an HTML response code?

Butters
  • 393
  • 2
  • 11

1 Answers1

7

After countless Trial/error attempts, I was able to put together the proper sequence.

AT+CIPSEND=0,40  \\Set this for your current connection ID and payload length.
HTTP/1.1 200 OK\r\nConnection: close\r\n\r\n  
AT+CIPCLOSE=0  \\Set this for your current connection ID

Send these commands with the arduino, and it should exit successfully. You can also flush out the HTTP line with any other information you would like to include, as defined in the rfc2616 (HTTP/1.1) standard

Butters
  • 393
  • 2
  • 11