naiDigiLedRequest: iDigi Led Request

Supported platforms
===================
This application can run on the connectcore9c_a, connectcore9p9215_a,
connectcorewi9c_a, connectcorewi9p9215_a, ns9210_a, connectme, connectwime,
connectcore9p9360, and connectme9210 platforms.

The sample application will demonstrate "do_command" functionality.  The
"do_command" is used to tell the iDigi server to turn on / off the LEDs
on the devices development board. 

What you will do
================
1.  Start your application.
2.  Setup your devices connection to the iDigi server.
3.  Connect to the iDigi server.
4.  Send a Post to the iDigi server to tell the iDigi server to turn on / off
    the LED on the devices development board.

BSP changes
=========== 
1.  Set BSP_IDIGI_ENABLED to TRUE in bsp_net.h in your platform directory.
2.  Set BSP_CLI_ENABLE to TRUE in bsp_cli.h	in your platform directory.
3.  Set BSP_CLI_TELNET_ENABLE to TRUE or set BSP_CLI_SERIAL_ENABLE to TRUE in
    your in your platform directory.  You can also set both to TRUE.  

Setup or login to your iDigi account
====================================
1.  Login to http://developer.idigi.com with your username and password if you
    previously setup an account, or click on "Are you a new user?" to setup a
    new account. 
2.  Click on the "Devices" selection under Management.
3.  Click on "+" from the Devices toolbar to add your device.
4.  Your device will not be discovered, so hit the "Add Manually" button.
5.  Enter the MAC Address of your device then click the "Add" button, then the
    "OK" button.
6.  If your device has both a Wireless and Ethernet interface, use the MAC
    Address of the Ethernet interface as the unique device identifier
    (Device Id).  Any information sent to the iDigi server from either
    interface will go to this Device Id on the iDigi server. 

Start your application
======================
1.  Start your naiDigiLedRequest application.

User buttons and Leds
=====================
1.  If your platform is the connectme, connectme9210 or the connectwime,
    your user buttons are located next to connector P3.  User button 1 is
    located closest to the edge of the board.  The leds are located next to
    connector P7.  User led1 has the number 2 to the right of the led, and
    user led2 has the number 3 to the right of the led.  Set all SW3 switches
    on the development board in the direction of the GPIO arrow.
2.  If your platform is the connectcore9c_a, connectcorewi9c_a,
    connectcore9p9215_a, connectcore9p9360_a or the connectcorewi9p9215_a,
    the user buttons and leds are cleary marked on the bottom left portion of
    the board.  The serial connectors on the left side of the board.
3.  If your platform is the ns9210_a, you only have access to one push button
    on the development board due to GPIO assignments not available on the
    ns9210_a platform.  The push button is the WAKE UP button.  You also do
    not have access to the USER LEDs for the same reason.  You will use the
    leds on the module.  When led 1 is green, led 2 is off.  When led 1 if
    off, led2 is orange.
    
Hardware settings
=================
1.  If you are using the connectcore9p9215_a or the connectcorewi9p9215_a
    platforrm, you will need jumpers on J4 and J5 next to the user LEDs to
    successfully run this application. 

Turn off LED1 and turn on LED2 on the devices development board
===============================================================
1.  A java program is provided to send request to iDigi server and
    iDigi server sends do_command to the device.

2.  Go to src/examples/naiDigiLedRequest/iDigiLedDemo.

3.  Double click the iDigiLedDEMO.jar or
    type java -jar "iDigiLedDEMO.jar" 

4.  In the iDigi Account window enter your iDigi username and password,
    and use developer.idigi.com for the iDigi Server name.
    Then click Connect to iDigi. 

5.  The application will connect to your iDigi account and the Device ID combo box
    will be filled with all the devices registered in your iDigi account.
    Select your device ID from the combo box and click "Start the application with the selected device". 

6.  The main window of the application shows the status of the two LEDs
   (representing the LEDs on the development board) and the two user buttons
   (representing the buttons on the development board).
    A text box is also available to establish the refresh time (the number of seconds after which a request 
    will be sent to the device, to check the status of the LEDs).
    This refresh time can be modified by the user. The time remaining to the next refresh is showed at the 
    bottom of the window.

7. When the user clicks on BUTTON1 on the application, the associated LED1 will toggle its status. 
   When the user clicks on BUTTON2 on the application, the associated LED2 will toggle its status.
   This has immediate effect on the development board and demonstrates how a device can be remotely controlled 
   through the internet. 

8. If the user physically presses a button on the development board,
   the associated LED will toggle but the JAVA application will not update its status until the refresh 
   period is over. 

    See src/examples/naiDigiLedRequest/iDigiLedDemo/sciLedRequest.xml for infomation
    about the do_command to write and read the led. 

