Home/Support/Support Forum/Direct communication with single modules in a XBee mesh via RS232 or sockets
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Direct communication with single modules in a XBee mesh via RS232 or sockets

0 votes

I'm wondering if it is feasible to exchange data directly with XBee modules that are arranged in a mesh?
Background: I have some devices that communicate with a PC application via RS232. The application is written in C++ (visualC). The idea is to enhance the devices with XBee modules, but I don't like to rewrite the whole application. Instead I am wondering if it is possible to map each single module onto a single virtual Comport or TCP/IP socket on the PC.
May be RealPort software in connection with a ConnectPort or a python script on the ConnectPort can do that but I am wondering if this really feasible.

asked Feb 11, 2011 in 3rd Party Python and API development in other Languages by Knut New to the Community (3 points)

Please log in or register to answer this question.

2 Answers

0 votes
Here is a sample to give you some ideas and get you started

This is a simple add 'zb_tcp.py'. You will need to modify the script to include the port you want to use, and the EUI of your XBee, but it will create a socket for a single XBee and present a data connection as a TCP socket.

This is presented as-is, as a sample of how this can be achieved. Use at your own risk. :-)

Edited: I was going to present a second sample, but I can't seem to find it now.
answered Feb 11, 2011 by DigiGuy42 Community Contributor (102 points)
0 votes
Thank you very much. Although I haven't a clue of python I think I can understand the code. It is a really good starting point and talking through TCP sockets is not difficult to implement in C++. The most important thing is to know that it is possible at all.

That script has to run on a ConnectPort, am I right?
answered Feb 11, 2011 by Knut New to the Community (3 points)