This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Zigbee install codes list contend problem

I am writing a coordinator application based on the zigbee CLI example.
I am using SDK for Thread and Zigbee v4.1.


I am using a function in zboss_api called zb_secur_ic_get_list(zb_uint8_t* table, zb_uint8_t *cnt) in order to get information about the added install codes. I found out that the content of the structure of returned back in “table” looks lik this:

 

typedef zb_uint8_t zb_128bit_ic_t[18];  /*!< 16 byte / 128-bit code * 2byte CRC.*/

typedef zb_128bit_ic_t zb_instal_code_t;

 

/** @brief Install Code Table Record Format */

typedef ZB_PACKED_PRE struct bdb_secur_ic_table_record_s

{

  zb_ieee_addr_t ext_addr;      /*!< 64-bit IEEE address that is unique to every device.*/

  zb_ic_types_t  icType;              /*!< install code type */

  zb_uint8_t bByte;                   /* Byte - definition   unknown */

  zb_instal_code_t instal_code; /*!< install code bytes + CRC */

}

ZB_PACKED_STRUCT

bdb_secur_ic_table_record_t;

 

So writing Install Codes with zb_secur_ic_add(…) and reading them back with zb_secur_ic_get_list(…) works fine:

 

Nr 0:

   Device Extended Address: 0x804B50FFFEE2756F

   Keytype: 3 (ZB_IC_TYPE_128)

   Key: 4205B841EB5656B86DF2F1887EFDBE032C37

   ?: 0

 

So I write, delete and read back install codes works perfect for some time. But at one point zb_secur_ic_get_list(…) only returnes back “0xFF” as contend of some install code entrys:

 

Nr 0:

   Device Extended Address: 0xFFFFFFFFFFFFFFFF

   Keytype: 255 (Unknowen)

   Key: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

   ?: 255

 

The maximum number of install codes “ZB_CONFIG_N_APS_KEY_PAIR_ARR_MAX_SIZE” is set to 200.

Currently I am only using 15 install codes at the same time.

 

Do you have any Idea, what could possibly lead to that problem?

 

Best regards

 

Lutz

Parents
  • Hi,

    I am sorry for the late reply.

    I cannot find zb_secur_ic_get_list() function in our documentation, so perhaps even if it may be part of the ZBOSS stack it may be a function not supported by our SDK. Anyways, could you perhaps share the code where you are using this function and printing it's results?

    So I write, delete and read back install codes works perfect for some time. But at one point zb_secur_ic_get_list(…) only returnes back “0xFF” as contend of some install code entrys:

    What function are you using to delete the install codes? Perhaps the zb_secur_ic_get_list() function is returning 0xFF if the content of the install code entry is deleted?

    Best regards,

    Marjeris

     

  • Hi Marjeris.

    Thank you for your response.

    In your cli example v4.1.0 you are using the function “bdb ic add <h:install code> <h:eui64>” to add install codes to the coordinator. In order to correctly use the install code policy to safely commission a Zigbee 3.0 network with over 100 nodes, I also need functions to delete and read back currently existing install codes. Can you please tell me which functions from your SDK I can use to do that?

    Best regards

    Lutz

Reply
  • Hi Marjeris.

    Thank you for your response.

    In your cli example v4.1.0 you are using the function “bdb ic add <h:install code> <h:eui64>” to add install codes to the coordinator. In order to correctly use the install code policy to safely commission a Zigbee 3.0 network with over 100 nodes, I also need functions to delete and read back currently existing install codes. Can you please tell me which functions from your SDK I can use to do that?

    Best regards

    Lutz

Children
  • Hi Lutz,

    Sorry for the late reply, I have asked our Zigbee developers for more information. In the zboss_api.h header there are declarations of multiple functions for install code management, some of them are not present in the Infocenter for some reason (we are looking into that).

    zb_ret_t zb_secur_ic_add(zb_ieee_addr_t address, zb_uint8_t ic_type, zb_uint8_t *ic);
    zb_ret_t zb_secur_ic_set(zb_uint8_t ic_type, zb_uint8_t *ic);
    zb_ret_t zb_secur_ic_get_list(zb_uint8_t* table, zb_uint8_t *cnt);
    zb_ret_t zb_secur_ic_get_by_idx(zb_uint8_t* param, zb_uint8_t index);
    zb_ret_t zb_secur_ic_remove(zb_ieee_addr_t address);
    zb_ret_t zb_secur_ic_remove_all(void);
    zb_ret_t zb_secur_ic_str_set(char *ic_str);
    zb_ret_t zb_secur_ic_str_add(zb_ieee_addr_t address, char *ic_str);

    For removing install codes: zb_secur_ic_remove() - this is present in the infocenter

    zb_secur_ic_get_list() should allow to read existing install codes (this was not in our documentation, so I wasn't aware of this function in my previous answer).

    Best regards,

    Marjeris

Related