Skip to content

Commit d82a6a4

Browse files
author
Daniel Jaeckle
committed
Issue(#471): DevAddr in McpsIndication
1 parent 98e3662 commit d82a6a4

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/mac/LoRaMac.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -923,6 +923,7 @@ static void ProcessRadioRxDone( void )
923923
MacCtx.McpsIndication.AckReceived = false;
924924
MacCtx.McpsIndication.DownLinkCounter = 0;
925925
MacCtx.McpsIndication.McpsIndication = MCPS_UNCONFIRMED;
926+
MacCtx.McpsIndication.DevAddress = 0;
926927

927928
Radio.Sleep( );
928929
TimerStop( &MacCtx.RxWindowTimer2 );
@@ -1049,6 +1050,9 @@ static void ProcessRadioRxDone( void )
10491050
return;
10501051
}
10511052

1053+
// Store device address
1054+
MacCtx.McpsIndication.DevAddress = macMsgData.FHDR.DevAddr;
1055+
10521056
FType_t fType;
10531057
if( LORAMAC_STATUS_OK != DetermineFrameType( &macMsgData, &fType ) )
10541058
{

src/mac/LoRaMac.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,10 @@ typedef struct sMcpsIndication
905905
* The downlink counter value for the received frame
906906
*/
907907
uint32_t DownLinkCounter;
908+
/*!
909+
* The device address of the frame
910+
*/
911+
uint32_t DevAddress;
908912
}McpsIndication_t;
909913

910914
/*!

0 commit comments

Comments
 (0)