aioble: fix ScanResult.services decoding of UUIDs, and add/improve multitests#863
Merged
dpgeorge merged 4 commits intomicropython:masterfrom May 27, 2024
Merged
Conversation
Fixes are needed to support the cases of: - There may be more than one UUID per advertising field. - The UUID advertising field may be empty (no UUIDs). - Constructing 32-bit `bluetooth.UUID()` entities, which must be done by passing in a 4-byte bytes object, not an integer. Signed-off-by: Damien George <damien@micropython.org>
This tests both encoding and decoding multiple 16-bit and 32-bit services within the one advertising field. Signed-off-by: Damien George <damien@micropython.org>
Testing shows that the first two writes always go through and the rest are dropped, so update the .exp file to match that. Signed-off-by: Damien George <damien@micropython.org>
The perf multitests now "pass" when run. Signed-off-by: Damien George <damien@micropython.org>
f4efda7 to
2c30a4e
Compare
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.
Following on from #787 , this makes a similar fix on the central side:
bluetooth.UUID()entities, which must be done by passing in a 4-byte bytes object, not an integer.A multitest is added for these cases.
Also, other minor fixups for the multitests.