Ble with Windows 10 - BLE_GAP_EVT_DISCONNECTED with reason 0x13

Hai, how you doing?

I am facing difficulty in trying to connect ble devices with windows 10. I am using BLE dongle APLIC WDP 304747 (Also tried another couple of BLE dongles).

I am using nrf52840 DK and Softdevice s140_nrf52_7.2.0. SDK version is 17.0.2

Initially a connection is successfully established between the windows and ble application. Then a disconnect event happens with a return code of 0x13. 

 

00> <debug> app: FDS event 0 with result 0.
00> 
00> <debug> nrf_ble_lesc: Initialized nrf_crypto.
00> 
00> <debug> nrf_ble_lesc: Initialized nrf_ble_lesc.
00> 
00> <debug> nrf_ble_lesc: Generating ECC key pair
00> 
00> <info> app: Erase bonds!
00> 
00> <info> peer_manager_handler: All peers deleted.
00> 
00> <info> app: Fast advertising.
00> 
00> <info> app: Application started
00> 
00> <debug> nrf_ble_gatt: Requesting to update ATT MTU to 247 bytes on connection 0x0.
00> 
00> <debug> nrf_ble_gatt: Updating data length to 251 on connection 0x0.
00> 
00> <info> app: Connected.
00> 
00> <debug> nrf_ble_gatt: Peer on connection 0x0 requested an ATT MTU of 527 bytes.
00> 
00> <debug> nrf_ble_gatt: Updating ATT MTU to 247 bytes (desired: 247) on connection 0x0.
00> 
00> <debug> nrf_ble_gatt: ATT MTU updated to 247 bytes on connection 0x0 (response).
00> 
00> <info> app: GATT ATT MTU on connection 0x0 changed to 247.
00> 
00> <debug> app: BLE_GAP_EVT_SEC_PARAMS_REQUEST
00> 
00> <debug> nrf_ble_gatt: Data length updated to 251 on connection 0x0.
00> 
00> <debug> nrf_ble_gatt: max_rx_octets: 251
00> 
00> <debug> nrf_ble_gatt: max_tx_octets: 251
00> 
00> <debug> nrf_ble_gatt: max_rx_time: 2120
00> 
00> <debug> nrf_ble_gatt: max_tx_time: 2120
00> 
00> <info> peer_manager_handler: Connection secured: role: Peripheral, conn_handle: 0, procedure: Bonding
00> 
00> <info> app: BLE_GAP_EVT_AUTH_STATUS: status=0x0 bond=0x1 lv4: 0 kdist_own:0x1 kdist_peer:0x0
00> 
00> <debug> app: FDS event 1 with result 0.
00> 
00> <info> app: FDS write success.
00> 
00> <info> peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Bonding data, action: Update
00> 
00> <debug> app: FDS event 1 with result 0.
00> 
00> <info> app: FDS write success.
00> 
00> <info> peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Peer rank, action: Update
00> 
00> <debug> app: FDS event 1 with result 0.
00> 
00> <info> app: FDS write success.
00> 
00> <info> peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Local database, action: Update
00> 
00> <debug> app: FDS event 1 with result 0.
00> 
00> <info> app: FDS write success.
00> 
00> <info> peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Central address resolution, action: Update
00> 
00> <debug> app: FDS event 2 with result 0.
00> 
00> <info> app: FDS update success.
00> 
00> <info> peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Local database, action: Update
00> 
00> <info> app: Fast advertising.
00> 
00> <info> app: Disconnected, reason 19.

I noticed the issue with our custom application. Android and iOS doesnot have this issue. 

I then tried to flash the peripheral examples to the DK and obsereved the same behaviour. 

You can reproduce this at your end by flashing nordic blinky peripheral example on to nrf5 device (SDK 17 0 2 and s140_nrf52_7.2.0.). 

What could be the reason for this. I went through the forum and tried checking various pairing and bonding documentation. But if all the examples in the SDK has the same issue, then I think its better to report before digging deeper in it. Can you please try to reproduce it from your end and help me solve this issue?

Best regards,

Adarsh

Parents
  • Hi Adarsh

    So, I should have mentioned this in my last reply, but since you're doing encryption (bonding/pairing), you'll need to let the sniffer "in on" the connection in order to get all the information, as I think we're not getting the full sniffer trace here. You can see how to sniff the pairing procedure of a connection and then the encrypted data here

    Then there are a few more pointers. First off, it seems like some of the services the computer requests are Bluetooth Mesh provisioning, which a standard BLE device won't support, and thus the nRF device responds with errors of "attribute not found". Is this something you request specifically on the computer side or do you just connect and pair and leave the connection be for a few seconds?

    After discovery seems to be complete (unclear, as we don't have access to any encrypted information), it seems like the Windows central, after a few tries disconnects due to the nRF not replying to the Connection Update indications it sends. How do you handle Connection Parameter updates in your nRF application?

    Best regards,

    Simon

Reply
  • Hi Adarsh

    So, I should have mentioned this in my last reply, but since you're doing encryption (bonding/pairing), you'll need to let the sniffer "in on" the connection in order to get all the information, as I think we're not getting the full sniffer trace here. You can see how to sniff the pairing procedure of a connection and then the encrypted data here

    Then there are a few more pointers. First off, it seems like some of the services the computer requests are Bluetooth Mesh provisioning, which a standard BLE device won't support, and thus the nRF device responds with errors of "attribute not found". Is this something you request specifically on the computer side or do you just connect and pair and leave the connection be for a few seconds?

    After discovery seems to be complete (unclear, as we don't have access to any encrypted information), it seems like the Windows central, after a few tries disconnects due to the nRF not replying to the Connection Update indications it sends. How do you handle Connection Parameter updates in your nRF application?

    Best regards,

    Simon

Children
No Data
Related