Egui based UI + fix for hang when reading serial number of Nothing Ear (2024) #3
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.
So, this is kinda dirty PR, because UI part of it is not very beautiful (regarding both code style and visual style). But, it solves few problems:
Few words about serial number response for Nothing Ear (2024) model. I added stderr output which logs all bytes received when reading serial number response in case timeout occurs (the timeout is 1 second for now). On my environment there are 145 bytes instead of expected 146 and these bytes are:
If I try to parse them as UTF-8 I can notice multiple version strings and serial number strings. Probably, the protocol used in Nothing Ear (2024) is a bit different from Nothing Ear (2). Also, serial number offset differs and acceptable
EAR_2024_SERIAL_OFFSET
is chosen instead ofEAR_2_SERIAL_OFFSET
if we detect that parsed serial number contains comma character which is indication for wrong offset used.Fixes #2