Staging:CC3220 WPS Provisioning (Texas Instruments NDA restrictions applicable)

Overview
This application demonstrates WPS (Wi-Fi Protected Setup) provisioning mechanism, including both PBC and PIN.

Application Details
Wi-Fi provisioning is the process of connecting a new Wi-Fi device (station) to a Wi-Fi network (access point). The provisioning process involves loading the station with the network name (often referred to as SSID) and its security credentials. Out of all the commercial method, WPS is perhaps the most common one.

Regardless of its popularity, WPS is not a recommended provisioning method due to discovered security flaw back in 2011. Please see this page for more detail.

In this example application, we will try PBC method first, disconnect, and switch to PIN method.
 * WPS-PBS: This method uses a push button that can be commonly found on many AP. Most of the time, the button has the symbol Wps logo small.png.
 * WPS-PIN: This method uses PIN number to connect. In the AP's settings page, the user needs to enter the provided PIN from the Simplelink device.

Prerequisite

 * 1x CC3220LP
 * 1x Micro-USB cable
 * 1x 2.4GHz AP with WPS-PBC and WPS-PIN capability

Source Files Details

 * main.c - Application code. Initializes the device in default configuration and performs all application tasks.
 * pinmux.c - Pinmux configurations as required by the application.
 * cc_launchpad.c - Initializes peripherals.
 * timer_if.c - Functions to control timer.
 * uart_if.c - Functions to display information on UART.
 * startup_*.c - IDE specific startup functions (not required when working with TI-RTOS).

Key Simplink API used

 * sl_WlanConnect - Connecting to WPS network.

Defining your own PIN
At the top of the main.c file, you may change the PIN number from the default "88664422" to any 8-digit number.

Example Use Cases and Outputs
In this example, we are using the TP-LINK TL-WR740N (v2.5) as our target AP to connect the Simplelink device to. Note that every vendor has different pages for configuring WPS. Please refer to your AP's manual for WPS configuration.


 * 1) Connect the boards, compile, and run the application. For instructions on how to compile a project and to bring up a terminal, please refer to CC3220 Getting Started guide.
 * 2) At first, you'll be asked to press the WPS button on your AP. CC3220_wps_provisioning_1.png
 * 3) Upon successful connection, the device will automatically disconnects from AP in order to move onto PIN method. CC3220_wps_provisioning_2.png
 * 4) In the router's settings page, you should find a page that allows you to perform WPS. In the TP-LINK router we are using, this can be found under the QSS page. sl_sdk_wps_03.png
 * 5) Click the "Add device" and enter the pin number as shown in the console screen above. sl_sdk_wps_04.png
 * 6) If the connection is successful, you'll see the following console screen, indicating the status of the testing result. Demo application done. CC3220_wps_provisioning_3.png

Limitations/Known Issues
None