OSError: [Errno 1] EPERM when connecting to WiFi on Pico W #12893
Replies: 3 comments 2 replies
-
At start try: sta_if.active(True)
# seems more reliable to start with a fresh connect()
if sta_if.isconnected():
sta_if.disconnect()
print ('started in the connected state, but now disconnected')
else:
print ('started in the disconnected state') and after a disconnect: sta_if.active(False) |
Beta Was this translation helpful? Give feedback.
-
After calling wlan.connect() it may take a few seconds before the device is actually connecetd and wlan.isconnected() returns True. See the code example at https://docs.micropython.org/en/latest/wipy/tutorial/wlan.html or here https://docs.micropython.org/en/latest/esp32/quickref.html#networking, which waits in loop until the device is connected. |
Beta Was this translation helpful? Give feedback.
-
Hello, I am having the same problem. I think the issue is on from time import sleep
import network
wlan = network.WLAN(network.STA_IF)
sleep(1)
print("WLAN Before Activation:", wlan)
wlan.active(True) # -> [CYW43] Failed to start CYW43
sleep(1)
print("WLAN After Activation:", wlan)
try:
wlan.connect("xxxx", "xxxx") # -> OSError: [Errno 1] EPERM
except Exception as e:
print("Exception running wlan.connect:", e)
UPDATEAhh sorry, apparently I got a clone pico, not the original with the CYW43455 chip |
Beta Was this translation helpful? Give feedback.
-
Hello. I am trying to connect to a network on my Pico W. I am using a simple test script:
When I run this code, I get the following error:
I am using Micropython 1.21.0 from Micropython's website. My editor is Thonny on Debian testing. I have things connected to the board, if that makes a difference.
Interestingly, this worked about an hour ago.
Beta Was this translation helpful? Give feedback.
All reactions