-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bluetooth product info parsing and add picker to settings #3223
Merged
Conversation
This file contains 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
NickeZ
reviewed
Mar 6, 2025
@@ -8,6 +8,11 @@ | |||
import CoreBluetooth | |||
import Mobileserver | |||
|
|||
struct ProductInfo: Codable { | |||
let product: String |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I changed the format to p
and v
. See latest simulator.py
4bcd59b
to
8e55a59
Compare
NickeZ
approved these changes
Mar 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
So the backend knows what kind of product/version the product is, analoguous to the USB HID descriptor info.
When there are watchonly accounts, the waiting screen is not shown. Instead, the user can connect a new device in Manage Device. Manage accounts also shows the same screen if there are no accounts. The assumption is that if there are no accounts, then there is no device connected, so we might as well show the device picker there too.
The backend identifiers the same "device" by the identifier. Bootloader and firwmare should have different identifier strings, as they are handled as different "devices" by the backend. Otherwise a switch between them won't be recognized.
The device first connects. Pairing happens later when a secured characteristic is used. We assume the device is paired when we can read the product string, at which point the backend register the device. Otherwise, the app would launch into the device workflows in the UI and get overlaid with the pairing code suddenly, which looks broken.
Will generate a needless decoding error. The product value is empty if not read yet or if the device is not in bootloader/firmware state.
If user aborts pairing, we don't want to auto-connect to this device in the future.
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.
No description provided.