This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to shorten delay in example ble_app_gls?

Thanks in advanced. The platform is: nrf52832, sdk17.0.2, in \examples\ble_peripheral\ble_app_gls. After key input, it costs about 10s to get pass through result, but during these 10s, custom can see services and perform actions on them, which will cause wrong operation and get unexpected result. So would any expert tell me how to shorten such authority delay?

0> <info> app_timer: RTC: initialized.
0> <info> app: Glucose example started.
0> <info> app: Fast advertising
0> <info> peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Peer rank, action: Update, no change
0> <info> app: Connected
0> <info> app: Passkey: 005704
0> <info> app: BLE_GAP_EVT_LESC_DHKEY_REQUEST
0> <info> nrf_ble_lesc: Calling sd_ble_gap_lesc_dhkey_reply on conn_handle: 0
0> <info> peer_manager_handler: Connection secured: role: Peripheral, conn_handle: 0, procedure: Bonding  ---->after 10s that I can see this trace
0> <info> peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Peer rank, action: Update, no change
0> <info> app: Link secured. Role: 1. conn_handle: 0, Procedure: 1
0> <info> app: BLE_GAP_EVT_AUTH_STATUS: status=0x0 bond=0x1 lv4: 1 kdist_own:0x3 kdist_peer:0x2
0> <info> peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Bonding data, action: Update
0> <info> peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Local database, action: Update

  • Hi

    I looked into this, and was able to reproduce this on my end as well. From the sniffer trace I took of the pairing process, it looks like there are quite a few unnecessary handshakes after I enter the passkey on my Android device (acting as a central). I have contacted experts on the matter and I'll get back to you when we get to the bottom of this. Thank you for notifying us of this issue!

    Best regards,

    Simon

  • Hi

    After talking with our Android experts regarding this issue, this delay comes from the OS processing the pairing/connection. There is nothing in the nRFConnect app for Android that handles bonding, as this is done entirely in the OS. I'm sorry, but there is nothing to do on the phone side to reduce the pairing process I'm afraid. You can try using another pairing method that does not take as much time to complete pairing process.

    Best regards,

    Simon

  • Thanks for reply. So if the central is not Android OS device, then \examples\ble_peripheral\ble_app_gls can be paired normally. But there is still risk exist when custom use phone to config the peripheral's param. It seems common because your and mine phone both encounter this phenomenon. Thanks again.

  • Hi

    According to one of my colleagues, iOS devices will have a noticable delay during pairing with LESC_DHKEY as well, so yes, it is common to see a delay during this kind of pairing when using mobile phones in general.

    Best regards,

    Simon

Related