Skip to content

Commit 0c71d15

Browse files
Daniel Jaecklemluis1
authored andcommitted
Fixed an issue when receiving downlinks in class C window during a class A procedure.
1 parent d02b2f8 commit 0c71d15

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/mac/LoRaMac.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,11 @@ static void ProcessRadioRxDone( void )
842842
MacCtx.McpsIndication.ResponseTimeout = 0;
843843

844844
Radio.Sleep( );
845-
TimerStop( &MacCtx.RxWindowTimer2 );
845+
846+
if( MacCtx.McpsIndication.RxSlot == RX_SLOT_WIN_1 )
847+
{
848+
TimerStop( &MacCtx.RxWindowTimer2 );
849+
}
846850

847851
// This function must be called even if we are not in class b mode yet.
848852
if( LoRaMacClassBRxBeacon( payload, size ) == true )
@@ -1225,7 +1229,11 @@ static void ProcessRadioRxDone( void )
12251229
OnRetransmitTimeoutTimerEvent( NULL );
12261230
}
12271231
}
1228-
MacCtx.MacFlags.Bits.MacDone = 1;
1232+
1233+
if( MacCtx.McpsIndication.RxSlot != RX_SLOT_WIN_CLASS_C )
1234+
{
1235+
MacCtx.MacFlags.Bits.MacDone = 1;
1236+
}
12291237

12301238
UpdateRxSlotIdleState( );
12311239
}

0 commit comments

Comments
 (0)