Home/Support/Support Forum/Problem with socket.AF_ZIGBEE
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Problem with socket.AF_ZIGBEE

0 votes
Hi Digi Team,

I have a problem with the socket of zigbee, I set the socket in this form because I saw this confiuration in others examples:

Zigbee_Socket = socket(socket.AF_ZIGBEE, socket.SOCK_DGRAM, socket.ZBS_PROT_TRANSPORT)
Zigbee_Socket.bind(("", 0xE8, 0, 0))

but on the DigiPython ESP software application when I set the run the python file, this show me the following error:

Configuracion del sokect ZIGBEE
Traceback (most recent call last):
File "WEB/python/dpdsrv.py", line 14, in ?
execfile(os.path.join(os.path.abspath('.'), 'SensorWiFi.py'))
File "WEB/python/SensorWiFi.py", line 197, in ?
File "WEB/python/SensorWiFi.py", line 41, in main
Zigbee_Socket = socket(socket.AF_ZIGBEE, socket.SOCK_DGRAM, socket.ZBS_PROT_TRANSPOR
AttributeError: type object '_socketobject' has no attribute 'AF_ZIGBEE'

but I don't understand because, I imported the zigbee library in the begin of the file.

Can you help me with this problem? :s

Thanks Team!
asked Dec 19, 2013 in Python by Mithandrid New to the Community (0 points)

Please log in or register to answer this question.

1 Answer

0 votes
Please see this link http://www.digi.com/wiki/developer/index.php/XBee_Extensions_to_the_Python_Socket_API#XBee_Sockets_Examples which has the newer AF_XBEE.
answered Dec 30, 2013 by trooper2 Veteran of the Digi Community (589 points)