Problems with BLE address handling
- Dominant language
- C++
- Stars
- 81
- Forks
- 71
- PR merge metrics
- No merged PRs in 30d
Description
In BLE there are 4 types of addresses:
- Public MAC address:
- Random static
- Random unresolvable
- Random resolvable
According to the BLE spec v4.2 in Vol 6, Part B Section 1.3:
> If a device is using Resolvable Private Addresses, it shall also have an Identity Address that is either a Public Device Address or Random Static Device Address type.
Currently, the available APIs to handle addresses are [getAddress()](https://github.com/ARMmbed/ble/blob/develop/ble/Gap.h#L177) and [setAddress()](https://github.com/ARMmbed/ble/blob/develop/ble/Gap.h#L164) in Gap.h. But it is not clear from the documentation how can a user make sure that a call to setAddress() with `ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE` will not clear the previous Public or Random static address.
This feature is important for bonding because without the Public or Random static address in the BLE server the client has no way of identifying the bonded peripheral.
Contributor guide
Research direction
Start with Gap.h, especially the getAddress() and setAddress() APIs, and review the BLE 4.2 specification reference in the issue. Determine how identity and resolvable private addresses should coexist and what the API must make clear about preserving the Public or Random Static address. Done means the address-handling behavior is unambiguous for bonding users and covered by the relevant project tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- embedded-iot, networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100