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.

Zigbee网关 Zstack开启AES加密

1.将f8wConfig.cfg文件中设置为-DSECURE=1,
2.将ZGlobals.c中的uint8 zgPreConfigKeys = FLASE;修改为uint8 zgPreConfigKeys = TRUE.
3.准备一个key,这个可以在函数nwk_global.c中修改:

CONST uint8 defaultKey[SEC_KEY_LEN] =
{
#if defined ( APP_TP ) || defined ( APP_TP2 )
  // Key for ZigBee Conformance Testing
  0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb,
  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa
#else
  // Key for In-House Testing
  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
  0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F
#endif
};

完成以上3步,以后通信就加密了,但是加密是在网络层的,加密不影响设备入网,只是入网后不能继续通信了