麻烦与bluez 5.20+上的iOS配对蓝图

时间:2014-10-02 02:44:02

标签: bluetooth-lowenergy bluez

此问题仅在我更新到Bluez-5.20 +(或可能更早)

后发生

我使用维护者模式和实验编译了Bluez,以获得服务列表中包含的gatt-example,并通过hciconfig启用广告。

每次我连接iOS(使用LightBlue等应用程序)时,我都会在此事件后断开连接:

> HCI Event: LE Meta Event (0x3e) plen 19                                                                           [hci0] 48449.282018
  LE Connection Complete (0x01)
    Status: Success (0x00)
    Handle: 64
    Role: Slave (0x01)
    Peer address type: Random (0x01)
    Peer address: 7A:A0:D6:50:69:CE (Resolvable)
    Connection interval: 30.00 msec (0x0018)
    Connection latency: 0.00 msec (0x0000)
    Supervision timeout: 720 msec (0x0048)
    Master clock accuracy: 0x05
@ Device Connected: 7A:A0:D6:50:69:CE (2) flags 0x0000
> HCI Event: LE Meta Event (0x3e) plen 13                                                                           [hci0] 48449.356021
  LE Long Term Key Request (0x05)
    Handle: 64
    Random number: be7ee4252ef5d67f
    Encryption diversifier: 0x57f5
< HCI Command: LE Long Term Key Request Reply (0x08|0x001a) plen 18                                                 [hci0] 48449.356058
    Handle: 64
    Long term key: 696469e1eaa559f7707643bf410ab39b
> HCI Event: Command Complete (0x0e) plen 6                                                                         [hci0] 48449.357019
  LE Long Term Key Request Reply (0x08|0x001a) ncmd 1
    Status: Success (0x00)
    Handle: 64
> HCI Event: Encryption Change (0x08) plen 4                                                                        [hci0] 48449.506019
    Status: Success (0x00)
    Handle: 64
    Encryption: Enabled with AES-CCM (0x01)
> ACL Data RX: Handle 64 flags 0x02 dlen 7                                                                          [hci0] 48449.594893
  ATT: Exchange MTU Request (0x02) len 2
    Client RX MTU: 158
< HCI Command: Disconnect (0x01|0x0006) plen 3                                                                      [hci0] 48453.289196
    Handle: 64
    Reason: Remote User Terminated Connection (0x13)
> HCI Event: Command Status (0x0f) plen 4                                                                           [hci0] 48453.289992
  Disconnect (0x01|0x0006) ncmd 1
    Status: Success (0x00)
> HCI Event: Disconnect Complete (0x05) plen 4                                                                      [hci0] 48453.345991
    Status: Success (0x00)
    Handle: 64
    Reason: Connection Terminated By Local Host (0x16)

蓝牙调试日志:

bluetoothd[3381]: src/adapter.c:resume_discovery() 
bluetoothd[3381]: src/adapter.c:connected_callback() hci0 device 7A:A0:D6:50:69:CE     connected eir_len 0
bluetoothd[3381]: src/device.c:device_create() dst 7A:A0:D6:50:69:CE
bluetoothd[3381]: src/device.c:device_new() address 7A:A0:D6:50:69:CE
bluetoothd[3381]: src/device.c:device_new() Creating device   /org/bluez/hci0/dev_7A_A0_D6_50_69_CE
bluetoothd[3381]: src/attrib-server.c:connect_event() 
bluetoothd[3381]: src/device.c:device_create() dst 7A:A0:D6:50:69:CE
bluetoothd[3381]: src/device.c:device_new() address 7A:A0:D6:50:69:CE
bluetoothd[3381]: src/device.c:device_new() Creating device   /org/bluez/hci0/dev_7A_A0_D6_50_69_CE
bluetoothd[3381]: Unable to register device interface for 7A:A0:D6:50:69:CE
bluetoothd[3381]: src/device.c:device_free() 0x11dd220
bluetoothd[3381]: src/adapter.c:dev_disconnected() Device 7A:A0:D6:50:69:CE   disconnected, reason 2
bluetoothd[3381]: src/adapter.c:adapter_remove_connection() 
bluetoothd[3381]: src/adapter.c:adapter_remove_connection() Removing temporary device /org/bluez/hci0/dev_7A_A0_D6_50_69_CE
bluetoothd[3381]: src/device.c:device_remove() Removing device /org/bluez/hci0/dev_7A_A0_D6_50_69_CE
bluetoothd[3381]: src/device.c:btd_device_unref() Freeing device  /org/bluez/hci0/dev_7A_A0_D6_50_69_CE
bluetoothd[3381]: src/device.c:device_free() 0x11e9720
bluetoothd[3381]: plugins/policy.c:disconnect_cb() reason 2

对此有任何可能的解释吗?

0 个答案:

没有答案