I'm trying to scan for bluetooth LE devices using the bluez DBus API. I've installed bluez-5.25 using
--enable-experimental
configure option. I can see in the build that support has been compiled in. Interfaces like HeartBeat, ThermoMeter etc. appear in DBus but not the
org.bluez.ProximityMonitor1
interface. As far as I understand it this interface would be needed for permanent scan for bluetooth LE devices with information about the distance. But I just started to deal with bluez so I'm not sure.
Are all of the necessary things available in the DBus API? And what is needed in order to scan permanently for LE devices?
You need to register for DBUS creations of org.bluez.Device1 proxy objects. The org.bluez.Adapter1 interface can then be used to StartDiscovery. This will scan for both Classic and LE devices. When a device is detected a Device1 object will be created and your registered callback will be invoked.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With