← index #18597Issue #16779
Related · medium · value 0.678
QUERY · ISSUE

WPA3 PSK on Raspberry Pi Pico 2 W (cyw43-driver)

openby pavel-perinaopened 2025-12-20updated 2026-03-09
bugport-rp2

Port, board and/or hardware

RPI_PICO2_W

MicroPython version

MicroPython v1.27.0 on 2025-12-09; Raspberry Pi Pico 2 W with RP2350

Reproduction

Prerequisites:

  • configure only WPA3-PSK on router/AP, disable other methods
  • modify ssid and password according to yours
import network
sta = network.WLAN(network.WLAN.IF_STA)
sta.active(True)
sta.scan()
# [ (b'WirelessNest2', b'\xd4\x01\xc3/Q\r', 5, -64, 5, 3 ]
sta.connect("WirelessNest2", "YOUR_PASSWORD_HERE") # EDIT THIS
print(sta.isconnected())
# False
print(sta.status())
# 1

Expected behaviour

Connects to wifi

Observed behaviour

Returns instantly, does not connect

Additional Information

  • Documentation of scan() result (security, hidden) is incomplete and board/wifi module specific. Raspberry Pico 2 W returns ..., 5, 3) whereas ESP32 returns ..., 6, False) - this is already in multiple open issues
  • My router is Mikrotik C52iG-5HaxD2HaxD
  • WiFi driver is 3rd party repo
  • WPA3 should be supported since 1.25.0, but does not work in 1.26.1 and 1.27.0 (only PSK tested)

Code of Conduct

Yes, I agree

CANDIDATE · ISSUE

RP2: Pico 2 W Not connecting with thread running

closedby coencoensmeetsopened 2025-02-18updated 2025-03-26
bugport-rp2

Port, board and/or hardware

RP2 - Pico 2 W

MicroPython version

MicroPython v1.25.0-preview.229.g0d46e45a1 on 2025-01-27; Raspberry Pi Pico 2 W with RP2350

Reproduction

import time
import _thread
import urequests

SSID = ""
password = ""

def connect_normal():
    wlan = network.WLAN(network.STA_IF)
    wlan.active(True)
    wlan.connect(SSID, password)
    print("Connecting to network")

    start_time = time.time()
    while not wlan.isconnected() and time.time() - start_time < 20:
        print("Waiting for connection...")
        time.sleep(2)

    if wlan.isconnected():
        print("Connected to network")
    else:
        print("Failed to connect to network")

    print("Sleep for 2 seconds")
    time.sleep(2)
    wlan.disconnect()
    
def main_thread():
    connect_normal()

def second_thread():
    for (i) in range(10):
        print("Second thread")
        time.sleep(2)

_thread.start_new_thread(second_thread, ())
main_thread()

Other things tested but not working:

  • Extending the 20-second time limit.
  • Putting wlan = network.WLAN(network.STA_IF), wlan.active(True), and wlan.connect(SSID, password) before starting a thread.
  • Switching the functions connection_normal and second_thread to run in the other thread. So the connection is made on the newly opened thread.
  • Building firmware with the latest Pico SDK develop
  • Adding rp2.country("NL") and network.country(country).

Expected behaviour

Expected to connect to the network and print Connected to network.

Observed behaviour

No connection is established after the set time of 20 seconds. (Time is irrelevant as it never seems to connect). When the line _thread.start_new_thread(second_thread, ()) is commented out, a connection is found almost every single time.

Additional Information

No, I've provided everything above.

Code of Conduct

Yes, I agree

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied