Once the XBee module is successfully installed, replace the zigbee.py in myDigiPython/lib/python2.7/site-packages/xbee with the one from zigbee_py-for-PC
In order for the Digi socket extensions to work, you will need to modify the socket.py that comes with standard Python2.7 library. Open socket.py and change the following lines:
from:
family = property(lambda self: self._sock.family, doc="the socket family")
type = property(lambda self: self._sock.type, doc="the socket type")
proto = property(lambda self: self._sock.proto, doc="the socket protocol")
Hi Mishka,
I’m trying to run xbee programmes by local python too, and I face the same problem with you. I’ve followed your step, but the problem hasn’t fixed. It still shows: NameError: name ‘AF_XBEE’ is not defined.
Can I ask what’s the “py-for-PC source code”? and the Xbee file which install in virtualenv is download through python.com?
Thank you so much.