Skip to content

linux 下使用蓝牙

安装一些工具:

sudo pacman -S bluez bluez-utils

启动蓝牙服务:

sudo systemctl enable bluetooth.service

配置蓝牙:

bluetooth

进入交互:

1
2
3
4
Waiting to connect to bluetoothd...[bluetooth]# hci0 new_settings: bondable ssp br/edr le secure-conn wide-band-speech
[bluetooth]# Agent registered
[bluetooth]# [CHG] Controller EC:63:D7:2E:C8:67 Pairable: yes
[bluetooth]#

打开电源:

power on

启用配对:

pairable on

启动搜索:

scan on

可以看到输出:

[bluetooth]# [NEW] Device 10:21:AC:92:D6:06 BT5.2 Keyboard
[bluetooth]# [NEW] Device 11:21:AC:11:02:3B BT3.0 Keyboard

如果要连接低一个设备, 就是用下面的指令:

pair 10:21:AC:92:D6:06 

等待配对成功即可