1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

LinuxのCUIでBluetoothのペアリング

Posted at

1. はじめに

LinuxのCUIでBluetoothのペアリングを行うにはbluetoothctlコマンドにて行う。
コマンドの詳細は下記が参考になる。
https://qiita.com/noraworld/items/55c0cb1eb52cf8dccc12

ライブラリがインストールされていない場合は下記でインストールする。

sudo apt -y install bluetooth bluez

2. bluetoothctl起動

bluetoothctl

3. ペアリング可能なデバイスのスキャン

scan

4. ペアリング

paier macアドレス

5. デバイスを信頼する

再起動しても接続できるように、デバイスを信頼する

trust macアドレス

6. ペアリングした機器に接続

connect macアドレス

7. ペアリングした機器の削除

remove macアドレス

8. 終了

exit

9. ペアリングと削除の簡単なスクリプト

コマンドでペアリングと削除をするのが面倒になったので、簡単なシェルスクリプトを作ってみました。
https://github.com/aruelu/bt_ctl

1
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?