Repository navigation
Set up a display over Bluetooth - #8
Merged
Merged
Conversation
A Mac can't read a display's NFC tag, so Pair Display used to be a page telling you to fetch your iPhone. A display that can't get online now opens a 3-minute Bluetooth setup window when its touch strip is held; the Mac finds it, takes the 8-character code on its screen, lists the Wi-Fi networks the display itself can see, waits until it has joined one, and claims it with POST /api/devices/bind/nfc using the bind URI the display hands over inside the code-secured session. InkletSetupKit speaks Espressif's network_provisioning protocol with Security 1 (X25519 + proof of possession, one AES-256-CTR keystream for both directions). The same sources are compiled into the iPhone app. - A request whose reply never arrives ends the session: the keystream has moved on one side only, so everything after would be noise. - One request at a time; join and rescan ignore a second trigger. - An already-online display is pointed at the iPhone's NFC tap, and the page opens the display that was added rather than the first one in the list.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
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.
Pair Display on the Mac used to say "use your iPhone". It now sets up a display end to end over Bluetooth: Wi-Fi first, then the claim.
Flow: the display can't get online → the user holds its touch strip for 3 s → it advertises for 3 minutes and shows a QR + 8-character code → the Mac lists it, takes the code, lists the Wi-Fi networks the display can see, waits until it has joined, then posts the bind URI the display handed over (inside the code-secured session) to
POST /api/devices/bind/nfc.InkletSetupKit (new target, also compiled into the iPhone app) speaks Espressif
network_provisioningwith Security 1 — X25519 + PoP, one AES-256-CTR keystream shared by both directions. Field numbers checked against the esp-idf / idf-extra-components protos; endpoint names, service UUID, PoP alphabet and the post-join 5 s grace checked againstinklet_prov.cpp.Review fixes on top of the original change:
devices.first.Tests:
swift test87/87, incl. NIST CTR-AES256 vector and Sec1 key agreement.