How I changed the PASSKEY in NRF52832??

I want to change static_passkey from "000000" to "0000".

But It doesn't work when I update changed code to board.

I changed like below pictures.(000000 -> 0000)

And this is the code of PASSKEY

Please help me.

Parents Reply Children
  • Oh, Sorry.
    I didn't write that part.

    I coded that part like this :

    #define SEC_PARAM_BOND                  1                                       /**< Perform bonding. */
    #define SEC_PARAM_MITM 1 /**< Man In The Middle protection not required. */
    #define SEC_PARAM_LESC 0 /**< LE Secure Connections not enabled. */
    #define SEC_PARAM_KEYPRESS 0 /**< Keypress notifications not enabled. */
    #define SEC_PARAM_IO_CAPABILITIES BLE_GAP_IO_CAPS_DISPLAY_ONLY /**< Display only I/O capabilities. */
    #define SEC_PARAM_OOB 0 /**< Out Of Band data not available. */
    #define SEC_PARAM_MIN_KEY_SIZE 7 /**< Minimum encryption key size. */
    #define SEC_PARAM_MAX_KEY_SIZE 16 /**< Maximum encryption key size. */

    #define STATIC_PASSKEY "000000" /**< Paring pass-key */

    But I found the reason of this issue.

    The passkey must be 6 digits. So I can't change passkey to 4 digits.

    I heard that this is related to Bluetooth, Android security regulations.

    Is it right??

Related