1 分で読了 #devops
このページの目次

Bluetooth 操作マニュアル

確認

bluetoothctl devices              # ペアリング済みデバイス
bluetoothctl show                 # ローカル Bluetooth 情報
bluetoothctl info XX:XX:XX:XX:XX:XX  # デバイスの詳細

操作

bluetoothctl                      # インタラクティブモードに入る
  scan on                         # デバイスをスキャン
  pair XX:XX:XX:XX:XX:XX          # ペアリング
  trust XX:XX:XX:XX:XX:XX         # 信頼(自動再接続)
  connect XX:XX:XX:XX:XX:XX       # 接続
  disconnect XX:XX:XX:XX:XX:XX    # 切断
  remove XX:XX:XX:XX:XX:XX        # デバイスを削除

# コマンドラインでワンライナー操作
bluetoothctl connect XX:XX:XX:XX:XX:XX
bluetoothctl disconnect XX:XX:XX:XX:XX:XX
bluetoothctl power on / off

トラブルシューティング

systemctl status bluetooth
dmesg | grep -i bluetooth         # ファームウェア読み込みエラー
rfkill list                        # ソフトウェア/ハードウェアブロックされているか
rfkill unblock bluetooth