Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
WINC3400 Provision AP with BLE Example - SAMD21 XPlained Pro Documentation

Introduction

This example demonstrates how to provision Wi-Fi via BLE using the WINC3400 Wi-Fi/BLE module.
It uses the following hardware:

  • SAM Xplained Pro.
  • the WIN3400 module on EXT1.
  • thirdparty Android device.

Main Files

  • main21.c : Initialize the SAM board and perform BLE provisioning.

Usage

  1. To connect the SAM board to the internet Access Point over Wi-Fi, the user must
  2. provide credentials (SSID and passphrase) over BLE. As a first step, it is required
  3. that the user install the Microchip Bluetooth Data application available available in the Android
  4. play store on to an any Android device.
  5. Then, power up the SAM board and run the Android application: perform a scan, select
  6. an SSID and enter the passphrase.
  7. Finally, press connect and enter the PIN code "123456".
  8. If connection to AP is successful, WINC3400 BLE will start beaconing.
  9. Build the program and download it into the board.
  10. 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
    *
  11. Start the application.
  12. In the terminal window, the following text should appear:
    * -- WINC3400 Provision AP with BLE example --
    * -- SAMXXX_XPLAINED_PRO --
    * -- Compiled: xxx x 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: xxxx
    * (APP)(INFO)OTP MAC
    * (APP)(INFO)MAC Address: xx:xx:xx:xx:xx:xx
    * (APP)(INFO)M2M_NO_PS
    * (APP)(INFO)POWER SAVE 0
    * (APP)(INFO)Reset provision data
    * (APP)(INFO)BLE provisioning started
    * (APP)(INFO)Provisioned AP:
    * (APP)(INFO)Sec type : 2
    * (APP)(INFO)SSID : XXX
    * (APP)(INFO)Passphrase : XXXXXX
    * (APP)(INFO)Provisioning data received
    * (APP)(INFO)Retrieving ssid...
    * (APP)(INFO) have valid ssid
    * (APP)(INFO)WiFi Connect: using provisioned AP
    * (APP)(INFO)Wifi State :: CONNECTED ::
    * (APP)(INFO)Retrieving ssid...
    * (APP)(INFO) have valid ssidConnecting to XXX .
    * Wifi State :: CONNECTED ::
    * DHCP IP Address :: xxx.xxx.x.x ::
    * WiFi Connected
    * Provisioning Completed
    *
    * \section compinfo Compilation Information
    * This software was written for the GNU GCC compiler using Atmel Studio 7.0
    * Other compilers are not guaranteed to work.
    *
    * \section contactinfo Contact Information
    * For further information, visit
    * <A href="http://www.microchip.com">Microchip</A>.\n
    *