pkg/nimble:derive peer address type from peer address #18474
Merged
+3
−1
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.
Contribution description
This PR fixes a problem when using
nimble_statconn
.nimble_statconn
master has to define the peer address type of the slave node to which the connection is established by the master. Using aBLE_ADDR_RANDOM
as the peer address type allows connecting only to peers that have a static random address. Deriving the peer address type from the peer address is simple and allows connections to be established with peers that have either a public or static random address.Furthermore, to see which type of address is used as own address, the output of the
ble info
command has been extended by the address type info.The problem was found when investigating in PR #18439 the reason why
tests/nimble_statconn_gnrc*
failed.Testing procedure
Use two BLE nodes and flash
tests/nimble_statconn_gnrc
and check that the test still works. Execeute theble info
command.Node 1:
Node 2:
Issues/PRs references
Prerequisite for PR #18439