Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
WINC3400 Wi-Fi Ble provisioning Example - SAMD21 XPlained Pro Documentation

Introduction

This example demonstrates the use of the WINC3400 with the SAM Xplained Pro board to behave as a station, connect to AP using ble provisioning.
It uses the following hardware:

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

Main Files

  • main.c : Initialize the WINC3400 and connect to AP in station mode using ble provisioning.

Usage

  1. Configure below code in the config main.h for AP information to be connected.
    * #define MAIN_WLAN_SSID "DEMO_AP"
    * #define MAIN_WLAN_AUTH M2M_WIFI_SEC_WPA_PSK
    * #define MAIN_WLAN_PSK "12345678"
    *
  2. Build the program and download it into the board.
  3. 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
    *
  4. Start the application.
  5. In the terminal window, the following text should appear:
    * -- WiFi BLE Provisioning Profile demo --
    * -- SAMXXX_XPLAINED_PRO --
    * -- Compiled: xxx xx xxxx xx:xx:xx --
    * (APP)(INFO)Chip ID 3400d2
    * (APP)(INFO)Curr driver ver: x.x.x
    * (APP)(INFO)Curr driver HIF Level: (2) x.x
    * (APP)(INFO)Fw HIF: 8104
    * (APP)(INFO)Firmware HIF (2) : x.x
    * (APP)(INFO)Firmware ver : x.x.x
    * (APP)(INFO)Firmware Build <Month> DD YYYY Time xx:xx:xx
    * (APP)(INFO)Ota HIF: 0000
    * (APP)(INFO)No valid Ota image
    * (APP)(INFO)OTP MAC
    * (APP)(INFO)MAC Address: xx:xx:xx:xx:xx:xx
    *
    * BLE is initializing
    *
    * Device Name: MCHP_BLE
    *
    * This is WiFi Provisioning.
    * BLE device is in Advertising Mode
    * Advertising Device Name: 3400-DEMO
    * Number of APs found: xx
    *
    * Connected to peer device with address xx:xx:xx:xx:xx:xx
    *
    * BLE Connected.
    * *******************************************
    * Receive complete.
    * SSID: xxxx
    * SSID LENGTH: xxxx
    * PASS: xxxx
    * PASS LENGTH: xxxx
    * SECU: xxxx
    * *******************************************
    * (APP)(INFO)Provisioning data received
    * (APP)(INFO)WiFi Connect: using provisioned AP
    * WiFi state_CONNECTING.
    * (APP)(INFO)Wifi State :: CONNECTED ::
    * WiFi state_SUCCESS.
    * (APP)(INFO)DHCP IP Address :: xxx.xxx.xxx.xxx ::
    *
    * BLE Disconnected.
    *
    * Provisioning Complete.
    *

Compilation Information

This software was written for the GNU GCC compiler using Atmel Studio 6.2 Other compilers are not guaranteed to work.

Contact Information

For further information, visit Microchip.