作者remember11 (Mr.Darcy)
看板LinuxDev
标题[问题] 蓝牙 bluetooth 配对问题
时间Tue Mar 3 14:34:32 2015
小弟用BT dongle,要用来和手机(android)蓝芽配对
使用的tool是 hcitool
Linux 环境是 openwrt,有安装下列blueZ相关的utilities
bluez BlueZ stak (combined Lib and Utils)
bluez-hcidump Bluetooth packet analyzer
bluez-utils Bluetooth utilities
有关闭wifi,怕干扰
遇到的问题是:
用hcitool cc去做配对,然後下hcitool con检查有资料,应该是有配对成功
但1秒後再检查一次却没资料,等於配对断了,屡试不爽
root@OpenWrt:/# hcitool cc 00:26:46:8F:B5:90
root@OpenWrt:/# hcitool con
Connections:
< ACL 00:26:46:8F:B5:90 handle 1 state 1 lm MASTER
root@OpenWrt:/# hcitool con
Connections:
在 Fedora 17上用相同的BT dongle,下hcitool cc去配对同一只手机也是一样的情况
想请问各位大大哪里有问题
上网google好久还找不出原因在哪
请各位高手提供经验或方向给小弟
谢谢
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 118.163.55.114
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/LinuxDev/M.1425364475.A.31F.html
※ 编辑: remember11 (118.163.55.114), 03/03/2015 14:36:50
1F:推 snowcreeper: hcitool cc <address>只是建立底层连线 05/01 00:03
2F:→ snowcreeper: 底层连线 後续你没动作很快就timeout断掉了 05/01 00:04
3F:→ snowcreeper: hcitool con是检查连线状态 而非配对状态 05/01 00:05
4F:→ snowcreeper: 如需配对可用bluetooth-agent <passcode> 05/01 00:05
5F:→ snowcreeper: 如果需要建立连线可以用rfcomm connect (详细请估狗) 05/01 00:07