Table of Contents
Overview
This example code demonstrates how to use WPS Wi-Fi provisioning with the CC3200. It demonstrates both the Push button and Pin code options available to be used with WPS.
Application details
Program Flow
- Initialize the device networking layer
- Initiate connection to configured AP with WPS security using the Push button method.
- Once connected, the red LED turns on.
- After a delay, the application disconnects from the AP. The red LED is turned off.
- Initiate connection to the same configured AP with WPS security using the Pin code method. The default pin code is 88664422.
- Once connected, the red LED turns on.
- After a delay, the application disconnects from the AP. The red LED is turned off.
Source Files briefly explained
- gpio_if Basic GPIO interface APIs. Used to control the red LED.
- main Initializes the device, connects to a AP using two WPS methods
- pinmux Assigns a personality to the pins at the device boundary
- startup_*.c - Initialize vector table and IDE related functions
Usage
- Setup a serial communication application. Open a serial terminal on a PC with the following settings:
- Port: Enumerated COM port
- Baud rate: 115200
- Data: 8 bit
- Parity: None
- Stop: 1 bit
- Flow control: None
Modify the SSID_NAME macro in common.h for your AP that supports WPS provisioning using push button and pin code. You do not need to modify any other AP parameters.
#define SSID_NAME "<ap_name>" /* AP SSID */
- Run the reference application.
- Open the project in CCS/IAR. Build the application and debug to load to the device, or flash the binary using UniFlash.
- Choose an AP that supports WiFi provisioning using WPS (Push Button as well as Pin Code).
- Connect to the AP from a laptop and open the AP’s webpage in a browser. This is likely http://192.168.1.1 and then enter the admin-password details.
- Once the application starts, the device will wait for a connection using WPS Push button mode.
- Press the WPS push button on the AP. This can also be simulated on the webpage of the AP (if supported).
- Once connected, the red LED turns on. After about 5 seconds, the application disconnects from the AP and the red LED turns off.
- Now the device will wait for a connection using WPS pin code mode. Enter the pin Code 88664422 in the webpage of AP.
Once connected, the red LED turns on. After about 5 seconds, the application disconnects from the AP and the red LED turns off.