This repository has been archived by the owner on Dec 8, 2019. It is now read-only.
Replace pairing over Wi-Fi hotspot with Bluetooth Low Energy #15
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.
The currently implemented Wi-Fi hotspot-based pairing mechanism is extremely unreliable. As it turns out, this is due to several reasons, one of the most important ones being that the Raspberry Pi Wi-Fi chip only supported the hotspot and normal Wi-Fi connection to be on the same channel. It also doesn't support Channel Switch Announcments (CSA). This leads to a very clumsy UX, also because iOS needs to prompt the user every time a Wi-Fi connection is made from an app on their behalf.
This is why this PR introduces BLE-based pairing.
It introduces a BLE service called
Candy
:CA000000-75dd-4a0e-b688-66b7df342cc6
That service provides the following characteristics:
Those characteristics allow an app to discover Candy Dispensers nearby, list the Wi-Fi networks they can reach, to instruct them to connect to a Wi-Fi and to get status information.
The GATT service can be tested though the
LightBlue
app.