-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BLE MAC address on MacOS instead of system ID #140
Comments
|
From the Bleak documentation:
It would be nice to be able to use MAC address, but the effort to circumvent the macOS UUID solution is not proportional to the benefits. Reading from a cache file on disk is a reasonable idea, but I do not think it is reliable enough to be used for creating connections. Bleak strives to have an identical API, but is accepting of OS specific differences. macOS discovers by UUID and connects by UUID, it would be counterproductive to force MAC connecting. This is one of the few "this we just have to accept" differences, in my eyes. |
I do not think this is solvable. Will close for now. |
FYI, I have found a hack for this. See #1073. Give it a 👍 if this is still a needed feature. |
Perhaps it is only me, but it would be nice if the CoreBluetooth backend used BLE MAC address and not the system "device UUID"? It would make my scripts and configurations portable (I am usually on Linux).
I made an attempt to implement this inspired from noble. Initial tests seems to work even if the solution feels somewhat hacky.
Question:
Do anyone see any problems with this method of obtaining the address (i.e. read the "CoreBluetoothCache" from
/Library/Preferences/com.apple.Bluetooth.plist
)? Is there a better way?It seems the reason MacOS uses UUID is because some security feature in BLE that hides the MAC address. Does anyone know how this is handled on Windows and Linux/BlueZ?
Is it a bad or good idea to accept both MacOS "device UUID" and BLE MAC address? Would make this change backward compatible, but not sure if anyone cares.
example how to read
CoreBluetoothCache
:The text was updated successfully, but these errors were encountered: