使用bluetoothctl管理藍芽裝置

啟用 Bluetoothctl 管理 # bluetoothctl 列示 bluetooth dungle 裝置 mac [bluetooth]# list

指定控制的藍牙裝置 [bluetooth]# select [local mac address] 啟用藍牙裝置 [bluetooth]# power on 打開掃描功能 [bluetooth]# scan on 打開 agent [bluetooth]# agent on 畫面這時會閃現裝置掃描到的可連接藍牙裝置 信任要連接的裝置mac [bluetooth]# trust [BT mac address] 與連接裝置做 pair 動作 [bluetooth]# pair [BT mac address] (需手動認證的裝置的話這邊需要輸入畫面顯示的 PIN code.) 連結裝置 [bluetooth]# connect [BT mac address] 搞定收工 [bluetooth]# exit

Last updated