Repeatable OSError: Wifi Internal Error in sta_if.connect
Port, board and/or hardware
ESP32-C3 and S3
MicroPython version
MicroPython v1.25.0 on 2025-04-15; ESP32C3 module with ESP32C3
Reproduction
Power-cycle the board and run the following code (in my case, in Thonny):
import network, time
sta_if = network.WLAN(network.WLAN.IF_STA)
sta_if.active(True)
print('foo')
sta_if.connect("no-such-network", "password")
time.sleep(5)
print('bar')
sta_if.connect("no-such-network", "password")
time.sleep(5)
print('baz')
Expected behaviour
No response
Observed behaviour
foo
bar
Traceback (most recent call last):
File "<stdin>", line 10, in <module>
OSError: Wifi Internal Error
(where line 10 is the second connect)
I get similar results when the first connect() is a real network with the wrong password, the second connect() is the same wrong network/password as the first, or the second connect() is a real network with the right password.
In fact, the sleep()s don't seem to be required either.
Additional Information
Power-cycling the board before running the test may be required for reproducibility.
Bug also manifests in the latest preview ESP32_GENERIC_C3-20250709-v1.26.0-preview.364.gdf05caea6.bin
and ESP32_GENERIC_S3-SPIRAM_OCT-20250709-v1.26.0-preview.364.gdf05caea6.bin
Unfortunately I don't have other boards to test with right now.
Code of Conduct
Yes, I agree
ESP32-S3 FH4R2 v0.2 No WiFi
Port, board and/or hardware
Custom Made ESP32-S3 Circuit Board (lol)
MicroPython version
v1.23.0_4M_FLASH
Reproduction
from network import WLAN
sta = WLAN(0)
sta.active(1)
sta.connect('xxx','xxx')
sta.ifconfig()
Expected behaviour
No response
Observed behaviour
('0.0.0.0', xxxx)
Additional Information
Hey, I was wondering if you guys could point me at anything to try to get the WiFi connecting. I tried the ESP32-S3 generic and octal spiram builds which both had bootup warnings and wifi init failures before finding the correct 4MB flash version. This cleared the boot errors and WiFi init errors but connect does nothing. To be clear, this is a custom circuit board with a custom WiFi antenna circuit, its entirely possible I did not connect it properly. However, sta.scan() does return all of my available networks. I believe my signal is in the -75 ballpark. I have tried to enable logging in boot.py but no additional serial was printed when trying to connect. I also attempted to see if it was working with Arduino but have not been able to get it to boot. I just get the final line: entry 0x_______ and nothing after until it eventually reboots.
Code of Conduct
Yes, I agree