LR1121
User Manual Rev 1.1
UM.LR1121.W.APP Mar 2023
116 of 130
Semtech
Proprietary & Confidential
www.semtech.com
11.2.3.2 Advanced Use
The LR1121 supports a user-defined DevEui and / or a dedicated JoinEui, both different from the ChipEui and
SemtechJoinEui onboard the LR1121. If the derivation scheme defined by the Semtech Join Server service is re-used, the
function call to DeriveRootKeysAndGetPin() should be done as follows.
PIN: Coded on 4 Bytes, in big endian format.
In the advanced use-case, a user-specific DevEui and / or JoinEui can be used. The host should:
1. Call the DeriveRootKeysAndGetPin() command with your own DevEui and/or JoinEui, get back the PIN.
2. Execute the Join procedure using DevEui and JoinEui (i.e., not ChipEui and SemtechJoinEui).
3. At the reception of a valid Join Answer, all lifetime and session keys can be derived according to the required LoRaWAN
Standard.
The device must also be claimed for the Semtech Join Server for the Join Request to be accepted.
11.2.3.3 Alternate Use
The LR1121 can be used outside of the Join Server service and its built-in root key derivation schemes. In this scenario, the
PIN concept becomes irrelevant, and the user can provision his own NwkKey and AppKey, but still leverage the Crypto
Engine for any of the authentication, signature and encryption tasks, for improved security. Note that, in this scenario, the
DeriveRootKeysAndGetPin(...) command MUST NOT be used, as it would overwrite the root keys personalized in
the device by the user with the CryptoSetKey(...) command. The host should:
1. Use CryptoSetKey(...) to personalize NwkKey and AppKey (according to the LoRaWAN version of interest).
2. Execute the Join procedure using DevEui and JoinEui of the user’s choosing (ChipEui and SemtechJoinEui may be
re-used for that matter).
3. Get the DevAddr and derive the session keys with the acceptance of the Join Response.
Table 11-7: DeriveRootKeysAndGetPin Command (advanced)
Byte 0 1 2 3 4 5 6:9 10:17 18
Data from Host 0x01 0x27 DevEui (63:0) JoinEui RFU (0x00)
Data to Host Stat1 Stat2
IrqStatus
(31:24)
IrqStatus
(23:16)
IrqStatus
(15:8)
IrqStatus
(7:0)
0x00 0x00 0x00
Table 11-8: DeriveRootKeysAndGetPin Response (advanced)
Byte 0 1 2 3 4
Data from Host 0x00 0x00 0x00 0x00 0x00
Data to Host Stat1 PIN(31:24) PIN(23:16) PIN(15:8) PIN(7:0)