From 07c6163aa1319e5fc05687e8f462769707a554ed Mon Sep 17 00:00:00 2001 From: TMRh20 Date: Sun, 1 Oct 2023 00:15:30 -0600 Subject: [PATCH] Fix for ack disabled,no CRC - Disable checking of packet counter and duplicate CRC when AA is 0 and CRC checking is disabled --- src/nrf_to_nrf.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/nrf_to_nrf.cpp b/src/nrf_to_nrf.cpp index 0252a6e..b6e7e8c 100644 --- a/src/nrf_to_nrf.cpp +++ b/src/nrf_to_nrf.cpp @@ -264,9 +264,11 @@ bool nrf_to_nrf::available(uint8_t* pipe_num) // If the packet has the same ID number and data, it is most likely a // duplicate - if (packetCtr == lastPacketCounter && packetData == lastData) { + if(NRF_RADIO->CRCCNF != 0){ //If CRC enabled, check this data + if (packetCtr == lastPacketCounter && packetData == lastData) { NRF_RADIO->TASKS_START = 1; return 0; + } } #if defined CCM_ENCRYPTION_ENABLED if (enableEncryption) {