naxbee: XBee sample application

It can run on any platforms which has more than 1 serial port. 

What it does?
=============
- Discovers the XBee devices on the network
- Gets the value of the Node Identifier
- Sets the value of the Node Identifier
- Restores the value of the Node Identifier

Additional Hardware requirements
================================
XBee Development Boards
    XBIB-R-DEV: RS-232 female carrier board for ZigBee modules

XBee Modules
    XB24-Z7WIT-001: ZigBee coordinator XBee module, wire antenna
    XB24-Z7WIT-004: ZigBee router/end device XBee module, wire antenna

XBee-PRO Modules
    XBP24BZ7WIT-001: ZigBee coordinator XBee-PRO module (longer range) , wire
    antenna
    XBP24BZ7WIT-004: ZigBee router/end device XBee-PRO module (longer range) ,
    wire antenna

Additional variants are available. Please visit the Digi website for detailed
product information.

For educational material on ZigBee technology, please also visit
http://www.digi.com/news/videos.jsp.

Hardware installation RS-232 female carrier board
=================================================
1. Install XB24-Z7WIT-001: ZigBee coordinator XBee module into the RS-232
   female carrier board.
2. Using the serial cable supplied, connect the RS-232 board to the serial
   port on your device you will be using for the XBee device.
3. Attach the power supply to the RS-232 Interface Board and the power
   cable to an outlet.

Software installation of X-CTU
==============================
1. From the X-CTU folder, run xctu_installer.exe and follow the directions.

Hardware installation USB carrier board
=======================================
1. Install XB24-Z7WIT-004: ZigBee router/end device XBee module into the USB
   carrier board.
2. Connect one end of the USB cable to your PC, and the other end to the USB
   carrier board.  If you have not installed the Maxstream driver, continue
   with steps 3 - 8.
3. The New Hardware Wizard should start so you can install software for
   Maxstream PKG-U.
4. Select install from a specific location (Advanced)
5. Browse to X-CTU\WINDOWS drivers and continue the installation.
6. The New Hardware Wizard should start so you can install software for USB
   Serial Port
7. Select install from a specific location (Advanced)
8. Browse to X-CTU\WINDOWS drivers and continue the installation.

Serial port options
===================
The following are some serial port options you can have on different
platforms:

1.  For the Digi Connect ME 9210 and Digi Connect Wi-EM 9210 connect the XBee
    deviceto serial port 1 (/com/0) and use serial port 2 (/com/2) for dialog.
2.  For the 9P 9215, Wi-9P 9215, ns9210 connect the XBee device to serial port
    B and use serial port D for dialog.
3.  For connect ME, Connect Wi-ME, Connect EM and Connect Wi-EM connect the
    XBee device to serial port A and use serial port B for dialog.
4.  For all other platforms, connect the XBee device to serial port B and use
    serial port A for dialog.

What is required to run this sample?
====================================
NET+OS device serial port which supports hardware handshake. Which ever
serial port you select to communicate with XBee radio, make sure it is

1.  The serial port is not used for dialog, std I/O, CLI or simple serial.
    Related files are bsp_sys.h, bsp_serial.h, bsp_cli.h under respective
    bsp/platforms directory.
2.  Configured at least as 4 wires uart (gpio.h)
3.  Set BSP_XBEE_PORT in <platform>/bsp_serial.h to the selected port
    
Running the sample
==================
1.  The sample first attempts to discover the two XBee modules.  The XBee
    module on the RS232 board, and the XBee module on the USB board.  You
    should see something like this on you serial output;

=============================================================================
       ExtendedAddress       Network    Parent    DevType      NodeType
=============================================================================
[00:13:A2:00:40:3C:77:65]!   [0000]!   [FFFE]!     30016       coordinator
[00:13:A2:00:40:52:16:B3]!   [C8FE]!   [FFFE]!     30000            router
=============================================================================

2.  If you get the message "No device found!", it means the communication with
    the XBee on the RS232 board is failing.  The XBee module may have been
    installed incorrectly on the RS232 board, or the RS232 board may be
    connected to the wrong port. 
3.  If you only see the coordinator in the output, it means it cannot discover
    the XBee module on the USB board.  You should see alternate LED blinks.
    between LED 4, and the bottom left red LED in the group of 6 LEDs on the
    USB board.  If you do not hit the reset button S6, and re-run the sample.
    If you still have problems, The XBee module may have been installed
    incorrectly on the USB board, or the Maxstream drivers may not be loaded.
4.  If you still cannot discover the XBee module on the USB board, hit SW1 4
    times quickly.  The blinking should stop temporarily, and the red LED will
    go solid.  This will default the XBee module, re-run the sample.
5.  The sample will then get the current value of the Node Identifier, set the
    value of the Node Identifier and restore the value of the Node Identifier.
