WiFiManager icon indicating copy to clipboard operation
WiFiManager copied to clipboard

Problem with WiFi.scanNetworks();

Open nhaduy99 opened this issue 9 years ago • 7 comments

Hi, I am using this library but sometimes the config AP portal doesn't show off when scanning the local wifi (page 192.168.4.1/?wifi). I check on the Serial Monitor: *WM: Scan done *WM: Yamaha *WM: -60 *WM: My Dung_plus *WM: -87 *WM: Sent config page

Sometimes the web appears with missing parts and one weird word of: "CTYPE html>" appeared. I searched that this wear word appears when the web is not fully HTML website.

How do I fix this?

Best regards, Seppy

nhaduy99 avatar Apr 08 '17 21:04 nhaduy99

I'm having the same issues; especially when there are a lot of wifi networks around.

svh1985 avatar Apr 29 '17 09:04 svh1985

How many aps? I have 25 and have never encountered this

tablatronix avatar Aug 27 '17 00:08 tablatronix

I can test it when I'm back home, we have 40+ WiFi networks from all the neighbours at home.

svh1985 avatar Aug 27 '17 08:08 svh1985

k interestingly enough I am having a similar symptom unrelated to this issue

tablatronix avatar Aug 27 '17 13:08 tablatronix

I'm guessing that it has something to do with the ESP running out of memory when it has to do all the "find & replace" actions during the HTML output generation.

svh1985 avatar Aug 27 '17 14:08 svh1985

Yeah I am going to check the output and see whats mangled, oddly mine only occurs if i am not calling handleclient fast enough, so there is some asynchronous problems with the server handling.

tablatronix avatar Aug 27 '17 15:08 tablatronix

_apname is const char and getting lost refactoring in my dev branch required me to change this anyway for non blocking mode, and inadvertently fixes this bug also. Basically change _apname and _appassword to strings, much easier to deal with.

Possible we will have to restructure _customHeadElement as well

tablatronix avatar Aug 27 '17 15:08 tablatronix