WLAN interface creation problem

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
hubrigant
Posts: 1
Joined: Fri Sep 24, 2021 5:56 pm

WLAN interface creation problem

Post by hubrigant » Fri Sep 24, 2021 6:31 pm

I have a custom conference badge that's got an ESP32-S2 chip on it that's running MicroPython v1.16-236-gb51e7e9d0. When I try creating the WiFi interface using the command

Code: Select all

wlan = network.WLAN(network.STA_IF)
I get the error

Code: Select all

RuntimeError: Wifi Unknown Error 0x0101
I've googled for that error, as well as just 0x0101, and can't find anything. I've also been trying to search the source code for 0x0101 and can't find anything there, either.

What does that error mean? How do I get past it?

edf012
Posts: 14
Joined: Sun May 09, 2021 8:51 pm

Re: WLAN interface creation problem

Post by edf012 » Mon Jan 24, 2022 5:43 pm

I am encountering the same issue after I moved the nvs partition to another physical location. Is there any resolution?

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: WLAN interface creation problem

Post by Roberthh » Mon Jan 24, 2022 5:55 pm

Try a full flash erase and reload the firmware.

edf012
Posts: 14
Joined: Sun May 09, 2021 8:51 pm

Re: WLAN interface creation problem

Post by edf012 » Tue Jan 25, 2022 6:37 pm

I tried a full flash erase. Same error:
I (14393) wifi:wifi driver task: 3ffde998, prio:23, stack:6656, core=0
I (14394) system_api: Base MAC address is not set
I (14394) system_api: read default base MAC address from EFUSE
I (14434) wifi:wifi firmware version: c44a5e7
I (14435) wifi:wifi certification version: v7.0
I (14435) wifi:config NVS flash: enabled
I (14435) wifi:config nano formating: disabled
I (14440) wifi:Init data frame dynamic rx buffer num: 32
I (14445) wifi:Init management frame dynamic rx buffer num: 32
I (14450) wifi:Init management short buffer num: 32
I (14455) wifi:Init dynamic tx buffer num: 32
W (14459) wifi:esf_buf_setup_static: alloc eb fail
I (14464) wifi:Deinit lldesc rx mblock:0
I (14467) wifi:Deinit lldesc rx mblock:0
I (14471) wifi:Deinit lldesc rx mblock:0
I (14475) wifi_init: rx ba win: 6
I (14478) wifi_init: tcpip mbox: 32
I (14482) wifi_init: udp mbox: 6
I (14486) wifi_init: tcp mbox: 6
I (14490) wifi_init: tcp tx win: 5744
I (14494) wifi_init: tcp rx win: 5744
I (14499) wifi_init: tcp mss: 1440
I (14503) wifi_init: LWIP IRAM OP enabled
9:INFO:ubiwifi:WLAN(network.STA_IF) ERROR RuntimeError('Wifi Unknown Error 0x0101',)

Do you see anything in the init that might cause a problem?
Thanks!

edf012
Posts: 14
Joined: Sun May 09, 2021 8:51 pm

Re: WLAN interface creation problem

Post by edf012 » Fri May 13, 2022 12:00 pm

I also encountered this issue on an ESP32-WROVER-IE based product. The 0x101 issue is "out of memory". Internal memory, that is. I had to run idf.py menuconfig and re-arrange how memory was being used. I eliminated ALL bluetooth functionality, since our product doesn't use it. I also allowed stacks to be placed in external memory. These actions freed up enough internal memory to allow the WiFi initialization to complete successfully. Espressif's documentation is essentially crap. You have to figure these things out on your own.

edf012
Posts: 14
Joined: Sun May 09, 2021 8:51 pm

Re: WLAN interface creation problem

Post by edf012 » Fri May 13, 2022 2:59 pm

Oh and don't forget to get the MP heap pointer fix.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: WLAN interface creation problem

Post by pythoncoder » Sat May 14, 2022 8:32 am

hubrigant wrote:
Fri Sep 24, 2021 6:31 pm
I have a custom conference badge that's got an ESP32-S2 chip on it that's running MicroPython v1.16-236-gb51e7e9d0...
That is quite an old version. I would try the latest daily build.
Peter Hinch
Index to my micropython libraries.

Post Reply