tayfunulu / WiFiManager

WiFi manager for ESP8266 - ESP12 - ESP32 - micropython
MIT License
345 stars 104 forks source link

esp8266 nodemcu - runs out of memory loading page #5

Open nostahl opened 6 years ago

nostahl commented 6 years ago

just tried this on MicroPython 1.9.3 on esp8266 nodemcu board and it lets you connect but when you try to access 192.168.4.1 it runs out of memory.. loads on esp32 ok though.

tayfunulu commented 6 years ago

is it possible to share error message from serial connection.

nostahl commented 6 years ago

I don't have it handy atm. but it was with MicroPython version 1.9.3 and then used ampy to upload the files to the esp8266

ThomasWaldmann commented 6 years ago

I had a quick look at the code. Do you have a lot of ssids visible when this happens?

nostahl commented 6 years ago

yes there are a lot in this area.

ThomasWaldmann commented 6 years ago

Then the datastructure with the wifi scan results and the html content list built from that will be rather big, maybe that is the problem (on very low RAM devices).

nostahl commented 6 years ago

other wifi managers work with the same list of results.

what can be done to do this with your version?

gabor-simon commented 6 years ago

same problem here on nodemcu (ESP12E). There are 6-9 available ssids around me. I tried to remove mqtt reference from my code to save memory but result is the same. Traceback (most recent call last): File "main.py", line 61, in File "wifimgr.py", line 60, in get_connection File "wifimgr.py", line 310, in start File "wifimgr.py", line 303, in start File "wifimgr.py", line 178, in handle_root MemoryError: memory allocation failed, allocating 2848 bytes

ThomasWaldmann commented 6 years ago

maybe we could emit the html piece by piece instead of assembling the whole body.