Introduction
This example demonstrates the use of the WILC with the SAM Xplained Pro board using WiFi concurrent mode STA/AP. STA mode is used to connect to a home router with internet connection to retrieve weather information. AP mode is used to allow any WiFi capable devices to connect to the WILC and then access an embedded webserver to read weather information as well as host MCU status (up to 7 connected stations at the same time).
To access the HTTP server connect with your laptop to WiFi network "WILC", then open a browser at http://192.168.5.1
It uses the following hardware:
- the SAM Xplained Pro.
- the WILC on EXT1 (WINC can be used as well in bypass mode).
- WILC SD board can also be used connected to the SD Card Connector, with IRQ line connected to Ex1[9]
Main Files
- main.c : Initialize the FreeRTOS scheduler.
- sta.c : Enable STA and AP mode for WILC. Retrieve weather information via STA mode.
- ap.c : Enable HTTP server via AP mode.
Usage
- Configure below defines in sta.h to specify AP to connect to.
* #define STA_WEP_KEY "1234567890"
* #define STA_WEP_AUTH_TYPE
WEP_ANY
*
- Configure below defines in sta.h to specify WILC AP mode to start with.
* #define AP_WEP_KEY "1234567890"
*
- Build the program and download it into the board.
- On the computer, open and configure a terminal application as the follows.
* Baud Rate : 115200
* Data : 8bit
* Parity bit : none
* Stop bit : 1bit
* Flow control : none
*
- Start the application.
- In the terminal window, the following text should appear:
* -- Weather concurrent an BT demo --
* -- SAMXXX_XPLAINED_PRO --
* -- Compiled: Oct 19 2015 14:39:47 --
*
*
wifi_cb: STA M2M_WIFI_REQ_DHCP_CONF
*
wifi_cb: STA IPv4 addr: xxx.xxx.xxx.xxx
*
wifi_cb: STA IPv6 addr: xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx
*
Compilation Information
This software was written for the GNU GCC compiler using Atmel Studio 6.2 Other compilers may or may not work.
Contact Information
For further information, visit Microchip.