Home/Support/Support Forum/How do I use ConnectPort X2e Ethernet/Wifi to receive data send from multiple Xbee RF module?
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

How do I use ConnectPort X2e Ethernet/Wifi to receive data send from multiple Xbee RF module?

0 votes
Hi Guys,

I'm trying to write a python script that enable ConnectPort X2e to receive data sent from multiple Xbee S2 RF module(XB24-ZB). Does any one can give some suggestions about how to start?

The current network configuration is, a ConnectPort X2e gateway as a coordinator to receive data. 2-3 Xbee S2 RF modules are placed at different locations on a room, and keep sending a designated number. What I trying to achieve is to use the Xbee gateway to receive the number sent by those Xbee RF module.

As I know I have to write a python script to make this work, so I would like to ask where can I find related reference documents, tutorials, or examples. Many thanks!
asked May 20, 2014 in Python by dxc32 New to the Community (0 points)

Please log in or register to answer this question.

2 Answers

0 votes
Sure, try using the sample Hello world application in the Python Development kit.
answered May 21, 2014 by mvut Veteran of the Digi Community (11,450 points)
The Hello World sample doesn't help at all.
it just simply print "Hello World".
The answer I looking for is, which Xbee Python API(module/funtion)  should I use, so that the gateway is able to get data sent by Xbee RF module. However, I already figured it out. Thanks
If you have figured it out, you mind sharing.
0 votes
Hi,

You need to open a socket -
sd = socket(AF_XBEE, SOCK_DGRAM, XBS_PROT_TRANSPORT)
and bind at -
sd.bind(("", 0xe8, 0, 0))
then use -
payload, src_addr = sd.recvfrom(255)
Now unpack the payload and parse it.

I hope this works.
answered Jun 12, 2014 by 16ksa23 Veteran of the Digi Community (426 points)
Any resources for unpacking and parsing?
...