I am using the AT Command set to run the ESP32 as a server.
In my test configuration I am servering a minimal webpage consisting of the following:
<h1>Hello</h1>
Every device I connect (Android, and WIndows) have not problem.
But when I try the iPad, I do not get any display in the brower, just the following message
"Safari cannot open the page because the network connection was lost"
This happens if I close the connection immediately after sending the html or if I wait a bit.
Is there other information I need to send for Apple Devices?
ESP32 Server and Apple Devices
-
- Posts: 9770
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP32 Server and Apple Devices
Is that the only thing you send over the socket? Http needs a header as well.
Re: ESP32 Server and Apple Devices
That is the only thing I send and it works fine for Android and PC devices.
What information would need to be in the header?
What information would need to be in the header?
-
- Posts: 9770
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP32 Server and Apple Devices
That's all documented in the relevant RFC; suggest you read that first otherwise you will keep on running into situations where you break the protocol. In this specific case, you break the protocol by not sending any headers; behaviour in situations like that is undefined, and as you see, some browsers will try to make sense of what you sent anyway, others will just crap out.
Re: ESP32 Server and Apple Devices
Here is a useful site for you that should help you chug along, although it mostly covers HTTP 1.0, with a brief passing mention of HTTP 1.1
http://www.jmarshall.com/easy/http/
http://www.jmarshall.com/easy/http/
Re: ESP32 Server and Apple Devices
Thanks for the help.
I just needed to add the HTTP/1.1 200 OK and it is working.
I just needed to add the HTTP/1.1 200 OK and it is working.
Who is online
Users browsing this forum: No registered users and 84 guests