Skip to content

Commit a520ada

Browse files
committed
Fixed re-transmissions handling when ClassB or ClassC downlink is received
1 parent bc5d089 commit a520ada

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/mac/LoRaMac.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1237,11 +1237,16 @@ static void ProcessRadioRxDone( void )
12371237
}
12381238

12391239
// Verify if we need to disable the RetransmitTimeoutTimer
1240-
if( MacCtx.NodeAckRequested == true )
1240+
// Only aplies if downlink is received on Rx1 or Rx2 windows.
1241+
if( ( MacCtx.McpsIndication.RxSlot == RX_SLOT_WIN_1 ) ||
1242+
( MacCtx.McpsIndication.RxSlot == RX_SLOT_WIN_2 ) )
12411243
{
1242-
if( MacCtx.McpsConfirm.AckReceived == true )
1244+
if( MacCtx.NodeAckRequested == true )
12431245
{
1244-
OnRetransmitTimeoutTimerEvent( NULL );
1246+
if( MacCtx.McpsConfirm.AckReceived == true )
1247+
{
1248+
OnRetransmitTimeoutTimerEvent( NULL );
1249+
}
12451250
}
12461251
}
12471252

0 commit comments

Comments
 (0)