How to read Bluetooth LE address of a peripheral?
-
21-12-2019 - |
Question
When a central, on iPad, scans and detects a peripheral, how can it read the Bluetooth LE address of the peripheral?
The CBPeripheral
class does not have a property for 'address'.
Solution
For privacy reasons the Bluetooth Address is hidden as a "UUID" (or NSUUID)
If you really need to know a constant bluetooth address of a peripheral then program it into one of its characteristics or into the advertisement package as part of your unique manufacturer data field.
This require of course that you have asked BT SIG for a manufacturer id (and that you are the "manufacturer" of the peripheral) and that the peripheral uses Static Bluetooth address.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow