Search code examples
controllerembeddedxbeezigbee

Can I auto-reset ZigBee's Operation-Mode to act as a Coordinator in Software?


I am developing a new wireless IoT-product for a company. The current prototype is using ZigBee for communications and I am currently trying to figure out how to avoid having to run a dedicated ZigBee-Coordinator device. I do not want to develop a second hardware just to let it act as the main ZigBee Coordinator. For this hardware Meshing is very important.

So I read about the Digi S2C modules and stumbled over the fact that this module has a larger flash and therefor incorporates all three ZigBee-Firmwares (End-Device, Router, Coordinator) into one single file. With using serial-commands you can then change the device-mode from coordinator to router or end device.

By thinking about it I came up to the following idea how to avoid having a second hardware just acting as a coordinator.

  1. By powering up the first hardware unit the ZigBee Module runs as a Router / End-Device and is looking for a coordinator

  2. If there is no coordinator the module resets itself and changes its device-mode to become the coordinator

  3. Every following unit does the same and will connect to the first unit which acts as the coordinator

Using this concept I could stick with my single hardware and let it automatically choose between running as an End-Device, Router or Coordinator.

Questions are:

I know that you can put custom code onto the ZigBee-Modules controller. Is this controller able to reset itself and restart in a different operation-mode? Like leaving a flag before restarting or so?

Or do I need a second controller that is taking care of such a process?

Am I missing some detail in the ZigBee-Stack that has already implemented such a concept?


Solution

  • Am I missing some detail in the ZigBee-Stack that has already implemented such a concept?

    I think you might be interested in creating a distributed network. ZigBee has defined commissioning schemes which allow you to create networks without a hub. The first few minutes of this talk should give you an idea of what commissioning options are available: https://youtu.be/HJlQI2Z7V-Q?t=2m48s

    You can design your device as a router, and give it the option to additionally form distributed networks. You'll have all situations covered. When a user sets up your system in an environment where they already have a hub, they'll simply join your devices to the network through the existing coordinator. In addition, when a user sets up your system in an environment with no hub, they'll tell one of your devices to form a distributed network. The rest of your devices can then join as normal.

    The Light Link profile also addresses this issue. Devices are added to a network by "touch link". The key part is that when someone touch links your device and there is no network, your device promotes itself to coordinator and creates one. You can then continue to touch link the rest of your devices and they will be added to that network.