File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -1550,6 +1550,7 @@ static bit_t processJoinAccept (void) {
1550
1550
}
1551
1551
1552
1552
LMIC_SecureElement_Error_t seErr ;
1553
+ LMIC_SecureElement_Aes128Key_t AppSKey , NwkSKey ;
1553
1554
1554
1555
seErr = LMIC_SecureElement_Default_decodeJoinAccept (
1555
1556
LMIC .frame , dlen ,
@@ -1559,6 +1560,12 @@ static bit_t processJoinAccept (void) {
1559
1560
1560
1561
if (seErr != LMIC_SecureElement_Error_OK )
1561
1562
return processJoinAccept_badframe ();
1563
+
1564
+ LMIC_SecureElement_getAppSKey (& AppSKey , 0 );
1565
+ LMIC_SecureElement_getNwkSKey (& NwkSKey , 0 );
1566
+
1567
+ memcpy (LMIC .artKey , AppSKey .bytes , sizeof (LMIC .artKey ));
1568
+ memcpy (LMIC .nwkKey , NwkSKey .bytes , sizeof (LMIC .nwkKey ));
1562
1569
1563
1570
u4_t addr = os_rlsbf4 (LMIC .frame + OFF_JA_DEVADDR );
1564
1571
LMIC .devaddr = addr ;
You can’t perform that action at this time.
0 commit comments