12. bluetooth

LubanCat-H618系列板卡目前只有以下型号板载支持蓝牙功能

  • LubanCat-A1

  • LubanCat-A1 IO

12.1. 命令行配置蓝牙

12.1.1. bluetoothctl

使用命令行配置蓝牙,我们可以使用工具—-bluetoothctl

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# 进入bluetoothctl命令行
bluetoothctl
# 进入bluetoothctl命令行后,类似:[bluetooth]#
# Controller代表arm板上的蓝牙设备,Device代表蓝牙耳机
# 按如下步骤初始化蓝牙设备,并连接蓝牙耳机
# 查看帮组
help

power on
agent on
default-agent
# 启动扫描
scan on
# 假如蓝牙耳机地址为:04:8C:9A:F2:54:4B
trust 04:8C:9A:F2:54:4B
# 配对
pair 04:8C:9A:F2:54:4B
# 连接
connect 04:8C:9A:F2:54:4B

# 查看蓝牙耳机信息
info 04:8C:9A:F2:54:4B

# 断开连接
disconnect 04:8C:9A:F2:54:4B
# 不想自动连接上蓝牙耳机,可以删除配对信息
remove 04:8C:9A:F2:54:4B

更多关于命令行蓝牙连接,可参考 https://blog.csdn.net/chenjk10/article/details/90317028

12.2. 桌面系统配置蓝牙

默认蓝牙是打开的状态,点击蓝牙的图标

../../../_images/bluetooth01.png

点击 Devices

../../../_images/bluetooth02.png

先点击信任设备,然后再点击配对,右上角会有配对的弹窗,点击允许配对

../../../_images/bluetooth03.png

配对成功后,设备需要连接,右键选择第一个选项连接设备

../../../_images/bluetooth04.png

连接成功后,设备的右边会有连接的标志,你下次开机的时候会自动连接你的设备, 如果你连接的是蓝牙耳机,你可以打开音乐播放。