linux系统蓝牙测试

蓝牙测试

1、蓝牙设备检查

lspci |grep -I bluetooth

lsusb | grep -I bluetooth

 

2、蓝牙服务检查

systemctl status bluetooth

sudo systemctl start bluetooth

 

3、命令行管理工具

hcitool 或 bluetoothctl

 

3.1、蓝牙扫描

hcitool

hcitool scan 执行后,系统会开始扫描附近的蓝牙设备,并列出设备的 MAC 地址和名称

bluetoothctl

bluetoothctl 执行后进入交互模式后,输入以下命令开始扫描

scan on 开始扫描,扫描到的设备会实时显示在终端中

scan off 停止扫描

 

3.2、蓝牙配对、连接

pair XX:XX:XX:XX:XX:XX 配对设备,需要输入目标MAC

connect XX:XX:XX:XX:XX:XX 连接设备

info XX:XX:XX:XX:XX:XX 设备信息

 

3.3、蓝牙测试

音频输出

pactl list short sinks 列出系统中可用的音频输出设备,找到蓝牙音频设备对应的名称或索引

pactl set-default-sink <sink_name_or_index> 设置声音输出为蓝牙音频设备的名称或索引

文件传输

安装obexftp、bluetooth-obexd

bluetooth-sendto -b <device_mac_address> --file filename

 

4、图形工具

bluez

posted on   赛博狗尾草  阅读(3)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
点击右上角即可分享
微信分享提示