Hello,
In ESP32 module, we recently found an issue with AP mode. When a device enters the AP mode, the response page on the Google Chrome's latest version i.e. 74.0.3729.136, doesn't really show-up.
In the code, WiFi was initialized as AP mode and was assigned with an IP address of 192.168.4.1 and port as 80.
A basic html page printing "HELLO WELCOME" was sent to the device connected to the esp32 module using the set ssid and password with DHCP enabled in the code. Once the mobile/tablet was connected to the esp32 module successfully, on accessing the http webpage(http://192.168.4.1:80), "HELLO WELCOME" will be displayed. The response received from the browser are attached to the post.
Below is the example code used However the response page on various browsers like Mozilla firefox(v66.0.4), Opera(v51.3.2461.138727) and Google Chrome(v71.0.3578.99) does work absolutely fine.
Below is the screenshot of the response received, when a successful response is posted on the browser with older version of chrome(v71.0.3578.99) The below screenshot is the response received for the unsuccessful posting of the "HELLO WELCOME" on the latest version of the chrome (v74.0.3729.136) .
ESP IDF Used: esp-idf-v3.1.3
Hope to see the response ASAP,
David
AP MODE ISSUE WITH CHROME BROWSER
Re: AP MODE ISSUE WITH CHROME BROWSER
The issue is your not properly sending the data in a way the browser will understand it properly.
I.E. is it text/html, image/x-icon, application/javascript and so on.
Then you set it, httpd_resp_set_type(req, "text/html");
then you send it
httpd_resp_send(req,...)
Have a look at the examples.
https://github.com/espressif/esp-idf/tr ... /protocols
The browsers wants to know when it receives data what kind of data it is.send(clientSock, "HELLO WELCOME", strlen("HELLO WELCOME"), 0);
I.E. is it text/html, image/x-icon, application/javascript and so on.
Then you set it, httpd_resp_set_type(req, "text/html");
then you send it
httpd_resp_send(req,...)
Have a look at the examples.
https://github.com/espressif/esp-idf/tr ... /protocols
Who is online
Users browsing this forum: MicroController and 61 guests