Repository navigation
fix(onboarding): retry cfgwifi hello with SSID-derived pre-key - #164
Open
AndLindemann wants to merge 2 commits into
Open
AndLindemann wants to merge 2 commits into
AndLindemann wants to merge 2 commits into
Conversation
Some vacuums silently drop the cfgwifi HELLO when it is encrypted with the
static pre-key 6433df70f5a3a42e. A Roborock S6 MaxV (a10, fw 02.62.46) only
answered once the HELLO was encrypted with the last 16 characters of its
hotspot SSID ("roborock-vacuum-a10_miap5F1D" -> "uum-a10_miap5F1D"), which is
what the official app sends it. Two identical units still accept the static
key.
onboard_once (CLI and GUI) keeps trying the static key first and, if the
vacuum does not answer, retries once with the SSID-derived key. The SSID is
rebuilt from the selected device's model and the hotspot gateway's MAC
address, read from the OS ARP table.
The onboarding device list did not include the model that the clients
already read, so the server now returns it.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This branch has not been deployed
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.
Problem
One of my three Roborock S6 MaxV units (
roborock.vacuum.a10, firmware02.62.46) never answered the cfgwifi HELLO. Onboarding always ended withHELLO: no response, even after a factory reset and a firmware update. The other two units onboarded fine with the same machine and the same script.Root cause
I captured the official Roborock app pairing that vacuum (Wi-Fi monitor mode on the open hotspot). The app first sends
A01frames, which the vacuum ignores. It then sends a1.0HELLO with the same JSON as the script. The difference is the AES key: the app uses the last 16 characters of the hotspot SSID instead of the static pre-key6433df70f5a3a42e:roborock-vacuum-a10_miap5F1D→uum-a10_miap5F1DThe vacuum answered the script's HELLO immediately once only that key was changed. With the static key it drops the HELLO silently: no reply and no ICMP error. The two other units still accept the static key.
Change
onboard_once(CLI and GUI) tries the static key first, so behaviour is unchanged for vacuums that answer it. If there is no answer, it retries once with the SSID-derived key. The SSID is rebuilt as<model with dashes>_miap<last two MAC bytes>. The model comes from the selected device. The MAC is the hotspot gateway's, read from the OS ARP table:/proc/net/arpon Linux,arp -non macOS,arp -aon Windows./admin/api/onboarding/devicesnow includesmodel. The clients already readdevice["model"], for example when they callstart_session, but the payload never contained it.Limitations
Testing
uv run pytest: 342 passed. The newtests/test_onboarding_prekey.pycovers:🤖 Generated with Claude Code