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.

Change Used Global Trust Center Link Key

Other Parts Discussed in Thread: CC2531, Z-STACK

I use the new ZSTACK 3.0.1 and have hard time to configure a global TCLK different from the DEFAULT_TC_LINK_KEY in nwk_globals.c.
Have managed to successfully configured usb dongle with cc2531 chip as a coordinator and devices are paired without problem with DEFAULT_TC_LINK_KEY.
How can I form a network via serial commands with different global link key, in order to exclude devices expecting the DEFAULT_TC_LINK_KEY?

Guess I should use ZCD_NV_TCLK_TABLE_START and ZCD_NV_APS_LINK_KEY_DATA_START, but have no idea how.

  • Hi Dimitar,

    Please refer to Section 10.5 of the Z-Stack 3.0 Developer's Guide, the default global Trust Center link key should not be modified if interoperability with other Z3.0 devices is desired. You could filter by IEEE address and choose to not transport the key to certain devices, I recommend using install codes to only allow trusted devices into the network. More information can be found on the ZigBee 3.0 Wiki page: processors.wiki.ti.com/.../What's_New_in_ZigBee_3.0

    But you should be able to change the defaultTCLinkKey/DEFAULT_TC_LINK_KEY in nwk_globals.c/h on all ZigBee devices if desired.

    Regards,
    Ryan

  • Hi Ryan,

    Indeed I can change the DEFAULT_TC_LINK_KEY in nwk_globals.c/h, but I want to do that without re-flashing.

    So this taken from an old Z-Stack developer's Guide can no longer be used to set TCLK by write to ZCD_NV_TCLK_TABLE_START using 0xFFs to for Extended Address to match all devices.

    To start the network using Single Key Mode:

    • Set zgUseDefaultTCLK=TRUE (defined in ZGlobals). The NV item for this global is

    ZCD_NV_USE_DEFAULT_TCLK (defined in ZComDef.h).

    • The default preconfigured trust center link key is written to NV item ZCD_NV_TCLK_TABLE_START if

    it has not been initialized yet. To differentiate the default preconfigured trust center link key, the extended

    address for default preconfigured trust center link key is all 0xFFs. The key data is initialized with

    defaultTCLinkKey (defined in nwk_globals). The RX and TX frame counters are initialized to all zeros.

    • The default preconfigured tclk can be changed by changing the key data, RX and TX frame counter fields

    in the NV item directly.

  • Hi Dimitar,

    Apologies for not initially understanding your question, this value cannot be changed after flashing the device.

    Regards,
    Ryan