Can't do a WiFi scan, RuntimeError: Wifi Unknown Error 0x0102

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
giraffesinspace
Posts: 1
Joined: Sun Sep 27, 2020 8:24 pm

Can't do a WiFi scan, RuntimeError: Wifi Unknown Error 0x0102

Post by giraffesinspace » Sun Sep 27, 2020 8:32 pm

I've got an ESP32 devkitc board here and I'm unable to connect it to wifi or even do a wifi scan. The micropython bin I'm using is

esp32-idf3-20200902-v1.13.bin

Here is the code that's generating the runtime error and the output. I've searched far and wide for this error message and can't find any information. My board is being powered by USB and I'm connecting to the serial output on mac using command
'sudo cu -s 115200 --parity=none -l /dev/cu.SLAB_USBtoUART'

MicroPython v1.13 on 2020-09-02; ESP32 module with ESP32
Type "help()" for more information.
>>> import network
>>> sta_if = network.WLAN(network.STA_IF)
I (12370) wifi:wifi driver task: 3ffd10c8, prio:23, stack:3584, core=0
I (25045) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (25045) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (25085) wifi:wifi firmware version: 44aa95c
I (25085) wifi:config NVS flash: enabled
I (25085) wifi:config nano formating: disabled
I (25085) wifi:Init dynamic tx buffer num: 32
I (25085) wifi:Init data frame dynamic rx buffer num: 32
I (25095) wifi:Init management frame dynamic rx buffer num: 32
I (25095) wifi:Init management short buffer num: 32
I (25105) wifi:Init static rx buffer size: 1600
I (25105) wifi:Init static rx buffer num: 10
I (25115) wifi:Init dynamic rx buffer num: 32
>>> sta_if.active(True)
I (30545) phy: phy_version: 4180, cb3948e, Sep 12 2019, 16:39:13, 0, 0
I (30545) wifi:mode : sta (30:ae:a4:9d:45:84)
True
I (30545) wifi: STA_START
>>> sta_if.scan()
I (65335) network: event 1
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
RuntimeError: Wifi Unknown Error 0x0102

Does anyone have any idea what could be causing this? I know the micropython code is open source, but I'm not familiar with the project and I don't know where to find the network module to search for the scan function and see what's going on. I'm not even positive that would be helpful, but that's about all I can think of at this point, I'm really at a loss here.

BetterAutomations
Posts: 83
Joined: Mon Mar 20, 2017 10:22 pm

Re: Can't do a WiFi scan, RuntimeError: Wifi Unknown Error 0x0102

Post by BetterAutomations » Mon May 17, 2021 1:56 pm

RuntimeError: Wifi Unknown Error 0x0102 means no access points were found. Move the device closer to a hotspot and try again, or catch the exception and notify the user no access points were found.

Replying to an old question because I too had this error and absolutely nothing was coming up in searches or with Google. After much head-banging* I found the problem. This forum post is literally the only one discussing this issue. And I tried two different ESP32s so I know it's not my hardware.

* Coincidentally, some metal was playing in the background while I was banging my head on this issue :lol:

User avatar
Wind-stormger
Posts: 17
Joined: Fri Nov 05, 2021 6:59 am

Re: Can't do a WiFi scan, RuntimeError: Wifi Unknown Error 0x0102

Post by Wind-stormger » Mon Jun 20, 2022 6:01 am

Before looking for software problems, you can check for hardware problems, such as whether the wifi power supply is good.

If you have a voltmeter and know how to use it, it is recommended that you measure whether the VDD3P3 pin of the EPS32 chip has a voltage of 3.3V.

If there is an abnormality here, this error will be reported.

Please refer to the chip data sheet for the VDD3P3 pin.

I have encountered such a problem, I hope it can provide an idea for people looking for a solution.

User avatar
scruss
Posts: 360
Joined: Sat Aug 12, 2017 2:27 pm
Location: Toronto, Canada
Contact:

Re: Can't do a WiFi scan, RuntimeError: Wifi Unknown Error 0x0102

Post by scruss » Mon Jun 20, 2022 4:26 pm

There are also a couple of DevKitC variants (such as the ESP32-DevKitC-32UE) that require an external IPEX antenna attached.

User avatar
Wind-stormger
Posts: 17
Joined: Fri Nov 05, 2021 6:59 am

Re: Can't do a WiFi scan, RuntimeError: Wifi Unknown Error 0x0102

Post by Wind-stormger » Tue Jun 21, 2022 2:41 am

scruss wrote:
Mon Jun 20, 2022 4:26 pm
There are also a couple of DevKitC variants (such as the ESP32-DevKitC-32UE) that require an external IPEX antenna attached.
Right.

Nice addition. :)

NilsBe
Posts: 3
Joined: Sun Jan 06, 2019 10:47 pm

Re: Can't do a WiFi scan, RuntimeError: Wifi Unknown Error 0x0102

Post by NilsBe » Sat Jul 09, 2022 5:12 pm

scruss wrote:
Mon Jun 20, 2022 4:26 pm
There are also a couple of DevKitC variants (such as the ESP32-DevKitC-32UE) that require an external IPEX antenna attached.
I have tried to solder an ipex connector to my ESP32 Wrover.
Wifi worked fine before.
Now I get this Error: RuntimeError: Wifi Unknown Error 0x0102
in the line: sta_if.scan()

So obviously I failed and spoiled the antenna and the Wifi is not working any longer.

This could give some hint about the reason of the problem.

Post Reply