Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
WINC3400 Provisioning and Proximity Application - SAM D21 Xplained Pro Documentation

Introduction

This example demonstrates Wi-Fi provision via BLE using the WINC3400 Wi-Fi/BLE module and Proximity Profile
It uses the following hardware:

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

Main Files

  • pxp_reporter_app.c : Initialize the SAM board and perform BLE provisioning and then starts Proximity Profile

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. After Successful Wi-Fi connection, this application switch to BLE Proximity profile.
  10. Then run the Android application: perform a scan, select
  11. "MCHP-PXP" to get start with the Proximity service.
  12. The application show the Proximity features: Immediate alert, link loss and Tx power
  13. Build the program and download it into the board.
  14. 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
    *
  15. Start the application.
  16. In the terminal window, the following text should appear:
    * -- Wifi BLE Provisioning demo with Proximity 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)Provisioning Failed
    * (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)DHCP IP Address :: xxx.xxx.x.x ::
    * (APP)(INFO)WiFi Connected up to layer 3
    * (APP)(INFO)Provisioning Complete
    *
    * BLE is initializing
    *
    * Device Name: MCHP-PXP
    *
    * Initializing Battery Service Application
    * BLE Started Adv
    *
    * This is Proximity Reporter
    * Proximity Reporter provides these services:
    * -> Link Loss Service
    * -> Immediate Alert Service
    * -> Tx Power Service
    * BLE device is in Advertising Mode
    * Advertising Device Name: ATMEL-PXP
    *
    * Pathloss : Mild Alert(APP)(INFO)
    * Pathloss : Mild Alert(APP)(INFO)
    * Pathloss : High Alert(APP)(INFO)
    * Pathloss : Mild Alert(APP)(INFO)
    * Pathloss : High Alert(APP)(INFO)
    *

Compilation Information

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

Contact Information

For further information, visit Microchip.