Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
WINC3400 Custom Serial Chat Application - SAM D21 Xplained Pro Documentation

Preface

This example demonstrates on how to implement Custom profile on WINC3400 with the SAM Xplained Pro Wi-Fi/BLE module.
It uses the following hardware:

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

Main Files

  • csc_app.c : Initialize the WINC3400 and runs custom serial chat profile

Usage

  1. As a first step, it is required that the user installs the Atmel Smart Connect application
  2. available in google play store on an Android device.
  3. Then, power up the SAM board programmed with custom serial chat application and run the
  4. Android application: select Bluetooth Smart and select start scan. In the Scan result, select AT-CSC.
  5. The android application will ask to enter the pin to pair with WINC3400. Enter the PIN 123456.
  6. Select Custom Serial Chat in service list.
  7. Build the program and download it into the board.
  8. 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
    *
  9. Start the application.
  10. In the terminal window, the following text should appear:
    * -- Custom Serial chat demo --
    * -- Compiled: May 2 2017 14:50:52 --
    *
    * (APP)(INFO)Chip ID 3400d1
    * (APP)(INFO)Curr driver ver: 1.0.6
    * (APP)(INFO)Curr driver HIF Level: (2) 1.1
    * (APP)(INFO)Fw HIF: 8101
    * (APP)(INFO)Firmware HIF (2) : 1.1
    * (APP)(INFO)Firmware ver : 1.1.4
    * (APP)(INFO)Firmware Build Apr 11 2017 Time 13:32:08
    * (APP)(INFO)Ota HIF: 0000
    * (APP)(INFO)No valid Ota image
    * (APP)(INFO)OTP MAC
    * (APP)(INFO)MAC Address: F8:F0:05:F2:52:30
    * (APP)(INFO)M2M_NO_PS
    * (APP)(INFO)POWER SAVE 0
    *
    * Initializing Custom Serial Chat Application
    * BLE is initializing
    *
    * Device Name: ATMEL-CSC
    *
    * Device Started Advertisement
    * Connected to peer device with address 4f:01:d5:b7:b8:33
    *
    * Remote device request pairing
    * Sending pairing response
    * please enter the following pass-code on the other device:123456
    * Pairing procedure completed successfully
    * Rx: Message from android
    * TX:Message from WINC3400
    *

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.