I have searched for the method StartDiscovery()
in bluez-5.36 libraries and I could not find.
Can some one please tell where this method is implemented?
Its mentioned in "adapter-api.txt
" of "bluez-5.36/doc
/" directory.
I have searched for the method StartDiscovery()
in bluez-5.36 libraries and I could not find.
Can some one please tell where this method is implemented?
Its mentioned in "adapter-api.txt
" of "bluez-5.36/doc
/" directory.
That is to use bluez through D-Bus API and GATT. In order to access to this feature you need to compile bluez with some experimental features (GATT/D-Bus API is still experimental). Then you can use D-Bus API to access to Adapter and execute the methods on it (Start/StopDiscovery)
Please have a look at this project: https://github.com/jomarmar/bluez-experimental . It is just a fork of bluez, with some changes in order to activate the GATT API experimental feature.
You should install
BlueZ
with the experimental flag enabled. BlueZ is moving towards user space development by using the DBus to expose bluetooth 'objects' and associated methods and properties.If you install
d-feet
you can actually check out the methods and types of objects described in the API documentation:sudo apt-get install d-feet
However, for GATT-related functionality, the experimental flag has to be enabled. If you're not sure how to enable the experimental flag, you can just run
sudo bluetoothd -E
to enable the Bluetooth Daemon with the experimental flag. The correspondingGattManager1
interfaces and such will be published in the DBus interface, which again, I strongly recommend usingd-feet
to get an idea of how it all works.If you're looking for some source code and documentation/help regarding the use of and programming with the DBus API, you might want to check out my answer here.