Peer-to-Peer communication is the simplest communication between XBee Radios. In Peer-to-Peer communication, all the XBee RF modules act both as transmitter as well as reciever. Configuring XBee Radios for Peer-to-Peer communication is a simple task. By default XBee RF modules are configured for Peer-to-Peer communication. In Peer-to-Peer communication each XBee RF module communicate with all the other having the same configuration. Peer-to-Peer communication can be pictorially represented as shown in the image given below.
Configuring XBee RF modules for Peer-to-Peer Communication.
Step 1: Connect two XBee RF Modules to your computer either using Xbee Explorer USB or using Xbee Explorer Dongle.
Step 2: Now open two X-CTU windows as shown below. Enter the com port addresses of your XBee RF modules in both X-CTU windows. Then press Add button.
Important: If you have installed X-CTU using http://j.blog.stutzman.net/2012/12/x-ctu-on-ubuntu.html , some changes have to be made to the terminal commands.
Open your terminal and run the following commands.
ln -s /dev/ttyUSB0 ~/.wine/dosdevices/com5
ln -s /dev/ttyUSB1 ~/.wine/dosdevices/com6
sudo chmod 777 ~paulsin/.wine/dosdevices/com5
sudo chmod 777 ~paulsin/.wine/dosdevices/com6
Important : paulsin should be replaced by your username.
If your USB devices are not USB0 and USB1, corresponding changes had to be made in the commands.
Step 3: Now your com port will be displayed in the Com Port Setup as shown below.
Step 4: Press Test / Query button in both the X-CTU windows. If everything is right, you will get pop-up boxes displaying the Serial Number of corresponding XBee RF module. Press OK button on both pop-up boxes.
Step 4: Now open the Modem Configuration Tab in both windows. Press the Read Button. Now scroll the windows to top.
Step 5: Press the Restore Button in both the X-CTU windows (Restoring will configure X-Bee Modules for Peer-to-Peer Communication as a default).
Step 6: Change the following parameters in all the X-CTU windows (for all the XBee RF modules).
CE = 0 (Configuring each module to operate as an End Device)
A1 = 0 (disabling End Device Association on all modules)
Set ID and CH parameters identical across the network.
Now press the Write button next to the Read Button on both the X-CTU windows. If your writing is successfull, open the Terminal Tab. Now type some text in terminal. Those text will appear instantly in all the other terminals. Now your Peer-to-Peer XBee network is ready.
0 comments: