【发布时间】:2016-02-02 07:31:33
【问题描述】:
我正在尝试将 bluez 外围设备连接到 iOS 设备;它不工作。
请在外围设备端找到以下日志。我正在使用hciconfig hci0 leadv 做广告,但我在手机上的扫描仪应用程序上看不到任何“连接”选项。 bluez-4.101 也没有 hciconfig hci0 leadv0 选项来使其可连接。
使用同一个设备作为 Central,我可以与其他 BLE 设备建立 LE 连接,从而确认内核 LE 支持和设备正常,我认为只有一些 bluez 问题存在。
> HCI Event: LE Meta Event (0x3e) plen 19
LE Connection Complete
status 0x00 handle 1025, role slave
bdaddr 67:5D:F6:87:3D:2C (Random)
> ACL data: handle 1025 flags 0x02 dlen 7
ATT: MTU req (0x02)
client rx mtu 158
> ACL data: handle 1025 flags 0x02 dlen 27
> ACL data: handle 1025 flags 0x01 dlen 27
> ACL data: handle 1025 flags 0x01 dlen 9
L2CAP(d): cid 0x003a len 59 [psm 0]
0000: .9......com.appl
0010: e.BT.TS."....com
0020: .apple.BTLEServe
0030: r.classic..
> ACL data: handle 1025 flags 0x02 dlen 11
L2CAP(d): cid 0x003a len 7 [psm 0]
0000: ......
> HCI Event: Disconn Complete (0x05) plen 4
status 0x00 handle 1025 reason 0x13
Reason: Remote User Terminated Connection
我怎样才能让这个外围设备连接?
【问题讨论】:
-
bluez-4.101 高度过时了,几乎可以肯定是所有问题的原因。
标签: bluetooth-lowenergy bluez bluetooth-peripheral