简体   繁体   中英

Writing Gatt Server Application in Bluez

We want to write a custom Gatt Server Application for Bluez where we want to give some useful features. For example:

  1. Start Gatt Server
  2. Register/Unregister custom Service
  3. Add/Remove custom Characteristics/Descriptor
  4. Set/Get Value of Characteristics/Descriptor
  5. Disconnect Client / Close Gatt Server etc.

Bluez don't have these features in command line tool but they have several APIs (functions) to do that, we need to call those internal functions. In according to that we wrote an application in "bluez5.28/attrib/" directory from where we called several internal functions from files of "bluez5.28/attrib/" , "bluez5.28/profiles/" and "bluez5.28/src/" directories and tried to build it with bluez Makefile .

Since bluez have automated generated make file from automake it is quiet hard to make any change in that Makefile. But when we tried it showed lots of errors regarding dependencies and libraries eg undefined references, no such files of directories, etc.

Is their any easier way to use bluez functions to make a GattServer Application ?

Thanks in advance for your valuable answers.....

bluez gatt dbus apis are now complete as of version 5.29. You may consider using those if going via the dbus rather than directly through library calls is acceptable for you.

correlate pg:1950 in bluetooth spec4.0 APPENDIX: EXAMPLE ATTRIBUTE SERVER

ATTRIBUTES with gatt-example.c in plugins in bluez5.28

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM