martinohanlon / BlueDot

A zero boiler plate bluetooth remote
MIT License
141 stars 43 forks source link

No Attribute AF_BLUETOOTH #173

Closed AkshayKurhade closed 2 years ago

AkshayKurhade commented 2 years ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior: Python 3.9, bluedot 2.0.0 script- test script

from bluedot import BlueDot
bd = BlueDot()
bd.wait_for_press()
print("You pressed the blue dot!")

Run this program

python3 test.py

System

Error File "/usr/lib/python3.9/site-packages/bluedot/btcomm.py", line 351, in start self._server_sock = socket.socket(socket.AF_BLUETOOTH, socket.SOCK_STREAM, socket.BTPROTO_RFCOMM) AttributeError: module 'socket' has no attribute 'AF_BLUETOOTH'

martinohanlon commented 2 years ago

What Linux distribution are you running this on?

I'm pretty sure the error is because Python hasn't been compiled with Bluetooth support.

AkshayKurhade commented 2 years ago

This was on a custom yocto build. Bluetooth was included and was validated. Ended up just using rfcomm and a serial terminal for now instead. Thank You!