Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
WINC1500 Connecting a WEP/WPA Secured AP Example for SAML21 XPlained Pro B Documentation

Introduction

This example demonstrates the use of the WINC1500 with the SAMD21 Xplained Pro board to connect to a secured WEP, WPA network.
It uses the following hardware:

  • the SAMD21 Xplained Pro.
  • the WINC1500 on EXT1.

Main Files

  • main.c : Initialize the WINC1500 and connect AP using Security mode WEP, WPA.

Usage

  1. Assemble the devices and connect to USB debug cable from PC.
  2. 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
    *
  3. Prepare an AP that supports WEP and WPA/WPA2 Security and configure Wi-Fi Security. For more information, please refer to manufacturer's manual.
  4. To test WPA Security, Use case 2 in main function and modify MAIN_WLAN_PSK in source file "main.h".
    * #define MAIN_WLAN_PSK "12345678"
    *
  5. To test WEP Security, Use case 1 in main function and select wep64_parameters or wep128_parameters as security parameters. Modify MAIN_WLAN_DEVICE_NAME, MAIN_WLAN_WEP_KEY_INDEX and MAIN_WLAN_WEP_KEY_40 or MAIN_WLAN_WEP_KEY_104 in source file "main.h".
    * #define MAIN_WLAN_DEVICE_NAME "DEMO_AP"
    * #define MAIN_WLAN_WEP_KEY_40 "1234567890"
    * #define MAIN_WLAN_WEP_KEY_104 "1234567890abcdef1234567890"
    *
  6. Run the application. If the device connected successfully, IP address which is assigned by DHCP will be displayed on the terminal program
    * -- WINC1500 security connection with WEP,WPA security example --
    * -- Compiled: xxx xx xxxx xx:xx:xx --
    * Connecting to XXXXXX.
    * Wi-Fi connected
    * Wi-Fi IP is xxx.xxx.xxx.xxx
    *

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.