To the kind attention of Nordic support team,
I'm evaluating your standard gzp example (proprietary_rf/gzll/gzp_dynamic_pairing, sdk15.3). From what I see, the device to host communication it is very well
implemented and device has got callbacks to understand when a transmission has been completed.
On host side I was imagining that after a packet has been received (nrf_gzll_get_rx_fifo_packet_count, nrf_gzll_fetch_packet_from_rx_fifo) it would be possible
to call something like this:
unsigned char provaMasterToSlave[9] = {'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x'};
if(nrf_gzll_ok_to_add_packet_to_tx_fifo(UNENCRYPTED_DATA_PIPE))
{
nrf_gzll_add_packet_to_tx_fifo(UNENCRYPTED_DATA_PIPE,
provaMasterToSlave,
9);
} to have host communicating data towards the device.
And then added something like that
if (nrf_gzll_get_rx_fifo_packet_count(UNENCRYPTED_DATA_PIPE))
{
unsigned char length;
if ((nrf_gzll_fetch_packet_from_rx_fifo(UNENCRYPTED_DATA_PIPE, payload, &length)) == true)
{
length = 0;
myCount++;
}
} in slave . But this approach seems not to work. May you please point me to the right direction? Thank you. What is the best way to implement the host to device communication using
unencrypted pipe?
//----------------------------------------------------
I experimented a little bit. in the host, every time a receive an encrypted packet, I prepare the ack for the non encrypted packet calling:
unsigned char provaMasterToSlave[9] = {'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x'};
if(nrf_gzll_ok_to_add_packet_to_tx_fifo(UNENCRYPTED_DATA_PIPE))
{
nrf_gzll_add_packet_to_tx_fifo(UNENCRYPTED_DATA_PIPE,
provaMasterToSlave,
9);
}.
For the slave I use what I have been writing before:
if (nrf_gzll_get_rx_fifo_packet_count(UNENCRYPTED_DATA_PIPE))
{
unsigned char length;
if ((nrf_gzll_fetch_packet_from_rx_fifo(UNENCRYPTED_DATA_PIPE, payload, &length)) == true)
{
length = 0;
myCount++;
}
}
Preparing the non encrypted ack packet in the host every time the host receives an encrypted packet seems working to have bi-directional communication slightly modifying the standard gzp secured library example. Is it the right way to use library routines? Do you recommend anything else that should be very important to consider to obtain bi directional communication?
Do you confirm that host can only send messages to the slaves using non encrypted PIPEs?
Thank you