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

Bonding error 132 with HID example.

Hello,

I am trying to add bonding functionality with a passkey to  HID device, and use for this  ble_app_gls_pca10040_s132 example as basic project.

But it  don`t want to connect as primary  example. It no asking a passkey from  phone. Just appeared for a second.

    sec_param.bond           = SEC_PARAM_BOND; //1
    sec_param.mitm           = SEC_PARAM_MITM;//1
    sec_param.lesc           = SEC_PARAM_LESC;//1
    sec_param.keypress       = SEC_PARAM_KEYPRESS; //0
    sec_param.io_caps        = SEC_PARAM_IO_CAPABILITIES;//BLE_GAP_IO_CAPS_DISPLAY_ONLY
    sec_param.oob            = SEC_PARAM_OOB;
    sec_param.min_key_size   = SEC_PARAM_MIN_KEY_SIZE;
    sec_param.max_key_size   = SEC_PARAM_MAX_KEY_SIZE;
    sec_param.kdist_own.enc  = 1;
    sec_param.kdist_own.id   = 1;
    sec_param.kdist_peer.enc = 1;
    sec_param.kdist_peer.id  = 1;

Parents
  • Hi,

    Is it so that your HID device has a display (or another method to display the passkey)? That is what you have specified (BLE_GAP_IO_CAPS_DISPLAY_ONLY), but I just want to be sure.

    But it  don`t want to connect as primary  example. It no asking a passkey from  phone. Just appeared for a second.

    It is not clear to me what is happening. Can you elaborate on the problem?

    Also, it would be interesting to know more about your implementation. As you can see from the Glucose Application (which use passkey), there is not much you need to do other than configuring the IO capabilities and MITM as you have, and display the passkey when you get a BLE_GAP_EVT_PASSKEY_DISPLAY event.

  • Ok. I take for a base glucose app. When I tried to connect to nrf52 device from android phone. I got pop-up window with line for  passkey enter.
    When I try  the same procedure with my "HID" device, the pop-up window appeared for a second with no line for passkey, but with numbers instead.

  • Hi,

    NamoAton said:
    When I try  the same procedure with my "HID" device, the pop-up window appeared for a second with no line for passkey, but with numbers instead.

    That is odd. When the initiator (phone) supports display and keyboard and the responder (nRF) supports display only, the MITM protection should always be in the form of passkey entry where the responder displays the key and it is input on the initiator. This is the same for both LE legacy and LE secure pairing.

    The fact that you see numbers instead, could be that it is for numeric comparison. Is there also a Yes/No button there? However, if you really set the IO capabilities to  BLE_GAP_IO_CAPS_DISPLAY_ONLY, then the numeric comparison is not possible per Bluetooth specification. The error 132 (0x84) is BLE_GAP_SEC_STATUS_CONFIRM_VALUE, which typically indicates that the wrong passkey was entered or that the numeric comparison was rejected (pressed no). In any case, numeric comparison should not be an option in this setup. Which phone model are you testing with, and which version of Android does it use?

  • which version of Android does it use?

    Samsung S9, Android 9.
    I can send you code in pm. Maybe this would be useful to resolve porblem..

  • Hi,

    Yes, that could be useful. Please make a new private question and refer to this thread, and upload your code there. Please upload the complete project so that I can drop t in the SDK and build it out of the box. Does it run on the DK? Also, please specify SDK version and a simple test procedure.

Reply Children
Related