ZPS_vAplSecSetInitialSecurityState

ZPS_teStatus ZPS_vAplSecSetInitialSecurityState(
    ZPS_teZdoNwkKeyState eState,
    uint8 *pu8Key,
    uint8 u8KeySeqNum
    ZPS_teApsLinkKeyType eKeyType);

Description

This function is used to configure the initial state of ZigBee security on the local node. This requires a security key to be specified that is used in setting up network-level security.

Note: Before using this function, security must be enabled on the node via the device parameter Security Enabled in the ZPS Configuration Editor.

You must provide a pointer to an initial link key of one of the following types:

  • Pre-configured global link key

  • Pre-configured unique link key

These key types are described in Section 6.8.2. The network key randomly generated by the Trust Centre is communicated to the local node in encrypted form using the specified link key.

Parameters

  • eState: The state of the link key, one of:

    • ZPS_ZDO_PRECONFIGURED_LINK_KEY

    • ZPS_ZDO_ZLL_LINK_KEY

  • pu8Key: Pointer to pre-configured link key

  • u8KeySeqNum: Not used when specifying a link key - ignore this parameter

  • eKeyType: Type of link key, one of:

    • ZPS_APS_UNIQUE_LINK_KEY

    • ZPS_APS_GLOBAL_LINK_KEY

Parent topic:ZPS_vAplSecSetInitialSecurityState

Returns

  • ZPS_E_SUCCESS (security state successfully initialized)

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

Parent topic:Security functions