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.

Urgent : Question about Installation code in Smart-Energy

Other Parts Discussed in Thread: Z-STACK

Hi,

I'm passing the Smart-Energy certification process using Z-Stack Energy 1.1 and they are asking for "Installation Code".

Could you tell me how do we proceed to find the Installation Code needed to pass the certification?

I didn't find anything in the Z-Stack documentation about it.

Regards,

Leo

  • Hi Leo,

    Installation code is the number to generate the initial TC Link Key using MMO Hash. Z-Stack provides the function sspMMOHash() that can be used for that purpose.

    The prototype of sspMMOHash() is sspMMOHash(uint8 *Pb, uint8 prefix, uint8 *Mb, uint16 bitlen, uint8 *Cstate)

    You can use this function to generate a preconfigured TCLK from an install code as following:

    sspMMOHash(NULL, 0, *installCode, bitLen, *tclk);

    where, installCode is the buffer containing the given install code, bitLen is the length of the install code in bit(byte*8), and tclk is 16-byte long buffer to get the derived TC Link Key as a result.

    Once you get the output, you can put it in the NV item area ZCD_NV_TCLK_TABLE_START-ZCD_NV_TCLK_TABLE_END to use it as the initial TC Link Key.

    - Cetri