ND discovery fails after updating XStick (ZigBee Coordinator) with new firmware

X-Stick used as ZigBee Coordinator in a secured network loses connection with devices after updating the firmware. Another X-Stick initialized as ZigBee router in the same network can still find devices even if after update firmware.
Steps to reproduce the problem

  1. Initialize X-Stick ZC. Set PAN ID, Network Key, Trust center link Key and Enable Encryption

set xb SC=0x2000
set xb NK=0x################################
set xb KY=0x################################
set xb ID=0x111111111111
set xb II=0x4000
set xb EE=0x01  Enable Encryption
set xb WR

  1. Form ZigBee network with other XBee modules initialized as ZigBee Routers
  2. Router nodes joins ZC network with Trust center link key, receives network key
  3. Perform ND from ZC. ZC is able to find devices. Works fine
  4. Update X-Stick with new firmware
  5. Perform ND from ZC. X-Stick coordinator is unable to find devices

Steps to recover

Option 1 : Recycle at least one of ZigBee router (XBee) modules. After this X-Stick ZC can find recycled node and through that other nodes.

Option 2: Take another X-Stick and initialize it as ZC with network parameters. It is able to find all devices. But if we update this X-Stick again, then ND will fail again

We suspect that X-Stick ZC is not able to find devices after updating firmware because security counters are lost. We came to this conclusion because, if we take X-Stick initialized as ZC and change trust center and network key, we can reproduce the same problem.

Did any body face similar issue ? Is our conclusion correct regarding security counters ? Is there a solution available? Did anybody solve problem in a different way ?

This is to be expected as you are erasing the coordinators settings and code, then loading on new code. Since it is the Coordinator that needs to establish a network, it will see that there is already an existing network on a channel and select a different channel. To correct this, you need to either set the OI and II values to match the Coordinators settings before you changed the firmware or issue a network reset. You can also set the watch dog timer along with the channel verification settings on your routers which will then cause the routers to leave the network after the coordinator is no longer there. Thus re-associating with the coordinator on the new channel. Soon the end devices will follow.