Repository navigation
Say why the box couldn't join Wi-Fi, in words - #140
Merged
Merged
Conversation
The box sent the Wi-Fi driver's whole error (`Failed(DisconnectedInfo { ..
reason: AuthenticationExpired .. })`) and the apps put it in a sentence as is.
The box now sends the reason alone; the daemon turns it into wrong_password,
not_found, security, password or ssid (also from firmware 0.5.0's old form),
and both apps explain each. Joining says it can take up to 15 s, since a
wrong password takes the network that long to turn down, and joining again
clears the last failure instead of showing it while the new password is tried.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dropping connect_async when new credentials arrive left the driver connecting, and set_config refuses while it is: joining again during a wrong password's 13 s attempt failed with WIFI FAILED config. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The box reported its address once, as the network came up, and the apps showed "Joining…" for as long as the daemon hadn't seen it: after a daemon restart, or linked over the local network or the Relay. The box now repeats it in answer to hello, the daemon takes the address it reached the box at over the local network, and learning the network's name no longer drops the address. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
dragon joined with a wrong password on purpose. The Status row said
Couldn't join (Failed(DisconnectedInfo { ssid: "ByteTrade", bssid: [136, 220, 151, 19, 86, 27], reason: AuthenticationExpired, rssi: -59 })). Check the network name and password, then join again.after about 10 s, with nothing in between to say this takes a while.Measured on the box over serial:
WIFI CONNECTING→WIFI FAILED … AuthenticationExpiredtakes 12.8 s, and each retry 10 s later takes as long again. That time is the access point re-sending the first handshake message before it deauthenticates the box. The status reaches the apps over a stream, so they add no delay. Nothing on our side can tell a wrong password sooner, so the wait now says how long it can take.What
WIFI FAILED AuthenticationExpired) instead of the wholeDebugof the error.<why>intodevice.wifi_error:wrong_password(AuthenticationExpired,AuthenticationFailed,FourWayHandshakeTimeout,HandshakeTimeout,MicFailure),not_found,security,password,ssid, or the reason as it came. It also parses firmware 0.5.0's old form, so released boxes get the better text with no firmware update.POST /v1/device/wificlears the last failure. Before, joining the same network name again kept showing the old password's error while the new one was being tried.WIFI FAILED config. Droppingconnect_asyncleft the driver connecting, andset_configrefuses during that, so the attempt is now stopped withdisconnect_asyncfirst. A wrong password keeps the driver connecting for 13 s of every 23 s retry cycle, so this happened to more than half of quick re-joins. dragon hit it at 07:25:36 today.docs/protocol.md"Wi-Fi network" describesWIFI CONNECTING/FAILEDand the codes.Checks
cargo test --workspace, clippy,check-localization.py,swift build, and the firmware release build all pass.config.🤖 Generated with Claude Code