美文网首页
ArchLinux安装使用蓝牙

ArchLinux安装使用蓝牙

作者: Armlinux | 来源:发表于2022-11-12 17:55 被阅读0次

一、安装
1.安装蓝牙并启动蓝牙服务

$ sudo pacman -S bluez bluez-utils
$ sudo systemctl enable bluetooth.service
$ sudo systemctl start bluetooth.service

二、使用Bluetoothctl进入蓝牙控制台
Bluez是Linux系统上的蓝牙协议栈,自带了很多有用的工具,Bluetoothctl就是其一。

$ bluetoothctl --help          查看帮助命令
$ bluetoothctl -v              查看蓝牙版本

三、使用Bluetoothctl连接蓝牙案例

$ bluetoothctl            进入蓝牙管理工具环境
[bluetooth]# power on                打开蓝牙
[bluetooth]# agent on                开启代理
[bluetooth]# scan on                 扫描蓝牙设备
[bluetooth]# pair xx:xx:xx:...       配对该设备
[bluetooth]# trust xx:xx:xx:...      信任该设备
[bluetooth]# connect xx:xx:...       连接该设备
[bluetooth]# disconnect xx:xx:...    断开蓝牙

[bluetooth]# help                   查看帮助信息
[bluetooth]# show                   查看本机蓝牙信息
[bluetooth]# discoverable yes       设置蓝牙可被发现
[bluetooth]# info xx:xx:xx:...      查看该蓝牙设备的信息

四、安装蓝牙音频

$ sudo pacman -S pulseaudio-bluetooth

五、蓝牙图形化管理工具安装

$ sudo pacman -S bluedevil

$ sudo pacman -S blueman

————————————————
版权声明:本文为CSDN博主「kler」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_36390239/article/details/123118489

相关文章

网友评论

      本文标题:ArchLinux安装使用蓝牙

      本文链接:https://www.haomeiwen.com/subject/oesqxdtx.html