espressif / esp-zigbee-sdk

Espressif Zigbee SDK
Apache License 2.0
178 stars 31 forks source link

Can zigbee support devices to join network using install code and global link key dynamically (TZ-1340) #494

Open syam-ari opened 1 week ago

syam-ari commented 1 week ago

Question

Can Gateway support devices to join network using install code and Global linke key. In Example code, Install code policy is compile time constant. How to allow devices to join network with and without install code dynamically?

define ESP_ZB_ZC_CONFIG() \

{                                                                       \
    .esp_zb_role = ESP_ZB_DEVICE_TYPE_COORDINATOR,                      \
    .install_code_policy = INSTALLCODE_POLICY_ENABLE,                   \
    .nwk_cfg.zczr_cfg = {                                               \
        .max_children = MAX_CHILDREN,                                   \
    },                                                                  \
}

Additional context.

No response

xieqinan commented 5 days ago

Hi @syam-ari ,

We will provide an API to enable or disable the install code to meet your requirements. In the meantime, you can test it by adding extern void zb_set_installcode_policy(bool allow_ic_only);. If you set zb_set_installcode_policy(true), the coordinator will only allow devices to join using an install code. However, please note that this temporary API will no longer be supported once the public API is available.