bluetoothctl通过命令行连接蓝牙

1.直接在终端运行:bluetoothctl

2.运行:power on相当于打开蓝牙

3.运行:agent on

4.查找设备:scan on或者devices查找可配对设备

5.配对:pair   MACaddress(刚刚查找的配对设备的mac地址) 这一步需要在手机确认

6.连接:connect  MACaddress(刚刚查找的配对设备的mac地址)

7:信任设备:trust  MACaddress(刚刚查找的配对设备的mac地址)

连接完成

你可能感兴趣的:(bash)