@@ -1250,11 +1250,6 @@ static void OnRadioRxDone( uint8_t *payload, uint16_t size, int16_t rssi, int8_t
12501250 }
12511251 }
12521252
1253- if ( fCtrl .Bits .FOptsLen > 0 )
1254- {
1255- // Decode Options field MAC commands
1256- ProcessMacCommands ( payload , 8 , appPayloadStartIndex , snr );
1257- }
12581253 if ( ( ( size - 4 ) - appPayloadStartIndex ) > 0 )
12591254 {
12601255 port = payload [appPayloadStartIndex ++ ];
@@ -1264,19 +1259,32 @@ static void OnRadioRxDone( uint8_t *payload, uint16_t size, int16_t rssi, int8_t
12641259
12651260 if ( port == 0 )
12661261 {
1267- LoRaMacPayloadDecrypt ( payload + appPayloadStartIndex ,
1268- frameLen ,
1269- nwkSKey ,
1270- address ,
1271- DOWN_LINK ,
1272- downLinkCounter ,
1273- LoRaMacRxPayload );
1274-
1275- // Decode frame payload MAC commands
1276- ProcessMacCommands ( LoRaMacRxPayload , 0 , frameLen , snr );
1262+ if ( fCtrl .Bits .FOptsLen == 0 )
1263+ {
1264+ LoRaMacPayloadDecrypt ( payload + appPayloadStartIndex ,
1265+ frameLen ,
1266+ nwkSKey ,
1267+ address ,
1268+ DOWN_LINK ,
1269+ downLinkCounter ,
1270+ LoRaMacRxPayload );
1271+
1272+ // Decode frame payload MAC commands
1273+ ProcessMacCommands ( LoRaMacRxPayload , 0 , frameLen , snr );
1274+ }
1275+ else
1276+ {
1277+ skipIndication = true;
1278+ }
12771279 }
12781280 else
12791281 {
1282+ if ( fCtrl .Bits .FOptsLen > 0 )
1283+ {
1284+ // Decode Options field MAC commands
1285+ ProcessMacCommands ( payload , 8 , appPayloadStartIndex , snr );
1286+ }
1287+
12801288 LoRaMacPayloadDecrypt ( payload + appPayloadStartIndex ,
12811289 frameLen ,
12821290 appSKey ,
0 commit comments