Staging:CC3220 Getting Started with WLAN Station

Overview
A CC3220 device has the capability to behave as a station in a typical networking system (Infrastructure setup). It can connect to access point (with or without security) and can use the internet services via the same access point, if available.

Application details
This application aims to exhibit the CC3220 device as a station in a simple network. Developers/users can refer the function or re-use them while writing new application. The application will be used without the UART terminal. The device connects to an AP (access point), with AP configurations stored in the form of macros in the application. If the connection is successful, it will try to get the IP address of “www.ti.com” and then ping to the ip address. Zero is the expected return value. A different return code would mean that the internet connection is not available or that the ping to the link is not successful.

Macros for Security

This example can be used either on TI-RTOS or FreeRTOS.

For the application to work with TI-RTOS, tirtos project and tirtos_config project need to be imported into the application workspace. These projects can be found in CC3220-SDK under tirtos folder. Please follow this link for CC3220 TI-RTOS.

Source Files briefly explained

 * main.c – main file creates the simplelink task which does most of the network related operations, a WlanStationMode task makes calls to the network related APIs of simplelink library.
 * pinmux.c - File to mux device pin to different peripheral signal.
 * 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).

Code flow
Using the CC3220 as an STA is a simple three step process.


 * 1) Start the SimpleLink by calling  API
 * 2) Connect to the Access point by calling  API
 * 3) Use the  API or check for   NetApp Event to get the IP address of the device.

Refer to the main.c file of the reference application for more details

Usage

 * Run this application (getting_started_with_wlan_station) application from IAR/CCS or Flash the bin file to device.
 * Device will switch to STA mode if it's in other mode.
 * It'll try to connect open predefined AP (cc3220demo) and at successful connection Red LED will glow up.
 * After AP connection device will ping to AP, at successful ping to AP, Green LED will switch on.
 * Device will further check for internet connection (ping to 'www.ti.com') and at successful ping to external host Orange LED will switch on.
 * Observe the LEDs state and code flow to confirm the proper execution.



Limitations/Known Issues
None.