Repository navigation
Description
Problem
When cyw43_wifi_join() requests open authentication for a password-protected network, the firmware reports an encryption mismatch, but the driver exposes only CYW43_LINK_FAIL.
One observed sequence was:
ASYNC(0000,23,0,1,0)
ASYNC(0001,LINK,0,0,1)
ASYNC(0000,SET_SSID,1,0,0)
Event 23 is CYW43_EV_PRUNE, and reason 1 is CYW43_REASON_PRUNE_ENCR_MISMATCH.
This is different from an incorrect password. The requested security mode is incompatible with the network, so retrying with the same configuration cannot succeed. Reporting the result as the generic CYW43_LINK_FAIL does not give the caller enough information to correct the configuration.
Environment
- Driver base:
v2.0.0(bed438f119cfba03f75957fceb6a5623ef95e6d9) - Hardware: Raspberry Pi Pico 2 W / CYW43439
- Integration:
pico_cyw43_arch_lwip_sys_freertos - Requested authentication:
CYW43_AUTH_OPEN - Network authentication: WPA2 AES PSK
The same behavior was observed with v1.1.1 (055d64274b014dd7b1c2fc94d26e8a18face7124).
Proposed behavior
Add a distinct public result such as:
CYW43_LINK_ENCR_MISMATCH
If the join fails because no candidate uses the requested security mode, report CYW43_LINK_ENCR_MISMATCH instead of CYW43_LINK_FAIL.
Preserve the result until a new join begins or station leave succeeds. The caller can then request the correct security mode without inferring the cause from scans, password contents, timeouts, or other application-side observations.
Failure classification
Infineon documents PRUNE_ENCR_MISMATCH as a firmware prune reason indicating that the requested security configuration is incompatible with a candidate network:
cyw43-driver is a separate host-driver implementation, so this reference describes the firmware event rather than define the CYW43_LINK_* API.
For an initial join, the following sequence indicates an incompatible security configuration:
CYW43_EV_PRUNEreportsCYW43_REASON_PRUNE_ENCR_MISMATCH.- No compatible candidate proceeds to successful authentication.
CYW43_EV_SET_SSIDreports that the join failed.
This sequence should produce CYW43_LINK_ENCR_MISMATCH.
The prune event alone is not terminal because another BSSID with the same SSID may use compatible security.
Related work
- Connection-status issue: Wrong Wi-Fi password can leave connection status at CYW43_LINK_JOIN #174
- Proposed implementation: src/cyw43: Terminate failed initial joins and preserve status. #170
Activity