Hi,
This question was probably already asked but can't seem to find it.
I would like to know if there is any way to retrieve the network key. Maybe by reading the NV-Ram. If so what is the id to read in the nv-ram to get it?
Best Regards,
Luca Vetri
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
This question was probably already asked but can't seem to find it.
I would like to know if there is any way to retrieve the network key. Maybe by reading the NV-Ram. If so what is the id to read in the nv-ram to get it?
Best Regards,
Luca Vetri
Hi Luca,
Non-volatile memory is stored in flash, can be located at NV ID ZCD_NV_NWK_ACTIVE_KEY_INFO (0x003A), and read from the ZNP using the MT command SYS_NV_READ.
Regards,
Ryan
<TX>01:29:37.66 COM4 SYS_OSAL_NV_READ (0x2108)
Id: 0x003A
Offset: 0x00
<RX>01:29:37.67 COM4 SYS_OSAL_NV_READ_SRSP (0x6108)
Status: SUCCESS (0x0)
Len: 0x11
Value: .....Ztz..B.qqdd. (0x00, 0xDD, 0xE9, 0xD9, 0xCE, 0x5A, 0x74, 0x7A, 0x07, 0xA2, 0x42, 0xB8, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX)
isn't the network key supposed to be 128 bit?
Also what is the difference between PrecConfKey (UTIL_GET_NV_INFO) and Network Key?
The first byte is the keySeqNum. The ZCD_NV_PRECFGKEY is set by the DEFAULT_KEY in SysConfig, or created at random if the initial value is all 0x00. When ZCs form a network the will set this as the active network key, and joining devices will adopt the ZC's network key during the commissioning process so long as zgPreConfigKeys is FALSE. Otherwise if TRUE, preConfigKey should be configured on all devices on the network.
Regards,
Ryan
The Network Key to decipher the zigbee messages is the ZCD_NV_NWK_ACTIVE_KE_INFO right?
Does the network key ever changes? or once the network is created it won't change?
The trust center can initiate a NWK key update for the entire network, this is covered in the Z-Stack Overview section of the Z-Stack User's Guide and Zigbee Security Features SLA.
Regards,
Ryan
Is there any to de-activate this and have one single network key so i can decipher the traffic?
If it keeps changing i can't decrypt the sniffed traffic.
BR,
Luca
You can decrypt network traffic if you capture the process of a device commissioning into the network after registering the global TC Link Key. Otherwise you can set a "Default Network Key" in SysConfig for the ZC/ZNP project to pre-emptively know what the network key should be. The network key are not set to be changed during operation by default Z-Stack applications
Regards,
Ryan