Binding a specific Xbee to a specific socket

Hi all.

I’ve been using a connectport X8 and two Xbee radios for monitoring temperature and pressure, using a microcontroller. The thing is that i want to bind an specific socket to a specific radio. Lets say i have the destination address 00:13:a2:00:40:0a:62:60! and i want to associate it to the socket 30000, and only to this socket. I want that assure that this socket always listen to that specific destination address.

I’ve been working with the EmbeddedKitService.py and it has worked fine, but i’ve realized that the socket assignation is up to the time that it takes to the connectport to find the Xbee radio. If the radio is closer to the CP it will assing the first socket to it, and so on.

If i change the radios from their original position and run the python application, it will change the socket assignation and i don’t want this to happen.

I would really appreciate it if you could help me with these!!!

Thanks

I believe you’ll be interested in the following link, which details a TCP socket solution:

http://www.digi.com/wiki/developer/index.php/Tcp_to_Zigbee_port_binding

Part of this script involves running a script called table_generator.py. What this script does is goes out and takes a look at your Wireless network, then records the extended addresses of the devices on the PAN, along with the TCP socket which will be bound to each of the addresses. The file created, bind_table.py, is a file which can be edited so that a TCP socket will always bind to a desired extended address.

If a new device is then added to the PAN, the file can be edited to reflect the new device, or the table_generator.py script can be run again (although the current bind_table.py would be overwritten, and the mappings may have changed).