I am using bluez
for writing a BLE application. I have read the source code of gatttool
. I have few doubts regarding it and bluez
.
sec-level
in gatttool means? How it is related to security mechanisms of BLE Core specification (Just Works
, Passkey
and OOB
)? How it is related to various security modes and levels of BLE?gatttool
? (You can
point our command line arguments to command gatttool
).GAP
profile using gatttool
?service discovery
integrated in gatttool
?You don't have to build you application around gatttool and what's included in it.
Bluez5 exposes interfaces in the DBus. Using this dbus api and with the dbus bindings in the language of your choice (C, python, C#Mono) you can pretty much do everything =)
You can find a description of the dbus api exposed by bluez here : https://git.kernel.org/cgit/bluetooth/bluez.git/tree/doc
You can find the source code of bluetoothctl (a tool that you can use for pairing, connecting, services discovery, gatt attributes reading & writing etc) here : https://git.kernel.org/cgit/bluetooth/bluez.git/tree/client/main.c
bluetoothctl was built using GLib GDBus (dbus bindings for Glib in C) and you will find code examples for pretty much everything.