aioble: Add pairing and bonding multitests #1021
Open
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.
Summary
Adds comprehensive multitests for BLE pairing and bonding functionality to the aioble library.
New Tests Added
1.
ble_pair.py
- Pairing without persistent bondingbond=False
encrypted=1 authenticated=0 bonded=0
2.
ble_bond.py
- Pairing with persistent bondingbond=True
encrypted=1 authenticated=0 bonded=1
+secrets_exist yes
Technical Implementation
aioble.Characteristic
with_FLAG_READ_ENCRYPTED
to require pairing for accessTesting
Both tests pass consistently on BTstack-enabled MicroPython builds:
Motivation
These tests fill a critical gap in aioble testing coverage by providing:
The tests complement the recent BTstack pairing/bonding implementation and demonstrate that aioble's async API works correctly with the underlying security features.
🤖 Generated with Claude Code