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

SDK15 pm_conn_secure() doesn't bond

Hi!

After connected and get log info "Connected." I start bonding:

// Initiate bonding.
err_code = pm_conn_secure(p_ble_evt->evt.common_evt.conn_handle, false);
if (err_code != NRF_ERROR_INVALID_STATE)
{
    APP_ERROR_CHECK(err_code);
}

but there is no any success message. 

 0> <info> app: Heart Rate collector example started.
 0> <info> app: Starting scan.
 0> <info> app: Connected.
 0> <info> app: Disconnected, reason 0x8.
 0> <info> app: Starting scan.
 0> <info> app: Connected.
 0> <info> app: Disconnected, reason 0x8.
 0> <info> app: Starting scan.
 0> <info> app: Connected.
 0> <info> app: Disconnected, reason 0x8.
 0> <info> app: Starting scan.
 0> <info> app: Connected.
 0> <info> app: Disconnected, reason 0x8.
 0> <info> app: Starting scan.

Therefore nRF52 SDK15 can't to made secure bond.

Why?

Parents Reply
  • FormerMember
    0 FormerMember in reply to Mikhail

    In the sniffer log, there are no encryption events.

    What happens is that the central (SDK 15) sends a MTU exchange request, but the peripheral never responds. To make it work, the peripherhal has to respond to the MTU exchange request, using sd_ble_gatts_exchange_mtu_reply(), described in this message sequence chart. In SDK 15, this is "natively" implemented, but in SDK 13, it is not.

     

    (I'm sorry for the late reply, this thread was for some reason in the wrong "queue", so I didn't see it..)

Children
Related