Pairing is not available in Core Bluetooth.
kiranruth opened this issue · comments
Kiran Ruth R commented
I'm trying to run
python ./omblepy.py -d HEM-7361T
I get the following error
Traceback (most recent call last):
File "XXXX/omblepy/./omblepy.py", line 364, in main
await bleClient.pair(protection_level = 2)
File "XXXX/omblepy/env/lib/python3.10/site-packages/bleak/__init__.py", line 629, in pair
return await self._backend.pair(*args, **kwargs)
File "XXXX/omblepy/env/lib/python3.10/site-packages/bleak/backends/corebluetooth/client.py", line 191, in pair
raise NotImplementedError("Pairing is not available in Core Bluetooth.")
NotImplementedError: Pairing is not available in Core Bluetooth.
Any solution for this?
Benjamin commented
This error originates from bleak, the bluetooth library that omblepy uses.
On their documentation they mention, that pairing is not available on mac os,
along with some other differences like using UUIDs instead of mac adresses:
https://bleak.readthedocs.io/en/latest/backends/macos.html
I have so far only tested on windows and linux.
Maybe you can try just commenting out the lines that does pairing:
Line 364 in 1f43fef
Unfortunatelly I don't have any mac to test this with.