How to scan bluetooth LE devices via dbus API?

I am trying to do a scan for bluetooth devices using the Bluez DBus API. I installed bluez-5.25 using

--enable-experimental 

      

tune. In assembly, I can see that support has been compiled. Interfaces like HeartBeat, ThermoMeter, etc. are displayed in DBus, but not

org.bluez.ProximityMonitor1 

      

interface. As far as I understand, this interface will be needed to continuously scan Bluetooth devices with distance information. But I just started doing synosis, so I'm not sure.

Are there all the necessary things in the DBus API? And what is needed to continuously scan LE devices?

+3


source to share


1 answer


You need to register to create DBUS objects org.bluez.Device1 proxy. The org.bluez.Adapter1 interface can then be used for StartDiscovery. This scans both classic and LE devices. When the device is discovered, a Device1 object will be created and your registered callback will be called.



+3


source







All Articles