【发布时间】:2015-07-31 00:28:07
【问题描述】:
我正在尝试连接到嵌入式 linux 上的蓝牙设备。
- BlueZ 版本是 4.101。
- 本地蓝牙适配器是 USB 蓝牙加密狗 Trendnet TBW-107UB,适用于所有测试。
- 我无法提供有关目标设备的详细信息,因为它是我工作的公司的产品,抱歉。
使用描述的方法 this page 在 Desktop Linux Mint 17 x64 和 RiotBoard (i.MX6) Linaro Ubuntu 上运行良好。
但是,我无法将 i.MX25 板(嵌入式定制 Linux)连接到目标设备。 仅扫描有效。
rfcomm.conf
rfcomm0 {
# Automatically bind the device at startup
bind yes;
# Bluetooth address of the device
device 00:07:80:5A:48:93;
# RFCOMM channel for the connection
channel 1;
# Description of the connection
comment "Example Bluetooth device";
}
hciconfig -a 输出
hci0: Type: BR/EDR Bus: USB
BD Address: 00:15:83:44:39:E2 ACL MTU: 384:8 SCO MTU: 64:8
UP RUNNING PSCAN
RX bytes:28633 acl:0 sco:0 events:204 errors:0
TX bytes:899 acl:0 sco:0 commands:60 errors:0
Features: 0xff 0xff 0x8f 0xfe 0x9b 0xff 0x59 0x83
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF PARK
Link mode: SLAVE ACCEPT
Name: 'Bluetooth2.1+EDR CLASS1'
Class: 0x000000
Service Classes: Unspecified
Device Class: Miscellaneous,
HCI Version: 2.1 (0x4) Revision: 0x149c
LMP Version: 2.1 (0x4) Subversion: 0x149c
Manufacturer: Cambridge Silicon Radio (10)
rfcomm 连接输出
# rfcomm connect 0
Can't connect RFCOMM socket: Operation now in progress
hcitool cc 输出
# hcitool cc 00:07:80:5A:48:93
Can't create connection: Connection timed out
l2ping 输出
# l2ping 00:07:80:5A:48:93
Can't connect: Invalid exchange
在谷歌搜索时,我能找到的唯一相关 thread 表明 rfcomm 连接输出可能是由于内核 2.6.27 回归,但我的是 3.10.28(使用 uname -r)。
我尝试了另外两个目标蓝牙设备(不同类型),问题仍然存在。
感谢您的帮助,谢谢!
编辑
Rfkill block / unblock 似乎没有改变任何东西。
【问题讨论】:
标签: linux bluetooth embedded-linux bluez rfcomm