"); //-->
记录一下自己平时调试蓝牙的命令,后续学习到再添加
sdptool命令:
sdptool add SP - 添加SPP:
sdptool add --channel=1 DID SP DUN LAN FAX OPUSH FTP HS HF SAP NAP GN PANU HID CIP CTP A2SRC A2SNK SYNCML NOKID PCSUITE SR1
sdptool brower local - 查看适配器提供的功能
bluetoothctl 命令:
bluetoothctl scan on 扫描
bluetoothctl agent on 代理
bluetoothctl default-agent 默认代理
bluetoothctl trust xx:xx:xx:xx:CF:F0 信任
bluetoothctl pair xx:xx:xx:xx:CF:F0 配对
命令行进入: bluetoothctl
查看:default-agent
注册agent:agent on
扫描:scan on
停止扫描:scan off
找到要配对的蓝牙:pair xx:xx:xx:xx:xx:xx
添加信任:trust xx:xx:xx:xx:xx:xx
连接:connect xx:xx:xx:xx:xx:xx
设置蓝牙可被发现状态:discoverable yes
rfcomm命令:
mknod /dev/rfcomm0 c 216 0 ---216是RFCOMM设备号
rfcomm bind 0 xx:xx:xx:xx:CF:F0 绑定设备
rfcomm connect 0 xx:xx:xx:xx:CF:F0 1连接设备
rfcomm show 0 查看设备状态
cat >/dev/rfcomm0 写数据
rfcomm release 0 解绑
rfcomm watch /dev/rfcomm0 3 /sbin/agetty rfcomm0 linux 115200 --没用过
hciconfig命令:
hciconfig hci0 piscan 可使设备既可见
hciconfig -a 查看hci详细信息
hciconfig hci0 sspmode disable #关闭简易配对模式 enable为使能简易配对
hciconfig hci0 sspmode #查看简易配对模式状态
hciconfig hci0 up
hciconfig hci0 down
hciattach命令:
hciattach /dev/ttyACM1 any
linux蓝牙配置文件:
Bluetoothd保存的对端设备的信息:
/var/lib/bluetooth/
bluetooth配置:
/etc/bluetooth/
/usr/lib/systemd/system/bluetooth.service
/sys/class/bluetooth/
dbus中系统总线的配置
/etc/dbus-1/system.d/bluetooth.conf
bluetooth service和bluetoothd进程:
service --status-all | grep blue -查看是否存在bluetooth service
ps -ef|grep blue -查看是否存在bluetoothd进程
service bluetooth start -开启bluetooth service
service bluetooth stop -停止bluetooth service
停止bluetoothd进程方法:
rfkill block bluetooth
sudo service bluetooth stop
rfkill unblock bluetooth
bluetoothd -n -d - 启动bluetoothd
专栏文章内容及配图由作者撰写发布,仅供工程师学习之用,如有侵权或者其他违规问题,请联系本站处理。 联系我们
相关推荐
Achieving best-in-class RF performance in next gen Industrial and Medical connected applications
用Bluetooth Developer Studio缩短70%蓝牙开发时间
WIDCOMM Bluetooth Software1.4.1 Build 6
请推荐带有bluetooth的接口芯片,谢谢!
蓝牙技术及其协议栈
最新蓝牙耳机系统电路设计方案
Bluetooth 有用過Bluetooth模組的嗎?介紹幾個廠家給我
Nordic Semiconductor 重磅亮相 Bluetooth Asia 2026 以全域物联网全栈能力开启无线创新篇章
利用Bluetooth 低功耗技术进行定位跟踪方案解析
Microchip推出新型PIC单片机系列产品,以更简便方式添加Bluetooth低功耗连接功能
硕士学位论文 在蓝芽环境中传送H.263 视讯资料
BM70蓝牙解决方案
高性价比无线MCU如何帮您将低功耗蓝牙应用到更多产品中
MSP430,and,Bluetooth MSP430 and Bluetooth
利用Bluetooth®低功耗技术进行定位跟踪
蓝牙无线通讯协议V1.1
开发智慧驾驶无限可能,驶向未来新科技
意法半导体推出单片天线匹配IC,配合Bluetooth LE SoC和STM32无线MCU,让射频设计变得更轻松、快捷
意法半导体推出STM32WB1MMC Bluetooth LE 认证模块
Bluetooth的过去与未来
BlueTooth Power 评估板线图
可穿戴下的危机与Bluetooth LE芯片浅析
Bluetooth readies spec for 2, 10-Mbit/s data rate
利用创新的Bluetooth核心规范v5.1中的到达角(AoA)增强室内定位服务
Bluetooth 蓝牙 规范 10.1版
CEVA Bluetooth 5.4 IP获得蓝牙技术联盟(SIG)认证包含新功能以满足快速增长的电子货架标签(ESL)市场需求
Nordic助力双模模块简化Bluetooth Classic Audio和LE Audio产品开发