Page 1 of 1

WLAN interface creation problem

Posted: Fri Sep 24, 2021 6:31 pm
by hubrigant
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?

Re: WLAN interface creation problem

Posted: Mon Jan 24, 2022 5:43 pm
by edf012
I am encountering the same issue after I moved the nvs partition to another physical location. Is there any resolution?

Re: WLAN interface creation problem

Posted: Mon Jan 24, 2022 5:55 pm
by Roberthh
Try a full flash erase and reload the firmware.

Re: WLAN interface creation problem

Posted: Tue Jan 25, 2022 6:37 pm
by edf012
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!

Re: WLAN interface creation problem

Posted: Fri May 13, 2022 12:00 pm
by edf012
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.

Re: WLAN interface creation problem

Posted: Fri May 13, 2022 2:59 pm
by edf012
Oh and don't forget to get the MP heap pointer fix.

Re: WLAN interface creation problem

Posted: Sat May 14, 2022 8:32 am
by pythoncoder
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.