Home/Support/Support Forum/How to wait for and read ND response in Python?
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

How to wait for and read ND response in Python?

0 votes
Hi. I'm working on an IoT project at home, with the intention of having a dynamic network. As devices are added and removed from the network, the hub, the database of devices on the network is updated.

So, I intend to have each device broadcast it's presence when it joins a network, no problem, but I also want the coordinator to periodically issue an ND to update the database of devices on the network.

My question is, how would I go about waiting for the response from all networked devices when I perform the ND?

This is probably a more generic question than this particular situation, but essentially, I need to figure out how I "wait" and read responses, and how to know when to stop waiting so I can carry on doing something else.

My first thought is that I would set a time-out and wait for that period for a response, from each of the devices, and reset the timer each time a device responds.

Is there a more concrete way for me to know when the responses have finished from the ND?

If it helps, I'm using python-xbee with the coordinator in API mode, and all routers/nodes are in transparent mode.

asked Oct 1, 2013 in 3rd Party Python and API development in other Languages by alias_neo New to the Community (0 points)

Please log in or register to answer this question.

1 Answer

0 votes
You can use getnode() from the following link, http://www.digi.com/wiki/developer/index.php/Module:xbee#get_node_list.28.29
answered Oct 15, 2013 by 16ksa23 Veteran of the Digi Community (426 points)
Your response seems to indicate there is _another_ Python library? I@m using this one: https://code.google.com/p/python-xbee/

The one you link doesn't seem to have many of the features this one does and I'm not sure how it fits.