5.1 Example 1 - Connecting ATWINC to TLS Secured AP

The EAP-TLS authentication is based on the 802.1x/EAP architecture. The 802.1x/EAP authentication process involves the following components:
  1. Supplicant (ATWINC)
  2. Authenticator (wireless access point configured for Enterprise security)
  3. Authentication server (RADIUS server or PC with FreeRADIUS or Hostapd installed)
Perform the following steps to connect the ATWINC using the EAP-TLS enterprise security:
  1. In Atmel Studio, open the WINC1500_SECURITY_ENTERPRISE_NETWORK_TLS_EXAMPLE project.
  2. Configure and run the FreeRADIUS or hostapd server (see Configuring a Hostapd Server and Configuring a FreeRADIUS Server).
  3. Provide the macro MAIN_WLAN_802_1X_USR_NAME (EAP username).
  4. Flash the root certificate to the ATWINC. For more details, see Generating Certificates using openssl. Ensure that the firmware and the host driver are both version v19.6.1 or above.
  5. For Client authentication, download the Client private key (winc_client_private.key) and Client certificate (winc_client_private.crt) to the ATWINC. For this, decode the certificate and key files using script key_decoder.py and load the files through the example code.
    • The decoder script is located at src\script\key_decoder.py. Rename the server certificate and key files to demo_rsa.crt and demo_rsa.key because the script assumes these file names are input.
    • Run key_decoder.py to generate the privateKey_decoded.txt file.
    • Replace the modulus, exponent and certificate arrays of main.h with the respective privateKey_decoded.txt arrays. Verify the length of the arrays.
  6. Configure the SSID by editing the macro MAIN_WLAN_SSID in the project.
  7. Configure and run the FreeRADIUS or hostapd server (see Configuring a Hostapd Server and Configuring a FreeRADIUS Server).
  8. Load the example project.
Note: The key_decoder.py Python® script requires the pycrypto package, which depends on Visual C++® 9. Therefore, install the Visual C++ 9 using the following steps:
  1. Go to the link aka.ms/vcpython27 and install the pycrypto package.
  2. Enter the pip install pycrypto command.