This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ZigBee install code Network left (leave type: 0)

Hi,

I was implementing ZigBee coordinator in nrf connect v1.18.0 to connect sensor which develops from template sample. every thing went fine until I add install code (took from shell sample). building and running the sample was fine:

  • coordinator side:

ic = "83FED3407A939723A5C639B26916D505C3B5" 

zb_secur_ic_add(ic_add_ctx.addr, ZB_IC_TYPE_128, ic_add_ctx.ic, zb_secur_ic_add_cb);

+

zb_set_installcode_policy(ZB_TRUE);
zb_bdb_set_legacy_device_support(1);

  • ep side:

ic = "83FED3407A939723A5C639B26916D505C3B5" 

if (zb_secur_ic_set(ZB_IC_TYPE_128, ic) != RET_OK) {
			LOG_ERR("Failed to set IC");
		}
                else
                {
                    
                      LOG_INF("{0} done setting ic");
                }

The end device leave network after a second of joining and retry joining network!
RTT of coordinator: 

RTT of endpoint:

why the ep leave network Error message (Network left (leave type: 0))? is there something I must add?

from my understanding of install code device that dose not have same ic that coordinator added cannot join the network. but when I disable policy (zb_set_installcode_policy(ZB_FALSE)) all devices can join the network(weather it have same ic or dose not have!!). therefore, the problem that I mention above occur after enabling install code policy ! is there something I misunderstood?!

other question how can I generate new install code (16b+2crc) ? and can all ep have same install code?

this sniffing file of network (ic policy=True): ZB_ic.pcapng

both devices are nrf52833. nrf connect 1.18.0.

Thanks 

  • Hi,

    That is good to hear!

    The extpanid, or the long address, of the device is set during initialization of the Zigbee stack with the function zb_set_long_address. When it comes to Nordic chips the device address is already stored in the FICR registers, so the way it is done in our SDKs is that the long address is read from FICR registers with zb_osif_get_ieee_eui64, and then it is set with zb_set_long_address:

    /* Set device address to the value read from FICR registers. */
    zb_ieee_addr_t ieee_addr;
    zb_osif_get_ieee_eui64(ieee_addr);
    zb_set_long_address(ieee_addr);

    Because of this the address will be static, and a device will have the same address no matter if you build a project again or build a different Zigbee project, as long as the Zigbee stack is initialized correctly, unless you change it yourself with zb_set_long_address.

    There are multiple ways you can find what this address is. On the device itself you can for example print the address after getting it with zb_osif_get_ieee_eui64. You can also use Zigbee shell to get it, either with zdo eui64 if it is the address of the shell device you want to find, or zdo ieee_addr short_addr to find the long address of the device with short address short_addr.

    Best regards,

    Marte

Related