XBee are popular wireless modules used by hobbyists and DIYers.  These wireless modules come in variety of styles and power ratings (distance ranges).  There are several tutorials even instructables for configuring XBees for point-point (P2P) communication.  P2P communication is restricted between two end-points and this is all you need if you only have two wireless devices in your setup.  What do you if you have multiple devices...say a network?  Perhaps we should start with a simpler set up.  

In this instructable, I will show you how to configure XBees for a point-to-multipoint mesh.  In this configuration, there will be one central COORDINATOR and multiple END DEVICES.  The END DEVICES will send and receive messages from the COORDINATOR and the COORDINATOR will have to sort which wireless packets came from which END DEVICE and send packets to the appropriate END DEVICE as well.  

Step 1: Wireless Setup

The XBee modules can be configured in two ways: Transparent Mode (AT) and API Mode (API). In AT mode you are limited to point-to-point communication between two XBees. In API mode, we can trivally send and receive from both the COORDINATOR and many many XBees out in the world.  Additionally, API mode will expose a variety of additional information encoded in each packet. 

In a point-to-multipoint wireless configuration (see picture 1), multiple nodes (Router/End Devices) pictured in blue, send to and receive from a central coordinator (red).

Andrew Rapp wrote a great XBee Java API which can be found here: http://code.google.com/p/xbee-api/

Andrew also provides detailed instructions for integrating the XBee API with the popular IDE Eclipse. For my project (and for unknown reasons) I decided on using the Swing JAVA GUI library which, for me, was a little easier to develop for using NetBeans. Therefore, I will also provided instructions on how to setup the XBee JAVA API using Netbeans. But first we need configure the firmware on the XBee. 
Step 4: XBee Java API <br>can you tell me why is this step needed?
C:\dev\libs\java\xbee-api-0.9\lib<br><br>C:\dev\libs\java\xbee-api-0.9\src\com\rapplogic\xbee\api\wpan<br>C:\dev\libs\java\xbee-api-0.9\src\com\rapplogic\xbee\api\zigbee<br><br>C:\dev\libs\java\xbee-api-0.9\src\com\rapplogic\xbee\examples\wpan<br>C:\dev\libs\java\xbee-api-0.9\src\com\rapplogic\xbee\examples\zigbee<br>-------------------------------------------------------------------------------------------------------<br>i'm trying to use netbeans. i added a project folder &quot;TestXBeeJavaAPI&quot;.<br><br>i added C:\dev\libs\java\xbee-api-0.9\lib to libraries and C:\dev\libs\java\xbee-api-0.9\src\ to source packages, but i get many red exclamation marks. any ideas?
I'm sorry, but will this work for series 1 as well? Thks =D
Yes! But you will have to use the following settings:<br>Modem: XB24<br>Function Set: XBEE 802.15.4 <br>Version 10E8 or higher

About This Instructable




More by quasiben:EL Driver Board Image Capturing Bird Feeder Proximity-Sensing Pocket Squares 
Add instructable to: