I have developed BLE application for openwrt using BLUEZV5.30. I was able to create the application by extracting source code gatttool and hcitool. I have also added few more functionality then provided by these tools (like reading rssi).
However, i have upgraded my bluez stack to 5.42 and i am planning to use DBUS interface for all BLE related operations. The functionality i want:
Reading RSSI
Connecting and Disconnecting
Bonding
Pairing
Deleting Bonding information
Discovery
Scanning
Advertising
Write/Reading to Characteristics
Notifications and Indications
I was able to perform all the above operations (except bonding and pairing) using my code written in C++. However, due to some issues with my existing code and inability to pair/bond, i want to migrate to dbus interface. However, i am not sure about the bugs in BLUEZ DBUS API and functionality provided by the APIs. I have read this API Doc but it didn't give any clear picture of DBUS interface.
My question is I am not sure if i can get all of the required functionality with dbus api? I have read the documentation (bluez dbus api) but i am still not sure.
解决方案
As you mention in the other post I updated gattlib to support Bluez DBUS API.
gattlib is written in C. If you do not want to use it looking at its code should help you to progress.
The DBUS API is described here: https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc. There are also (python) examples that demonstrate the API.