To the kind attention of Nordic support team,
I have been doing the pairing between two devices using nrf gazell secured library. Then, what I want to do, it is to read how gazell secured library
has set addresses and timing.
I want to give those addresses and timing to a third device that has got only NOT secured gazell library, and know nothing about the key exchange: I want to be able to receive
correctly from the first transmitting device non encrypted pipe, and I want to receive garbage from the same device encrypted pipe.
I figured out that nrf_gzll_get_base_address_X and nrf_gzll_get_address_prefix_byte is ok to know how address are configured in the paired host.
But I'm still missing every other timing parameter and how to retrieve it in order to set in the third device.
I think in third device I need something like that:
nrf_gzll_set_base_address_0(OK); nrf_gzll_set_base_address_0(OK); nrf_gzll_set_address_prefix_byte(OK, 0x0);
nrf_gzll_set_base_address_1(OK); nrf_gzll_set_address_prefix_byte(1, OK); nrf_gzll_set_address_prefix_byte(2, OK); nrf_gzll_set_address_prefix_byte(3, OK); nrf_gzll_set_address_prefix_byte(4, OK); nrf_gzll_set_address_prefix_byte(5, OK); nrf_gzll_set_channel_table((uint8_t *)channels, PROTO_GZLL_CHANNEL_TAB_SIZE);
Might you help me in figure out how to retrieve every secured gazell library connection parameters? Please notice that connection parameters refers
to the standard pairing example that you provide in your SDK(15.2 - 15.3 -16 ).
I'll be updating this page for every parameter that I can find studying the code.
Thank you for your kindness
I saw that secured gazell init can be something like that:
// Initialize the Gazell Link Layer bool result_value = nrf_gzll_init(NRF_GZLL_MODE_HOST); GAZELLE_ERROR_CODE_CHECK(result_value);
result_value = nrf_gzll_set_timeslot_period(NRF_GZLLDE_RXPERIOD_DIV_2); // Half RX period on an nRF24Lxx device GAZELLE_ERROR_CODE_CHECK(result_value);
// Initialize the Gazell Pairing Library //gzp_erase_pairing_data(); gzp_init(); result_value = nrf_gzll_set_rx_pipes_enabled(nrf_gzll_get_rx_pipes_enabled() | (1 << UNENCRYPTED_DATA_PIPE)); GAZELLE_ERROR_CODE_CHECK(result_value);
result_value = nrf_gzll_enable(); GAZELLE_ERROR_CODE_CHECK(result_value);
Very useful is // nrf_gzll_datarate_t nrf_gzll_get_datarate data_rate = nrf_gzll_get_datarate(); // NRF_GZLL_DATARATE_2MBIT
In the secure project I also read:
chTableSize = nrf_gzll_get_channel_table_size ();
bool getCh = nrf_gzll_get_channel_table (p_channel_table, &chTableSize);
Now,after setting bitrate, channel table and address, in the third device (the one that has got no secured gazell library) I receive an interrupt every time a gazell packet is received in pipe0. Then using nrf_gzll_fetch_packet_from_rx_fifo I cannot have nothing useful. It may very well be because the packet on pipe0 is encrypted and nrf_gzll_fetch_packet_from_rx_fifo is not suitable to retrieve it correctly. Still it could be that there is some error in parameters configuration
In third device I can now receive in pipe 0, 1 e 2. Pipe 2 is the non encrypted one and I can read the payload in the right way. Pipe 1 is the encrypted one and I can get rubbish! That is perfect. Is it ok that I can receive on pie0 also? Cannot understand what it is , though. Maybe secured gazell library uses it? I have to check documentation. Thank you
If I remember correctly: pipe0 is the pipe used for pairing. pipe1 is encrypted, and pipe2-> is open.