I need to open Bluetooth sockets on Mac.
LightBlue seemed great but then it turned out that in the Mac version, everything having to do something with L2CAP is just not implemented and pretty surely, Mac doesn’t support the (implemented) RFCOM.
When using that and trying to bind a socket, it fails with a 0x2c0 IOReturn Message which is kIOReturnNoDevice
.
Here is my code:
from lightblue import *
s = socket() # uses RFCOMM
s.bind(("", 0))
→ kIOReturnNoDevice
from lightblue import *
s = socket(L2CAP)
s.bind(("", 0))
→ NotImplementedError: L2CAP server sockets not currently supported
Are there any alternatives that allow for Bluetooth socket creation on macOS or maybe active forks of LightBlue?
After all, macOS does have BSD‘s sockets already..