From 6231a5d65806142a6f887e6183227b8da9e49238 Mon Sep 17 00:00:00 2001 From: Miguel Luis Date: Mon, 17 Jun 2019 13:44:00 +0200 Subject: [PATCH] Increase ADR ACK Counter only, if: - no frame reception - frame reception not in RX1 and not in RX2 --- src/mac/LoRaMac.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mac/LoRaMac.c b/src/mac/LoRaMac.c index a568eb723..319a86fbb 100644 --- a/src/mac/LoRaMac.c +++ b/src/mac/LoRaMac.c @@ -2985,10 +2985,11 @@ static bool CheckRetransConfirmedUplink( void ) return false; } - static bool StopRetransmission( void ) { - if( MacCtx.MacFlags.Bits.McpsInd == 0 ) + if( ( MacCtx.MacFlags.Bits.McpsInd == 0 ) || + ( ( MacCtx.McpsIndication.RxSlot != RX_SLOT_WIN_1 ) && + ( MacCtx.McpsIndication.RxSlot != RX_SLOT_WIN_2 ) ) ) { // Maximum repetitions without downlink. Increase ADR Ack counter. // Only process the case when the MAC did not receive a downlink. if( MacCtx.NvmCtx->AdrCtrlOn == true )