Closed PaulMest closed 5 years ago
Looks like AF_BLUETOOTH is something that needs to be built in during python compile time. Anaconda doesn't support it, and it's either very difficult or impossible to get it to work on Mac (I found many threads with people asking for help to get it to work, and 0 possible replies).
It might still be doable, but difficult.
We didn't test these scripts on Mac. Please use VM
I'm running kali on WSL and get the same error
File "/mnt/c/Users/someone/Desktop/apple_bleee/ble_read_state.py", line 65, in <module>
toggle_device(dev_id, True)
File "/mnt/c/Users/someone/Desktop/apple_bleee/utils/bluetooth_utils.py", line 88, in toggle_device
hci_sock = socket.socket(socket.AF_BLUETOOTH,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/socket.py", line 232, in __init__
_socket.socket.__init__(self, family, type, proto, fileno)
OSError: [Errno 97] Address family not supported by protocol```
Thanks for the demos. I find this really interesting!
I tried getting this to run on my Mac, but couldn't. The things that helped me were to install
pybluez
directly from their GitHub repo instead of from their old release on PyPI.I've left some instructions here on how to do that here: https://stackoverflow.com/a/57210242/872328
Basically:
And then you can just:
However, then I ran into this issue:
This is where I gave up. I'm hoping someone else can figure out if it's possible or if there is a critical missing dependency on Mac that hasn't been ported over from Linux yet.