工具/软件:
您好:
我已成功集成 CC33XX Linux 驱动程序(v1.0.0.8) 我的 Yocto (Scarthgap) 基本映像。 BLE 扫描工作正常,我可以找到附近的设备使用bluetoothctl.
但是、当我尝试连接到 BLE 器件时、连接会暂时成功、但随后又成功 原因1稍后断开 。
步骤:
1- CD /usr/share/cc33xx
2 -./ ap_start.sh
3 -./ ble_enble.sh
4- hciconfig hci0 up
它们都不会失败,然后使用 bluetoothctl 我扫描可用的设备,然后尝试连接到其中一个。
日志 在 bluetoothctl 中:
[bluetooth]# connect D0:2E:AB:96:8B:65 Attempting to connect to D0:2E:AB:96:8B:65 hci0 D0:2E:AB:96:8B:65 type LE Public connected eir_len 15 [CHG] Device D0:2E:AB:96:8B:65 Connected: yes Connection successful [CHG] Device D0:2E:AB:96:8B:65 ServicesResolved: yes [T115i SN:46775741]# info D0:2E:AB:96:8B:65 Device D0:2E:AB:96:8B:65 (public) Name: T115i SN:46775741 Alias: T115i SN:46775741 Paired: no Bonded: no Trusted: no Blocked: no Connected: yes LegacyPairing: no UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb) UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb) UUID: Device Information (0000180a-0000-1000-8000-00805f9b34fb) UUID: Unknown (00005a90-0000-1000-8000-00805f9b34fb) UUID: Unknown (0000fff0-0000-1000-8000-00805f9b34fb) Modalias: bluetooth:v02FEp0000d0110 ManufacturerData.Key: 0x02fe (766) ManufacturerData.Value: 25 03 05 06 %... hci0 D0:2E:AB:96:8B:65 type LE Public disconnected with reason 1 [CHG] Device D0:2E:AB:96:8B:65 ServicesResolved: no [CHG] Device D0:2E:AB:96:8B:65 Connected: no
是否知道为什么短时间后连接失败?
更新:
btmon-log 显示远程设备发送请求。 以更新连接参数、并被代理/内核拒绝。
bluetoothd[3840]: < ACL Data TX: Handl.. flags 0x00 dlen 7 #65 [hci0] 7.031683
ATT: Read Request (0x0a) len 2
Handle: 0x0027 Type: PnP ID (0x2a50)
> ACL Data RX: Handle 3584 flags 0x02 dlen 16 #66 [hci0] 7.100355
LE L2CAP: Connection Parameter Update Request (0x12) ident 1 len 8
Min interval: 32
Max interval: 80
Peripheral latency: 0
Timeout multiplier: 400
< ACL Data TX: Handle 3584 flags 0x00 dlen 10 #67 [hci0] 7.100409
LE L2CAP: Connection Parameter Update Response (0x13) ident 1 len 2
Result: Connection Parameters rejected (0x0001)
> HCI Event: Number of Completed Packets (0x13) plen 5 #68 [hci0] 7.167702
Num handles: 1
Handle: 3584 Address: D0:2E:AB:96:8B:65 (Texas Instruments)
Count: 1
#65: len 7 (0 Kb/s)
Latency: 136 msec (50-136 msec ~109 msec)
> ACL Data RX: Handle 3584 flags 0x02 dlen 12 #69 [hci0] 7.211792
ATT: Read Response (0x0b) len 7
> HCI Event: Number of Completed Packets (0x13) plen 5 #70 [hci0] 7.253243
Num handles: 1
Handle: 3584 Address: D0:2E:AB:96:8B:65 (Texas Instruments)
Count: 1
#67: len 10 (0 Kb/s)
Latency: 152 msec (50-152 msec ~131 msec)
> HCI Event: Disconnect Complete (0x05) plen 4 #71 [hci0] 35.423326
Status: Success (0x00)
Handle: 3584 Address: D0:2E:AB:96:8B:65 (Texas Instruments)
Reason: Connection Timeout (0x08)
@ MGMT Event: Device Disconnected (0x000c) plen 8 {0x0001} [hci0] 35.423573
LE Address: D0:2E:AB:96:8B:65 (Texas Instruments)
Reason: Connection timeout (0x01)
@ MGMT Event: Device Disconnected (0x000c) plen 8 {0x0002} [hci0] 35.423573
LE Address: D0:2E:AB:96:8B:65 (Texas Instruments)
Reason: Connection timeout (0x01)
@ MGMT Event: Command Complete (0x0001) plen 10 {0x0002} [hci0] 35.447424
Pair Device (0x0019) plen 7
Status: Timeout (0x08)
LE Address: D0:2E:AB:96:8B:65 (Texas Instruments)