AT+ Command to reply HTTP GET with error

MK32
Posts: 2
Joined: Thu Oct 26, 2017 5:01 am

AT+ Command to reply HTTP GET with error

Postby MK32 » Thu Oct 26, 2017 5:14 am

Hi guys,

I have configured a ESP8266 as web server with AT commands. When the browser connects, it sends me a request GET /favicon.ico to which I want to reply with an ERROR 404 Not Found.

How can i do it in the data packet sent in the response to +IPD?

Thanks for your reply.

Her Mary
Posts: 537
Joined: Mon Oct 27, 2014 11:09 am

Re: AT+ Command to reply HTTP GET with error

Postby Her Mary » Thu Oct 26, 2017 10:29 am

You can send data by command AT+CIPSEND.

MK32
Posts: 2
Joined: Thu Oct 26, 2017 5:01 am

Re: AT+ Command to reply HTTP GET with error

Postby MK32 » Fri Oct 27, 2017 1:01 am

Yes I know, but the browser interprets it as data, not as an error message

Her Mary
Posts: 537
Joined: Mon Oct 27, 2014 11:09 am

Re: AT+ Command to reply HTTP GET with error

Postby Her Mary » Tue Oct 31, 2017 7:51 pm

I think AT+CIPSEND sends the TCP data, so you need to make a HTTP packet of your error message "404 Not Found", and then send the HTTP packet by the CIPSEND command.

Who is online

Users browsing this forum: No registered users and 151 guests