-
Notifications
You must be signed in to change notification settings - Fork 71
Closed
Description
BLE HID pairing already works to some extent. The pairing code appears on the OLED display, it's accepted/refused, and the relevant security keys are created on the settings partition.
However, the paired device should also be added to host connections, which is not trivial because it changes the user configuration, which should be updated by Agent.
- The firmware calculates new addresses by reading the pairing keys on the settings partition (which I believe are of the
bt/keys/e89c2557115f0format, but double-check it), and checking whether they're present in host connections. - If there are new addresses, expose a new
newBleAddressesPresentbit via getDeviceState's response. - When Agent detects this bit, it'll call the newly added
getNewBleAddressesgetDeviceProperty command. The first response byte is the number of new BLE addresses, followed by the 6-byte addresses. Assuming a maximum 64-byte packet with a return status byte and a count byte, only 62 bytes are available for addresses, allowing up to 10 addresses, so maximize the number of addresses in 10. This process will naturally repeat for the rest of the addresses on the rare occasion of more unpaired addresses. - Agent will display a yellow notification bar at the top containing "A new Bluetooth device has been paired to this UHK. Let's [add it to connections] so that you can switch to it." or its plural form "New Bluetooth devices have been paired to this UHK. Let's [add them to connections] so that you can switch to them."
- When clicking on the above [add[s] it/them to connections] link, Agent jumps to the connections screen, adds the new addresses to connection targets, and saves the configuration. The firmware should expose the updated values, making the notification bar disappear.
Metadata
Metadata
Assignees
Labels
No labels