ttu / ruuvitag-sensor

Python package for communicating with RuuviTag BLE Sensor and for decoding sensor data from broadcasted data
https://ttu.github.io/ruuvitag-sensor/
MIT License
195 stars 77 forks source link

Switching from hcitool to bluetoothctl #247

Open RedFoxFinn opened 3 months ago

RedFoxFinn commented 3 months ago

I am wondering if it would be possible to make this change since this could present a problem with trying to scan tags with a BT 5.x device.

Not exacly sure yet would it be a small and trivial change or painful journey to implement that.

ttu commented 3 months ago

Hi. I think this sound like a good addition 👍

We would need to implement an own communication module for bluetoothctl in a same way as there is for hcitool and add a configuration option to choose the used tool. https://github.com/ttu/ruuvitag-sensor/blob/master/ruuvitag_sensor/adapters/nix_hci.py https://github.com/ttu/ruuvitag-sensor/blob/dee46fbd36f01b67e22e29a81378a7b445247920/ruuvitag_sensor/adapters/__init__.py#L11

I can inspect this option more when I have time and post my findings here., but if some one finds this tasks interesting, feel free to start to work on this.