ZPS_eAplZdoTransportNwkKey
ZPS\_teStatus ZPS\_eAplZdoTransportNwkKey\(
uint8 u8DstAddrMode,
ZPS\_tuAddress uDstAddress,
uint8 au8Key[ZPS_SEC_KEY_LENGTH],
uint8 u8KeySeqNum,
bool bUseParent,
uint64 u64ParentAddr);
Description
This function can be used on the Trust Centre to send the network key to one or multiple nodes. On reaching the target node(s), the key is only stored but can be subsequently designated the active network key using the function ZPS_eAplZdoSwitchKeyReq().
The target node can be specified by means of its network address or IEEE/MAC address. A broadcast to multiple nodes in the network can be achieved by specifying a special network address or IEEE/MAC address - see Section 9.3.
If the destination is a single node, it is possible to send the key to the parent of the destination node.
Note: This function also resets the frame counter on the target node(s).
Parent topic:ZPS_eAplZdoTransportNwkKey
Parameters
u8DstAddrMode Type of destination address:
ZPS_E_ADDR_MODE_SHORT - 16-bit network address.
ZPS_E_ADDR_MODE_IEEE - 64-bit IEEE/MAC address.
All other values are reserved.
uDstAddress: Destination address (address type as specified through u8DstAddrMode) - special broadcast addresses are detailed in Section 9.3
au8Key[]: Array containing the network key to be transported. This array has a length equal to ZPS_SEC_KEY_LENGTH
u8KeySeqNum: Sequence number of the specified key
bUseParent: Indicates whether to send key to parent of target node:
TRUE - send to parent
FALSE - do not send to parent
u64ParentAddr: 64-bit IEEE/MAC address of parent (if used).
Parent topic:ZPS_eAplZdoTransportNwkKey
Returns
ZPS_E_SUCCESS (key successfully sent)
APS return codes, listed and described in Section 11.2.2
NWK return codes, listed and described in Section 11.2.3
MAC return codes, listed and described in Section 11.2.4
Parent topic:ZPS_eAplZdoTransportNwkKey
Parent topic:Security functions