===========================================================================
Nucleus Samples - Wireless
===========================================================================

Purpose & Goals
---------------

This sample application demonstrates how to load a custom wireless
configuration of the WPA Supplicant by overriding the default
configuration. It connects to a wireless network and then prints the
local IP address.

This application demonstrates the following concepts:

    * Configure the WPA Supplicant using a configuration file.
    * Determine our own IP address.
    * Modify the default debug level of the supplicant at run-time.


What You Will Need
------------------

To run this sample application you will need a Nucleus platform
with a BSP that has a WLAN device enabled. You will also need a Host PC
which is connected to the serial port of the target platform. The Host PC
should have a terminal software installed, such as HyperTerminal. This
is required to display serial output.

You will also need to setup a wireless network to a configuration which
is compatible with the one defined in the "WDEMO_Wpa_Config" variable of
the wireless_sample.c file. You can also modify this configuration in
wireless_sample.c to make it compatible with your network.

 
Components Used
---------------

The following Nucleus components are used in this application:

    * nu.os.net.stack
    * nu.os.net.wpa_supp
    * nu.os.net.ssl.openssl.ssl
    * nu.os.net.ssl.openssl.crypto
    * nu.os.drvr.serial
    * nu.bsp.drvr.serial  (any supported driver)
    * nu.os.drvr.wlan    (any supported driver)

In addition to the above, the target-board specific drivers and devices
have to be enabled.

Building the Application
------------------------

Open the provided development shell, e.g. Nucleus Dev Shell (CS GNU ARM).bat, and execute the following command for the desired platform. 

make PLATFORM=<platform> 

For example, <platform> can be "at91sam9263ek". For more information, please refer to the Nucleus user manual.
Due to the required components listed above, only the following configuration files are compatible:

 1) <platform>.core.config
 2) <platform>.pwrmgmt.config

As a result of above command, one of the generated output images should be "wireless_sample.out".

How To Run The Application
--------------------------

Follow the steps below to run the application:

1- Ensure that your Host PC is connected to the target board's serial port.
   Then run a terminal software on the Host PC, such as HyperTerminal.

2- Load and run the wireless_sample.out file. 

3- View the demo output on a console window.

4- Watch the messages which appear in your serial terminal. The final
   message will display the local IP address. If an error occurs, it will
   also be logged in serial output.
