New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

esp8266 nodemcu - runs out of memory loading page #5

Open
nostahl opened this Issue Jan 18, 2018 · 8 comments

Comments

Projects
None yet
4 participants
@nostahl

nostahl commented Jan 18, 2018

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

This comment has been minimized.

Owner

tayfunulu commented Jan 18, 2018

is it possible to share error message from serial connection.

@nostahl

This comment has been minimized.

nostahl commented Jan 18, 2018

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

This comment has been minimized.

Collaborator

ThomasWaldmann commented Jan 19, 2018

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

@nostahl

This comment has been minimized.

nostahl commented Jan 20, 2018

yes there are a lot in this area.

@ThomasWaldmann

This comment has been minimized.

Collaborator

ThomasWaldmann commented Jan 20, 2018

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

This comment has been minimized.

nostahl commented Jan 20, 2018

other wifi managers work with the same list of results.

what can be done to do this with your version?

@simongabor

This comment has been minimized.

simongabor commented Jan 22, 2018

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

This comment has been minimized.

Collaborator

ThomasWaldmann commented Jan 25, 2018

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

tayfunulu added a commit that referenced this issue May 25, 2018

Merge pull request #7 from trailhead/master
fix for #5 out of memory on esp8266
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment