I’m trying to communicate two xbee ZB modules, in API mode, by implementing DIGI’s xbee socket extension (actually, I don’t know if it’s really possible)
So, first part of my python code goes like this:
import xbee
from socket import*
sd = socket(AF_ZIGBEE, SOCK_DGRAM, ZBS_PROT_TRANSPORT)
which obviously fails (error: name ‘AF_ZIGBEE’ is not defined) because I don’t have the socket.AF_ZIGBEE module.
The code you are working with is designed to run on an XBee gateway. Are you working with an XBee gateway? If not, then you need to take a step back and start by declaring a port.
My main problem now is that I can’t receive the data using the Reading and Writing example of the previous page. The socket doesn’t detect data coming from the serial ports.