I've been trying to use this script https://github.com/karulis/pybluez/blob/master/examples/advanced/inquiry-with-rssi.py but it seems that sock = bluez.hci_open_dev(dev_id)
returns a non-working socket. Every time sock is passed into a function error(9, 'Bad file descriptor')
is thrown.
This script is pretty old so there is a decent chance it doesn't work any more. So I have two questions. Does anyone know how to use the pybluez library (or a more modern equivalent) to measure proximity of a bluetooth device with a raspberry pi?
And what am I doing wrong with this script that is causing me to build a broken socket?
Thanks.