ZPS_eAplZdoAddReplaceInstallCodes

ZPS_teStatus ZPS_eAplZdoAddReplaceInstallCodes(
        uint64 u64IeeeAddr,
        uint8 au8InstallCode[ZPS_INSTALL_CODE_LENGTH],
        uint8 u8InstallCodeSize,
        ZPS_teApsLinkKeyType eKeyType);

Description

This function can be used on the Trust Centre to generate a pre-configured unique link key from an install code, where this key is used to encrypt and decrypt communications between the Trust Centre and the specified node (install codes are described in the ZigBee Devices User Guide (JNUG3131)). If a pre-configured link key already exists for the node then it will be replaced.

The function must be called on the Trust Centre only. The other node will have the relevant pre-configured unique link key factory-installed.

If the JCU Non-Volatile Memory Manager (NVM) module is enabled, this function also saves the link key to Non-Volatile Memory. This allows the key to be automatically recovered during a subsequent cold start (for example, following a power failure).

The eKeyTypeparameter of this function can be used to specify ‘unique’ or ‘global’. This does not relate to the type of key being added or replaced, which is always a unique key.

  • Setting this parameter to ‘unique’ means that the Trust Centre only, ever uses the unique key with this node.

  • Setting the parameter to ‘global’ means that the Trust Centre uses the pre-configured global link key (if available) when there is no unique link key for the node.

Parent topic:ZPS_eAplZdoAddReplaceInstallCodes

Parameters

  • u64IeeeAddr 64-bit IEEE/MAC address of node for which the generated link key is valid.

  • au8InstallCode[] Array containing the install code - the array length ZPS_INSTALL_CODE_LENGTH is given below in u8InstallCodeSize.

  • u8InstallCodeSize Number of characters in the install code - this is the size of the array au8InstallCode[].

  • eKeyType Type of the key to be used by the node (see above), one of the below:

    • ZPS_APS_UNIQUE_LINK_KEY

    • ZPS_APS_GLOBAL_LINK_KEY

Parent topic:ZPS_eAplZdoAddReplaceInstallCodes

Returns

  • ZPS_E_SUCCESS (permissions successfully obtained)

  • 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_eAplZdoAddReplaceInstallCodes

Parent topic:Security functions