bowdentheo/BLE-Beacon-Scanner

Error on Raspberry Pi OS - _bluetooth.error: (9, 'Bad file descriptor')

Opened this issue · 1 comments

Hi,

I'm facing a problem with Bluez library when running Raspberry Pi OS on a Raspberry Pi Zero W.

I'm running the latest image version with release date in March 4th 2021

I followed README example and, When I try to access Bluetooth I always get the same error:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/home/pi/.local/lib/python3.7/site-packages/beacontools/scanner.py", line 144, in run
    self.socket = self.backend.open_dev(self.bt_device_id)
  File "/home/pi/.local/lib/python3.7/site-packages/beacontools/backend/linux.py", line 13, in open_dev
    socket.setsockopt(bluez.SOL_HCI, bluez.HCI_FILTER, filtr)
_bluetooth.error: (9, 'Bad file descriptor')