This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Device manager DM_EVT_SECURITY_SETUP_COMPLETE error

I'm using s110 softdevice 6.1 SDK. I do bonding in my application the same way as in the ble_app_hrs example (bond, no_mitm). I have a charactarestic set to SEC_MODE_SET_ENC_NO_MITM. I use writing into this characteristic initially to trigger the bonding process.

  1. If I do not clear persistent data during startup and unpair the device in iOS: the iOS device re-requests pairing, but on the nordic chip I get an error: DM_DEVICE_CONTEXT_FULL with the DM_EVT_SECURITY_SETUP_COMPLETE. Previously I get both DM_EVT_SECURITY_SETUP and DM_EVT_LINK_SECURED. As a result iOS and the nrf chip fail to communicate.

  2. If I clear persistent data for the device manager, and don't unpair the device in iOS. The iOS application connects, but doesn't re-request bonding. I get no error, but the devices are still unable to communicate. I cannot unpair programmatically in iOS. Android handles this by re-initializing the bonding process, but it doesn't seem to happen on iOS.

The 2) is probably unsolvable. For 1) is there a way to detect if the peer device was unbonded and delete the old bonding information and restart the process?

  • Okay, I must have connected 7 times before that error. I cannot reproduce it before seven consecutive connections from the same device. The 8th pairing causes the error. So when and how should I delete the rest of paired information. I still didn't find any way to list the bonded peers and delete the oldest ones.

  • I was trying to implement this, but the 6.1 device manager seems to have a bug

    Lines from 2574 in device_manager_peripherla.c

                            if (p_ble_evt->evt.gap_evt.params.auth_status.central_kex.irk == 1)
                            {
                                                                m_peer_table[index].irk =
                                    p_ble_evt->evt.gap_evt.params.auth_status.central_keys.irk;
                                m_peer_table[index].id_bitmap &= (~IRK_ENTRY);
                            }
    

    replace to this

                            if (p_ble_evt->evt.gap_evt.params.auth_status.central_kex.irk == 1)
                            {
                                                                m_peer_table[device_index].irk =
                                    p_ble_evt->evt.gap_evt.params.auth_status.central_keys.irk;
                                m_peer_table[device_index].id_bitmap &= (~IRK_ENTRY);
                            }
    

    Otherwise I get only valid irk for the first entry in the whitelist, the rest is nilled data.

    Is this fixed in newer sdks? Can we use newer sdk and softdevice with nrf58188_xxAA (CEAA)?

  • Yes, this bug was fixed in SDK 7.1.0. CEAA is an IC revision 2 chip, it is compatible with SoftDevice S110 7.1.0 (and 8.0.0, if you disable CPU and radio concurrency, see its release notes). However, SDK 7.0.1 and later has not been tested on IC revision 2. Please see the nRF51 Series Compatibility Matrix for more information. This question may also provide some insight.

Related