martinohanlon/BlueDot

No Attribute AF_BLUETOOTH

Closed this issue · 2 comments

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

  • Kernel Version- 5.10.90-v8

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'

What Linux distribution are you running this on?

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

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!