LoginSignup
1
3

More than 5 years have passed since last update.

BlueZのAPI

Posted at

BlueZのAPIについて調べてみた。

なんでこうなっているのか、よくわかりませんが、なるべくならD-BusのAPIを使うのが良さそうです。

APIの切り口として以下があるみたいです。
* lib
* src/shared
* attrib
* btio
* D-Bus
* Android Bluetooth HAL

# lib
* 場所:lib
* bluezの内部API
* bluezのプロトコルスタックの中で使用する共通処理を行う関数のあつまり

src/shared

  • 場所:src/shared
  • Bluezの内部API
  • ATT, GATT, GAP, HCI など色々

btio

  • 場所:btio
  • socket APIのwrapper
  • attribはbtioのAPIを使っている。
  • pygattlibが使っている

attrib

  • 場所:attrib
  • gattの読み書きをするAPI
  • gatttoolが使っている。
  • attribはbtioのAPIを使っている。
  • discovery/scanはできない

D-Bus

  • LinuxのIPC
  • APIのヘッダファイルはないので、docにあるドキュメントとsrc/のソースコードとサンプルのソースコードを読む。
  • サンプルのbluetoothctlはD-BusのAPIのみを使っている

Android Bluetooth HAL

  • 場所:android
  • Android Bluetooth HAL互換のAPI
  • BTとBLEに対応、l2cap, rfcommのsocketもある。
  • 最近、メンテする人がいなくAndroid 5.0までしか対応していない。
1
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
3