Hi, I'm using the nRF52840 DK with SDK 17.0.2.
I've set selective_auto_ack to true, which should allow the use of dynamic ACK (or ACK payload).
I have two types of data packets, one requires an ack, the other does not. Both are received in RX.
For testing, I set noack = false for the repeated packet that requires an ack.
static nrf_esb_payload_t t_payload = NRF_ESB_CREATE_PAYLOAD(0, 0xAB);
void test_packet_timer_handler(void *p_context)
{
t_payload.noack = false;
if (nrf_esb_write_payload(&t_payload) == NRF_SUCCESS)
{
NRF_LOG_ERROR("Test packet sent: %02x", t_payload.data[0]);
}
else
{
NRF_LOG_ERROR("Failed to send test packet");
}
}
Below is the RX esb_evt_handler, and the log confirms that the ACK payload is sent successfully.
case NRF_ESB_EVENT_RX_RECEIVED:
NRF_LOG_ERROR("RX RECEIVED EVENT");
if (nrf_esb_read_rx_payload(&rx_payload) == NRF_SUCCESS)
{
NRF_LOG_ERROR("Receiving packet: %02x", rx_payload.data[0]);
nrf_esb_payload_t t_payload = NRF_ESB_CREATE_PAYLOAD(0, 0x42);
t_payload.pipe = rx_payload.pipe;
t_payload.noack = false;
if (nrf_esb_write_payload(&t_payload) == NRF_SUCCESS
)
{
NRF_LOG_ERROR("ack setup done: %02x", t_payload.data[0]);
}
However, the TX side does not receive anything. Below is the log test I add in TX and RX received event is not triggerd.
case NRF_ESB_EVENT_RX_RECEIVED:
NRF_LOG_ERROR("RX RECEIVED EVENT");
while (nrf_esb_read_rx_payload(&rx_payload) == NRF_SUCCESS)
{
if (rx_payload.length > 0)
{
NRF_LOG_ERROR("TX RECEIVED ack PAYLOAD");
}
}
break;
From the log, RX side triggers TX success and RX received enevt.
I've also tried both disabling and enabling selective_auto_ack in RX, but the result remains the same.

And TX shows TX failed, which means TX doesn't receive ACK, right?

Is my understanding correct?
I really need your help. Thank you!!