tonyp7 / esp32-wifi-manager

Captive Portal for ESP32 that can connect to a saved wireless network or start an access point where you can connect to existing wifis.
MIT License
664 stars 217 forks source link

Unable to get wifi list on android Phone. #56

Closed ankur2854 closed 4 years ago

ankur2854 commented 4 years ago

I am able to connect to ESP32 AP. it open up a HTML page but there is no Wi-Fi list in that page. I am trying this on android phone as well as on windows phone. Not working on android but the same is working on windows phone. Can anyone help me out. Thanks in advance.

hanhdt commented 4 years ago

The library used to Ajax with jQuery v3.2.1 and get WiFi list data from HTTP API. It might be not worked on Android WebView. That is why you don't see anything on Android but it's working fine on other regular browsers (Chrome/Firefox).

It can be solved if you try to upgrade included jQuery lib with your own one.

ankur2854 commented 4 years ago

I tried with Chrome and Firefox browser on android phone. Still not working.

cgfoed commented 4 years ago

Did you compile it from scratch? What Android are you using? I had this error once when I manipulated the event loop.

be sure that your init ESP_ERROR_CHECK(esp_event_loop_init(wifi_manager_event_handler, NULL));

as well as your event handler esp_err_t wifi_manager_event_handler(void *ctx, system_event_t *event) { .... } work properly

ankur2854 commented 4 years ago

I am using Mi Phone (android 8). But i tried with different phones. I am not able to get the list on any android as well as IOS phone. On windows laptop it only show list on internet explorer rest no list on other browsers. Yes, ESP_ERROR_CHECK(esp_event_loop_init(wifi_manager_event_handler, NULL)); and wifi_manager_event_handler both are working fine. log.txt

As I am from embedded background, I have no clue about this issue. Please help me out. Thanks in advance.

tonyp7 commented 4 years ago

Hello guys, I am on a business trip very far away from any of my dev environments and test device so no idea how serious this is. If you’re saying it works on a desktop browser it could be an issue with the jquery but tbd!

ankur2854 commented 4 years ago

Please suggest me how to resolve jquery issue.

ankur2854 commented 4 years ago

I got the issue. we got an extra character on server in code.js file due to which browser is unable to render from code.js file. Error: In http_server.c Line 186 : netconn_write(conn, code1_js_start, code1_js_end - code1_js_start -1 , NETCONN_NOCOPY);

Its working fine now. Thanks for all the support.

tonyp7 commented 4 years ago

@ankur2854 what is your IDE/build system? This issue appears in platform.io but not on a classic make environment as far as I know