Forming and Reforming A Network

Hello All,

I have a serious design question about grouping and zoning devices. I want to create multiple zones of control. Each zone would be its own network with a coordinator who’s job it is is to create the network.

To create the network for a zone I would turn on the coordinator and any end devices meant to be in this network. The coordinator (with default network settings) will find each device and transmit a broadcast to each. The broadcast payload will hold a number of network settings. Each end device will set its PANID for the specified network. Then the coordinator will set its network settings to match.

I would repeat this process for each zone, now when I turn on all the devices they should all come up and join their respective networks.

Now if we have an end device in zone 1 and I want to move it to zone 2, what would be the best way to do this? If I reset the end device network settings, none of the other networks will find it as they have their PANID configured. My thought is this. Press a “sync” button on the end device and a “sync” button on the coordinator of the network I wish this device to join. The coordinator will then default its network settings, reset the device then find the device to move, tell it what settings to use then rejoin/form its network.

How do people typically form their networks? How do people typically configure multiple networks that are supposed to work in close proximity?


That is not really how folks do it. At least not at the XBee level. You could use that to turn on and off Joining on the Coordinator and then do a local network reset (ATNR0) on your end device. That would tell the end device to join any network that was allowing Joining. Make sure when you do this, that your end device is using a PAN ID of 0.

If my network has a PANID of 158. If I tell the coordinator to allow joiners, it should find the new device, then the coordinator can set the new devices AT values, do a local network reset and then turn network joining off? Am I understanding the sequence correctly?

Not quite. Part of the function needs to exist on the end devices processor. The part of doing the NR0 would have to. The Join function would have to occur on the Coordinator or router.

Could you help me out with the steps? I have a coordinator with PANID of 158 and a number of end devices with PANID 158. I want to add a new device to the network. This device has a micropython script on it which waits for a network connections.

The coordinator enters a discovery mode and allows joining. At this point the coordinator will find the new node, set its network parameters then turn off network joinging?

The Coordinator would need to set NJ to FF to allow joining.

The device can then join the coordinator if the coordinator’s child table is not full otherwise it will need to join a different parent router.

The device joins

Joining is turned off

The end device should send its active end points to the coordinator or the coordinator should ask for them.