Home/Support/Support Forum/Python Access to X2e Configuration
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Python Access to X2e Configuration

0 votes
I'm trying to write a fairly complicated python script for an X2e that is tasked with managing a network of devices that all contain Xbee S2C modules. With a socket using the 'XBS_PROT_TRANSPORT' protocol I'm able to ferry information to and from devices and everything has been working great, but I've come across an issue.

What I need to do is determine what the PANID of the X2e is, from within the python script. My first thought was to try and use the 'XBS_PROT_DDO' protocol, but since the target is the local module that lives in the X2e I'm not sure if that is a special case.

If 'XBS_PROT_DDO' is the correct approach, how can I get the 64-bit ZigBee address of the Xbee module in the X2e to target it with a command? If not, is there another library or method I can use to get information from the Xbee in the X2e?

I'm also having issues getting 'XBS_PROT_DDO' to work at all, even for remote targets that I know the address of. I'll put that in a separate post so if you're a Python ninja have a look and see if you can see what's going on there too.

asked Oct 3, 2014 in Python by CHSH New to the Community (10 points)

Please log in or register to answer this question.

1 Answer

0 votes
Not sure if XBS_PROT_DDO has been removed and is just a remnant in the wiki, but on another page I found here there are two functions in the Xbee module that accomplish what I was trying to do.

ddo_get_param() and ddo_set_param() seem to work and have a quick shortcut to target the local module (set target to None). Not as pythonic or elegant as the socket extension solution, but it looks like it works so huzzah!
answered Oct 6, 2014 by CHSH New to the Community (10 points)