Wifi Unknown Error 0x0101 after flashing a new version of micropython. #17285
-
I flashed an updated version of micropython for my generic "ESP32-D0WDQ6-V3 (revision v3.1)" sold as a Lolin D32 ESP-WROOM32 4MB. And now I'm getting this error:
If I use the reset pin the main.py runs and crashes at that sta_if = network.WLAN(network.STA_IF), with a bit more detail:
I flashed it with the generic firmware from here: https://micropython.org/download/ESP32_GENERIC/ chip_id says: Any ideas? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Could you please try V1.23 ? Fox |
Beta Was this translation helpful? Give feedback.
-
You may be running out of memory. Please check https://github.com/orgs/micropython/discussions/15161 |
Beta Was this translation helpful? Give feedback.
-
Ah, thank you. I was running out of memory I think. Triggered by a combo of micropython update and updating screen/font code, with too many fonts in ram. I'm using the SSD1309 library with xglcd_font and 4 fonts of varying sizes, which on disk occupy 128K so must take lots of ram. I have it working now after substituting the largest font, but I think I'll have to restructure the code to load the largest 2 fonts as the user changes settings, rather than load all into memory and change which variable it points to. 😆 gc.memfree() is now showing between 45k and 82k free in the main loop with gc.enable(). Is that ok? |
Beta Was this translation helpful? Give feedback.
-
I tried newer micropython versions: v1.25.0 fails to run the code with this error:
and line 130 is the first line of this except block, possibly it is failing to open the alarmdata.txt due to memory problem too:
But v1.24.1 (edit: sometimes!) works with the largest font substituted for a slightly smaller font. mem_free shows 44k to 82k |
Beta Was this translation helpful? Give feedback.
Ah, thank you. I was running out of memory I think. Triggered by a combo of micropython update and updating screen/font code, with too many fonts in ram.
I'm using the SSD1309 library with xglcd_font and 4 fonts of varying sizes, which on disk occupy 128K so must take lots of ram. I have it working now after substituting the largest font, but I think I'll have to restructure the code to load the largest 2 fonts as the user changes settings, rather than load all into memory and change which variable it points to. 😆
gc.memfree() is now showing between 45k and 82k free in the main loop with gc.enable(). Is that ok?