ble_app_hids_keyboard will not run if SEC_PARAM_BOND = 0

Hi Nordic Team,

We have no problem with using ble_app_hids_keyboard app,

However, in some use cases, we would like the application to run as "Just Works" to access other characteristics, say battery voltage characteristics for example. And well in some cases depending on the connected client HID can work without bonding too.

 Testing this just with nrf52 DVK,   When SEC_PARAM_BOND  = 0, the firmware faults.

In debug, runs to the last call in Main.c peer_manager_init();

Appears to be in the peer manager  pm_init(void)?

Any thoughs on how we can get this to run?

Regards,

Eric

  • Appreciate your refrence for  "difference between pairing and bonding".

    We need "just works" connect without pairing  for this project (when optionally will not be using the HID), such that on disconnect, peripheral and central "forget" about each other.  Just like in the ble_app_template example.

    I do note that the template example has SEC_PARAM_BOND   1  and settings as below - yet behaves as just works. A bit confusing

    SEC_PARAM_BOND                  1
    sec_param.kdist_own.enc  = 1;
    sec_param.kdist_own.id   = 1;
    sec_param.kdist_peer.enc = 1;
     sec_param.kdist_peer.id  = 1;

    Is this requirement going to be impossible to meet?

  • Ah - In my lab, trying to sort this  but havnig DK pairing issues -  It became an exellent example of why in we do not want pairing in this situation!
    Turns out the nrf52DK was picking up my laptop 10 meters away in another room (that had paired the day before), but DK keys erased. so connect/disconnect.

    When HID is in use, paring/bonding fine, but when our custom app in use, its connect only, client uses to get data, then forget on both on discconnect.

  • Hi again

    Okay, then I think I got you. Not bonding nor pairing, then you can check out the ble_app_uart example that does neither and just connects and initializes the Nordic UART Service over BLE without any of the security methods.

    The ble_app_hrs shows how to use pairing without bonding. I understand your confusion.

    Best regards,

    Simon

  • Thanks again!
    Funny I woke up thinking of checking the  ble_app_uart example. I see it has NO peer_manager_init or pm_evt_handler
    and I see  in ble_evt_handler case BLE_GAP_EVT_SEC_PARAMS_REQUEST:
                // Pairing not supported
                err_code = sd_ble_gap_sec_params_reply(m_conn_handle, BLE_GAP_SEC_STATUS_PAIRING_NOT_SUPP, NULL, NULL);

    I'll check this out.
    Regards,
    Eric

Related