Bluetooth Low-Energy for Linux API

I have a device with several GATT user services, and I would like to write a Linux program to interact with it. After some searching, I found out that Linux uses BlueZ to process the Bluetooth LE protocol. I am using Ubuntu 15.10 with BlueZ 5.35, but I cannot figure out how to use this BlueZ from a user space program. I can not find the API documentation anywhere, there are no tutorials, examples, nothing. Is it possible to use this BlueZ stack for something other than just connecting to Bluetooth devices with default services? And if so, where is the documentation? (Preferably, the C / C ++ API, but at this point everything goes)

+4
source share
3 answers

attrib/gatttool.c bluez [1]. Gatttool - BTLE C "API". GATT libbluetooth. gatttool , , - btgatt-, tools/btgatt-client.c ( configure bluez --enable-experimental). , C bluez DBUS. bluetoothctl - , DBUS. bluetoothctl client/ [2]. , C- bluez, - SDK Anki Drive [3]. GATT C libbzle [4]. C BTLE. Gatttool GATT, , , glib iirc. , syscalls (, connect,...), , . [5]. :

, API , BlueZ.

GATT bluez [6] GATT [7] :

.

, "Bluetooth Linux" Linux Linux 2016 [8]. 42:00 C. , , API DBUS (. "" 45:30). DBUS doc/gatt-api.txt [9], Python DBUS test/.

, .

[1] http://git.kernel.org/cgit/bluetooth/bluez.git/tree/attrib/gatttool.c
[2] http://git.kernel.org/cgit/bluetooth/bluez.git/tree/client/
[3] https://github.com/anki/drive-sdk/
[4] https://github.com/anki/drive-sdk/tree/master/deps/bzle/
[5] https://people.csail.mit.edu/albert/bluez-intro/c404.html
[6] https://github.com/gbrault/gattclient
[7] http://gbrault.imtqy.com/gattclient/index.html
[8] https://www.youtube.com/watch?v=tclS9arLFzk
[9] http://git.kernel.org/cgit/bluetooth/bluez.git/tree/doc/gatt-api.txt

+3

, BLE API GATT C/++. , API . , , - GATT. Github: https://github.com/labapart/gattlib

BLE, . https://github.com/labapart/gattlib/tree/master/examples, , .

0

Source: https://habr.com/ru/post/1628691/


All Articles