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

Getting HardFault Error when using BLE LESC pairing

I am using SDK nRF5_SDK_14.0.0_3bcc1f7 in my project. All the features was working but i need to add the security mode 1 level 4 security in our BLE device with LESC. I have added security in buttonless DFU code taking reference from ble_app_multirole_lesc example code. I am using a button for MITM.

#define LESC_DEBUG_MODE 0 /**< Set to 1 to use LESC debug keys, allows you to use a sniffer to inspect traffic. */
#define LESC_MITM_NC 1 /**< Use MITM (Numeric Comparison). */
#define SEC_PARAMS_BOND 1 /**< Perform bonding. */
#if LESC_MITM_NC
#define SEC_PARAMS_MITM 1 /**< Man In The Middle protection required. */
#define SEC_PARAMS_IO_CAPABILITIES BLE_GAP_IO_CAPS_DISPLAY_YESNO /**< Display Yes/No to force Numeric Comparison. */
#else
#define SEC_PARAMS_MITM 0 /**< Man In The Middle protection required. */
#define SEC_PARAMS_IO_CAPABILITIES BLE_GAP_IO_CAPS_NONE /**< No I/O caps. */
#endif
#define SEC_PARAMS_LESC 1 /**< LE Secure Connections pairing required. */
#define SEC_PARAMS_KEYPRESS 0 /**< Keypress notifications not required. */
#define SEC_PARAMS_OOB 0 /**< Out Of Band data not available. */
#define SEC_PARAMS_MIN_KEY_SIZE 7 /**< Minimum encryption key size in octets. */
#define SEC_PARAMS_MAX_KEY_SIZE 16 /**< Maximum encryption key size in octets. */
#define BLE_GAP_LESC_P256_SK_LEN 32

Pairing and Bonding is working as expected, but sometimes I observed during pairing process if I press the device button, device go in hang state and sometimes cause HardFault Error. I check with debug mode, but nothing found the cause for that. How can i check what is causing the HardFault Error? And is there any known issue with this SDK for LESC connection that can cause this HardFault Error? 

Parents Reply Children
No Data
Related