XBS_PROT_DDO Issues

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 now I’m trying to remotely configure the Xbee modules and am having issues.

Reading about the Xbee Python socket on the wiki it looks like the ‘XBS_PROT_DDO’ protocol is exactly what I’m looking for. However, taking the basic example from the bottom of the wiki and stripping it down so it doesn’t do anything but initialize the socket in a 3 line script:

import xbee
from socket import *
sd = socket(AF_XBEE, SOCK_DGRAM, XBS_PROT_DDO)

I get the error:

Traceback (most recent call last):
File “test.py”, line 3, in
sd = socket(AF_XBEE, SOCK_DGRAM, XBS_PROT_DDO)
NameError: name ‘XBS_PROT_DDO’ is not defined

Is there an update to the python socket extension libraries that I need to install or am I missing something else? If there is an update, where can I find it?

Thanks!
Jeremy

1 Like

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 without using XBS_PROT_DDO or even a socket.

1 Like