Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
WINC3400 Connecting a TLS Enterprise Secured AP Example - SAM4S XPlained Pro Documentation

Introduction

This example demonstrates the use of the WINC3400 with the SAMx2x Xplained Pro board to connect to a secured 802.1x enterprise network that supports TLS as phase 2 authentication.
The following Enterprise security methods are supported by this example.

* - EAP with TLS
* - PEAPv0 with TLS
* - PEAPv1 with TLS
*

It uses the following hardware:

  • the SAM Xplained Pro.
  • the WINC3400 on EXT1.

Main Files

  • main.c : Initialize the WINC3400 and connect to network that support enterprise security with TLS authentication protocol.

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 enterprise security with any of the following security method.
  • EAP with TLS
  • PEAPv0 with TLS
  • PEAPv1 with TLS
  1. You need to know following things before configuring RADIUS server settings in the AP. Ask your network administrator to get there information and configure it in the WINC3400.
    * User name
    * User certificate and key file
    * Name of wireless network
    * Root certificate file
    *
  2. Modify MAIN_WLAN_802_1X_USR_NAME to the user name.
  3. Modify the python script key_decoder.py available in the script folder with path to user certificate and key file. Execute the script to generate the file privateKey_decoded.txt which contain the certificate and private key coefficient. Copyt the content of privateKey_decoded.txt and update the arrays modulus, exponent and certificate in main.h file. Modify MAIN_WLAN_SSID to wireless network name
    * #define MAIN_WLAN_SSID "DEMO_AP"
    * #define MAIN_WLAN_802_1X_USR_NAME "user"
    *
  4. Build and run the application. If the device connected successfully, IP address which is assigned by DHCP will be displayed on the terminal program.
    * -- WINC3400 enterprise security connection with TLS example --
    * -- SAMXXX_XPLAINED_PRO --
    * -- Compiled: Mar 12 2019 11:27:30 --
    * (APP)(INFO)Chip ID 3400d2
    * (APP)(INFO)Curr driver ver: 253.1.0
    * (APP)(INFO)Curr driver HIF Level: (2) 1.4
    * (APP)(INFO)Fw HIF: 8104
    * (APP)(INFO)Firmware HIF (2) : 1.4
    * (APP)(INFO)Firmware ver : x.x.x
    * (APP)(INFO)Firmware Build Dec 21 2018 Time 02:06:42
    * (APP)(INFO)Ota HIF: 0000
    * (APP)(INFO)No valid Ota image
    *
    * (APP)(INFO)OTP MAC
    * (APP)(INFO)MAC Address: F8:F0:05:F6:79:FA
    *
    * Connecting to DEMO_AP
    * Username:user
    * Wi-Fi connected
    * Wi-Fi IP is xxx.xxx.xxx.xxx
    * Connection successfully completed.
    *
Warning
* For using the security enterprise network, the root certificate must be written to WINC3400.
* Download the root certificate using the root_certificate_downloader. (Refer to WINC3400 Software User Guide.)
*

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.