The zb_tcp_serial.py script would accomplish this task. It creates TCP sockets on your CP-X2 gateway which would correspond to the radios on your PAN. You’d then telnet directly to the TCP socket of whichever radio you wanted to talk to.
I’ve attached a zip with the needed py files and zip archive to support this application. You’ll also need to load the python.zip Python Standard Library files, [b]which can be found here[/b].
I have the same question as jyaron, but i’m using a connectport X8. In fact i have the drop in networking starter kit. I’ve ran the zb_tcp_serial.py script on the connectport with a telnet program, and then with the hyperterminal i connect to the 27001 port, and i got a response from the Xbee development board, but if include another Xbee development board, it doesn’t seem to work. Do i have to run zb_tcp_serial.py script again and then connect to the 27001 and 27002 ports? Both Xbee development boards are configured as end nodes.
By the way, if i run zb_tcp_serial.py script i get an error. I will post it on Monday. I would really appreciate if you could give a more detailed explanation about this topic.
You only run the zb_tcp_serial.py script once to create the TCP sockets for the radios on your PAN. You should see the discovered radios and their corresponding TCP sockets listed when you run the script. You would then connect to the socket for the appropriate radio to talk to it directly.
zb_tcp_serial.py is located within the tcp_serial.zip that I attached to an earlier post. Just save the zip, unzip it on your harddrive, upload the files contained in the zip to your ConnectPort X gateway, then start the zb_tcp_serial.py script from a telnet session to the Gateway.
Saw your posting and thought that this might help. I was trying to get a Python Linux daemon to automatically connect to an XBee-based device via my ConnectPort X2. Spent a lot of time asking the admin dumb questions and got good answers.
I came up with a solution that uses the Python XMLRPC module on the PC to determine the ConnectPort X2 TCP port that corresponds with a particular XBee Device.
I posted my test code in an earlier thread “Digi Python scripts” named “zb_tcp_serial.py Control Port”. It’s about the 4th topic from the beginning.
Using the zb_tcp_serial.py program on the ConnectPort and incorporating the posted test code into my Linux daemon, I gathering samples from an ZBee-based Brultech power monitor across a network.
Thankyou for posting your code! The nice thing is, I can click on your username on here and find all your posts so I can get to your script easily. Hopefully I have some time to play with it soon.
The python app and thread itself are from 2008. There have been many improvements across the productline, and a strong integration with our Device Cloud and Cloud Services is well under way.
The script under discussion in this thread is one which is a member of the [“Data Tunneling” category](http://www.digi.com/wiki/developer/index.php/Category:Data_Tunneling target="_blank) of our Python mediawiki. The category itself has several such Data Tunneling scripts, some which support TCP or UDP tunneling, in either direction.
Those who truly want to explore the integration of hardware, software, and M2M Device Cloud computing should click the “Get Started Now” button [b]at this link[/b].
Once your account is Active and you’ve logged in, use the Add Device button to move your Gateway over to your own account. If you aren’t sure how to setup your Digi Gateway to connect to the Device Cloud on the other hand, [b]this is the best place to start.[/b]