cancel
Showing results for 
Search instead for 
Did you mean: 

How can I get the encrypted diversifier (EDIV) when BlueNRG2 is bonded?

Sbias.1
Associate

Hi,

I work with the Nucleo-L476RG and the X-Nucleo-BNRG2A1 (BlueNRG2) and I would like to pair and bond this device to a Nordic nrf52840.

I followed the programming guideline and succeed to have a bond the devices. The BlueNRG2 is central and the Nordic is peripheral.

My problem is when I reconnect the devices, I have to start encryption with the "hci_le_start_encryption" function but I don't know how can I get the parameters needed for this function (i.e Random_Number, Encrypted_Diversifier, Long_Term_Key) which are used for the first pairing.

I tried to get the LTK with:

aci_hal_read_config_data(CONFIG_DATA_ER_OFFSET, &ltk_len, long_term_key);

But I am not sure this is the good way.

And I have no idea how can I get the encryption diversifier.

Thank you for your help.

0 REPLIES 0