Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Trouble integrating the micro-ecc library

Hi,

I am developing a central and peripheral device with secure LESC connections using SDK v11.

  • My peripheral device is an already developed product. I am simply adding BLE capability.
  • My central device is a new product and I have created a derivative of the ble_app_multirole_lesc "experimental" project for my code base.

I successfully fixed compiler and linker errors in the ble_app_multirole_lesc project and I have built the micro-ecc library and compiled it with the main project. 

I have added BLE client functionality to my peripheral device, without the micro-ecc library LESC connections, and I can successfully connect to the peripheral and write and read attributes. In this scenario, I have configured the central device for  Bonding, MITM, and LESC. However, because my peripheral device does not yet integrate the micro-ecc module or LESC configuration, the connection security is lv1 or lv2, not lv4.

Now I am trying to integrate the micro-ecc module into my peripheral project so I can go to lv4 and I am running into a problem. The file ecc.c makes a call to the nrf_drv_rng_block_rand function in the nrf_drv_rng.c file. This function makes a call to 

ASSERT(m_rng_cb.state == NRF_DRV_STATE_INITIALIZED);

This fails and stops execution of my code. The only place m_rng_cb.state is set to NRF_DRV_STATE_INITIALIZED is in the nrf_drv_rng_init function. However, this init function is never called. The thing that stumps me is that the call to this init function is not made in my central code either, and yet the assert does not fail. 

I can see no differences in the two projects related to the micro-ecc functionality and yet one gets an assert error and the other does not.

Parents Reply Children
Related