OpenBluetoothToolbox / SimpleBLE

SimpleBLE - the all-in-one Bluetooth library for MacOS, iOS, Windows, Linux and Android.
https://www.simpleble.org
Other
660 stars 111 forks source link

Give adapters a unique address on MacOS #185

Closed nothingisdead closed 1 year ago

nothingisdead commented 1 year ago

Currently, the Adapter::address() function returns a MAC address with all 0s. This does not match peripheral addresses on MacOS (UUIDs), and it cannot be used e.g. to index adapters in a hash map. This commit gives adapters a UUID on MacOS and returns the UUID string in Adapter::address(). It also changes Adapter::identifier() to include the UUID string.