Disassociate node from PAN in ConnectPort X4

Hi All,

I use ConnectPort X4 to manage a third party Zigbee Network. The Digi wrap up for all Zigbee communication using a socket-like python API is great, however, I need to be able to have minimal network management here, at least to be able to disassociate a node from a network using my Python code. I have 2 questions,

  • Is there a way to disassociate a node from the ConnectPort (using the “Remote Disassociate” AT command for example). I know I can send a command packet to my node to disassociate itself (using the “Local Disassociate” command) but I would rather do this on the ConnectPort side.

  • If I disassociate a router, does that mean that all nodes connected to the coordinator through that router are disassociated? will they go through network discovery again? or it will be a straight forward task for those nodes to look for other close router (and there will be available in my application).

Thanks for your help.


There are a couple of ways to send a leave command to a router in a network, but I am not familiar with ConnectPort - perhaps someone else could fill in the blanks.

In Python, you could send an NR0 command to the router - if it’s a Digi XBee. If it is not a Digi device, you could send a ZDO Leave Request. If you’re not familiar with the ZDO, it is a set of services that operate on endpoint 0 and profile ID 0x0000. The Leave Request is cluster ID 0x0034.

To send a leave request to a router in Python, open a socket to endpoint 0, then send a broadcast transmission to cluster ID 0x0034, destination endpoint 0x00, and profile ID 0x0000. The data payload should include the following:
[SeqNum] + [64-bit destination address] + [Options]

SeqNum - 1 byte value, arbitrary
64-bit addr - Address of the device that should leave,in little endian byte order
Options - Set to 0x02 if the device should remove its end device children. Otherwise, set to 0.

Once you disassociate a router, the remaining routers should remain connected. Some routes might be broken after the router leaves, but they should be repaired.

From the ConnectPort X4, assuming you have 2.8.x EOS firmware, you have a couple options at your disposal.

From the WebUI of the CP-X4, go to Configuration > XBee Network > and under “Network View of the XBee Devices”, click the extended address of the device you wish to dis-associate. When you click on the address, you’re looking at the Basic Settings page for that XBee. Scroll down and click on Advanced Settings, then scroll down to the bottom of the Advanced Settings page. There you will see two buttons: One is for FR or software reset, the other is NR0 or Network Reset.

From the CommandLine Interface (CLI) of the ConnectPort X4, the “set mesh address=<64-bit address of device> CC=x” command can be used to send any AT command over-the-air to any device on your PAN. For syntax and options of the “set mesh” command, do “set mesh ?” and the list of parameters will be displayed.

Here is an example to send NR0 to device 00:13:a2:00:40:0a:0a:d6!:

set mesh addr=00:13:a2:00:40:0a:0a:d6! NR=0

Thanks all for your answers…

admin: this method only works if the routers and end nodes used are Xbee. I’m using Telegesis routers and end nodes so both the web interface and the command line Tx commands times out.

damons: Very nice idea but I really did not dig into Telegesis implementation to see how they support zdo commands caught at the stack layer.

I thought there is a straight forward way to drop a node from a PAN from the coordinator side without notification to the end node. The end node can then be notified when it tries to transmit with no success. I’m sure such a thing is available its just not exposed from the Digi Zigbee stack to its python implementation. Since all suggested solutions require an explicit command for sending a disassociate command over the air, then I would prefer to do it on the application layer rather than the stack layer and have more control over it. I will basically send a control command to the end node, parse it at the end node side and disassociate from the coordinator.

Thanks all again, I appreciate more input on this topic. Its for all of us to learn more I believe.


The underlying ZigBee stack should execute the ZDO leave request automatically and leave the network - regardless of how the application layer is written. If it’s not too much work, try sending the ZDO leave request and let us know how it goes.