# Zigbee Extension to Python socket API question

**URL:** <https://forums.digi.com/t/zigbee-extension-to-python-socket-api-question/397>\
**Category:** XBee - Zigbee\
**Created:** [October 13, 2010, 1:15am UTC](https://forums.digi.com/t/zigbee-extension-to-python-socket-api-question/397 "2010-10-13T01:15:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![randy.karr](https://avatars.discourse-cdn.com/v4/letter/r/d26b3c/32.png) [@randy.karr](https://forums.digi.com/u/randy.karr)\
**Post date:** [October 13, 2010, 1:15am UTC](https://forums.digi.com/t/zigbee-extension-to-python-socket-api-question/397/1 "2010-10-13T01:15:39Z")

</div>

Trying to communicate to the X2 using Python and calling the “socket” module. The app note says Digi has extended the standard Python socket. The command is:

from socket import \*  
DESTINATION=(“00:13:A2:00:40:68:04:BF!”, \ 0x5e, 0xc105, 0x703)

I keep getting a error “invalid token”. I am using the 16 digit Mac address of the X2, End Point 0x5e, profile ID 0xc105, Custer ID 0x703. I find these addresses on the iDigi appspot under the Network Tree.

Am I using the correct socket module that comes with Python ? Is there a unique Zigbee socket module somewhere ?

thanks

---

<div class="post-metadata">

**Author:** ![kavya](https://avatars.discourse-cdn.com/v4/letter/k/e480ec/32.png) [@kavya](https://forums.digi.com/u/kavya)\
**Post date:** [May 15, 2012, 4:16pm UTC](https://forums.digi.com/t/zigbee-extension-to-python-socket-api-question/397/2 "2012-05-15T16:16:54Z")

</div>

May be because of wrong syntax, try this

DESTINATION=(“00:13:A2:00:40:68:04:BF!”, 0xe8, 0xc105, 0x11)

---

<div class="post-metadata">

**Author:** ![lynnl](https://avatars.discourse-cdn.com/v4/letter/l/22d042/32.png) [@lynnl](https://forums.digi.com/u/lynnl)\
**Post date:** [May 16, 2012, 5:54pm UTC](https://forums.digi.com/t/zigbee-extension-to-python-socket-api-question/397/3 "2012-05-16T17:54:12Z")

</div>

The PC’s socket module will NOT work with this & cannot be used with (as example) a USB-based XBee.

This only works on a Digi gateway, and the ‘unique Zigbee socket module’ is actually not in Python, but is part of the Digi product RTOS.

- Lynn
