ESP32: AP mode issue in the Google Chrome

john_peter
Posts: 7
Joined: Wed May 15, 2019 7:36 am

ESP32: AP mode issue in the Google Chrome

Postby john_peter » Wed May 15, 2019 10:37 am

Hello,
When I am testing with the AP mode of the ESP32 with ESP IDF v3.1.3. The Wi-Fi module which is set as an AP mode was successfully connected with Mobile or Tablet with the configured SSID and Password. The request sent from the browser to the ESP32 and response page sent to the browser from the ESP32 to be displayed on the webpage(http:\\192.168.4.1:80) is actually not displayed on the latest chrome version(v74.0.3729.136)
Same code was able to show the response page successfully with other browser's like Firefox (v66.0.5),Opera(v51.3.2461.138727). But in the latest version of chrome, the incognito window is able to give the response page successfully. Also in older version of the chrome(v71.0.3578.99), the response page is successfully posted on the browser irrespective of incognito or normal user mode.

Below screenshot illustrates, the response page received on unsuccessful posting on the web page with chrome's normal user window.
Chrome_Not_Responding.png
Chrome_Not_Responding.png (74.6 KiB) Viewed 3248 times
Below screenshot illustrates, the response page received on successful posting on the web page with chrome's incognito window.
AP_Post.jpg
AP_Post.jpg (109.75 KiB) Viewed 3248 times
In the code, the ESP32 module was custom coded so that the Wi-Fi is configured as AP mode and will act as a http server with below initialization:
AP_mode.c
(8.39 KiB) Downloaded 562 times
• Initialized the ESP32, Wi-Fi as AP mode and the DHCP was enabled with the IP address of 192.168.4.1 and port as 80.
• A HTTP server sends the HTML page to the clients connected to the module using the configured ssid and password.
• Once the webpage is requested via IP address on the devices(like mobile, tablet and PC), a html response page printing "AP Mode example!" will be sent from the esp32 module through http server.

Browsers providing the successful response page once the webpage is accessed:
i. Google Chrome( v71.0.3578.99)
ii. Opera( v51.3.2461.138727)
iii. Firefox(v66.0.5)

Browsers not providing the successful response page once the webpage is accessed:
i. Google Chrome(v74.0.3729.136)


Can anyone help me understand, why the AP mode in ESP32 is working fine in Chrome's incognito mode and not in the normal user mode of the latest version of the Chrome?

Thanks,
John

ESP_Sprite
Posts: 9025
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32: AP mode issue in the Google Chrome

Postby ESP_Sprite » Thu May 16, 2019 1:42 am

Your code assumes a browser always sends one request at the same time; you e.g. only have one temp_buff that is shared by any request that happens concurrently. My guess would be that that assumption is wrong. Suggest you either change your code, or use e.g. Wireshark to find out what exactly is going on.

Who is online

Users browsing this forum: Bing [Bot] and 158 guests