ConnectPort Python Polling

We are working on an application where we could have a large deployment of devices (up to 200 Xbee nodes). Originally we thought that we could just have the devices push to the coordinator (ConnectPort), but quickly realized that all of the network traffic could cause collisions, etc.

Now we are thinking it would be better for the ConnectPort to initiate queries to the nodes one at a time, perhaps aggregate the data, and push to Device Cloud.

To do this, we need the script to automatically detect any connected node, and put it into a list to poll.

Are there any examples of this, where the script will automatically detect all connected nodes, send a poll request, and parse the response from each connected node?

If it helps, our nodes can talk Modbus/RTU, however we can change this to simplify if needed.

The ATND command can be used to discover XBee devices on the network.

With a 200-node network you might want to look into Source Routing. Part of the issue with a network that size is the XBee doesn’t have space in its routing table for every node so you will incur constant route discoveries. Each of those is a broadcast which can crush the network and a limited number are supported in any given 8-second period.

With Source Routing the XBee will indicate routes that the ConnectPort firmware will store and provide back to the XBee when requesting a transmission. Basically offload the routing storage requirement.

Source Routing also pins route back to the ConnectPort on each XBee so that tranmission TO the coordinator will also be more efficient and not incur unnecessary route discoveries.