File tree Expand file tree Collapse file tree 1 file changed +17
-10
lines changed Expand file tree Collapse file tree 1 file changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -997,18 +997,25 @@ static void ProcessRadioRxDone( void )
997997 joinType = MLME_REJOIN_2 ;
998998 }
999999
1000- VerifyParams_t verifyRxDr ;
1001- bool rxDrValid = true;
1002-
1003- if ( macMsgJoinAccept .DLSettings .Bits .RX2DataRate != 0x0F )
1000+ if ( LORAMAC_CRYPTO_SUCCESS == macCryptoStatus )
10041001 {
1005- verifyRxDr .DatarateParams .Datarate = macMsgJoinAccept .DLSettings .Bits .RX2DataRate ;
1006- verifyRxDr .DatarateParams .DownlinkDwellTime = Nvm .MacGroup2 .MacParams .DownlinkDwellTime ;
1007- rxDrValid = RegionVerify ( Nvm .MacGroup2 .Region , & verifyRxDr , PHY_RX_DR );
1008- }
1002+ VerifyParams_t verifyRxDr ;
1003+
1004+ if ( macMsgJoinAccept .DLSettings .Bits .RX2DataRate != 0x0F )
1005+ {
1006+ verifyRxDr .DatarateParams .Datarate = macMsgJoinAccept .DLSettings .Bits .RX2DataRate ;
1007+ verifyRxDr .DatarateParams .DownlinkDwellTime = Nvm .MacGroup2 .MacParams .DownlinkDwellTime ;
1008+ if ( RegionVerify ( Nvm .MacGroup2 .Region , & verifyRxDr , PHY_RX_DR ) == false )
1009+ {
1010+ // MLME handling
1011+ if ( LoRaMacConfirmQueueIsCmdActive ( MLME_JOIN ) == true )
1012+ {
1013+ LoRaMacConfirmQueueSetStatus ( LORAMAC_EVENT_INFO_STATUS_JOIN_FAIL , MLME_JOIN );
1014+ }
1015+ break ;
1016+ }
1017+ }
10091018
1010- if ( ( LORAMAC_CRYPTO_SUCCESS == macCryptoStatus ) && ( rxDrValid == true ) )
1011- {
10121019 // Network ID
10131020 Nvm .MacGroup2 .NetID = ( uint32_t ) macMsgJoinAccept .NetID [0 ];
10141021 Nvm .MacGroup2 .NetID |= ( ( uint32_t ) macMsgJoinAccept .NetID [1 ] << 8 );
You can’t perform that action at this time.
0 commit comments