Skip to content

aioble: fix ScanResult.services decoding of UUIDs, and add/improve multitests #863

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

Merged
merged 4 commits into from
May 27, 2024

Conversation

dpgeorge
Copy link
Member

Following on from #787 , this makes a similar fix on the central side:

  • 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.

A multitest is added for these cases.

Also, other minor fixups for the multitests.

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>
dpgeorge added 3 commits May 25, 2024 20:51
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>
@dpgeorge dpgeorge force-pushed the aioble-advertising-services branch from f4efda7 to 2c30a4e Compare May 25, 2024 10:52
@dpgeorge dpgeorge merged commit 2c30a4e into micropython:master May 27, 2024
3 checks passed
@dpgeorge dpgeorge deleted the aioble-advertising-services branch May 27, 2024 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant