Topic

FAQ
Login Register
B91的zigbee协议栈能否实现zigbee network layer加密,如何配置?
wsr
Sep 23, 2022 20:15

/

A

/A

在使用af_dataSend函数发送数据帧时使用APS_TX_OPT_SECURITY_ENABLED选项仅可实现zigbee应用层数据加密,如果要实现zigbee network layer加密,需要怎样进行配置,我希望发送的数据帧类似以下内容

ZigBee Network Layer Data, Dst: 0x40be, Src: 0x0000
Frame Control Field: 0x1a48, Frame Type: Data, Discover Route: Enable, Security, Destination, Extended Source Data
.... .... .... ..00 = Frame Type: Data (0x0)
.... .... ..00 10.. = Protocol Version: 2
.... .... 01.. .... = Discover Route: Enable (0x1)
.... ...0 .... .... = Multicast: False
.... ..1. .... .... = Security: True
.... .0.. .... .... = Source Route: False
.... 1... .... .... = Destination: True
...1 .... .... .... = Extended Source: True
..0. .... .... .... = End Device Initiator: False
Destination: 0x40be
Source: 0x0000
Radius: 30
Sequence Number: 9
Destination: MaxStrea_00:40:b9:5a:35 (00:13:a2:00:40:b9:5a:35)
Extended Source: MaxStrea_00:40:e7:a2:3c (00:13:a2:00:40:e7:a2:3c)
ZigBee Security Header
Security Control Field: 0x28, Key Id: Network Key, Extended Nonce
...0 1... = Key Id: Network Key (0x1)
..1. .... = Extended Nonce: True
Frame Counter: 6095
Extended Source: MaxStrea_00:40:e7:a2:3c (00:13:a2:00:40:e7:a2:3c)
Key Sequence Number: 0
Message Integrity Code: 82c6c705
[Key: 53f0ede73c8b40f8f593a80dc0345af3]
[Key Origin: 130331]


1 replies
wsr [Author] Sep 24, 2022 13:15
0
/A

自己结帖,在void stack_init(void)函数中增加g_zbMacPib.securityEnabled = 1;然后调用zb_factoryReset();,重启再次后入网即可在网络层加密收发数据了。

以上内容不知道是不是完全正确,我测试是可以实现网络层加密了。

Related topics
No related topics
Author's other topics
No more topics