Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
WINC3400 Simple Roaming UDP Client Example - SAM4S XPlained Pro Documentation

Introduction

This example demonstrates the use of the WINC3400 with the SAM Xplained Pro board to test continuous data transmission between UDP client and UDP server in roaming.
It uses the following hardware:

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

Main Files

  • main.c : Initialize the WINC3400 and test UDP client.

Usage

  1. Configure below code in the main.h for AP information to be connected.
    * #define MAIN_WLAN_SSID "DEMO_AP"
    * #define MAIN_WLAN_PSK "12345678"
    * #define MAIN_WIFI_M2M_PRODUCT_NAME "NMCTemp"
    * #define MAIN_WIFI_M2M_SERVER_IP 0xFFFFFFFF // "255.255.255.255"
    * #define MAIN_WIFI_M2M_SERVER_PORT (6666)
    *
  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. On the computer, run the udp_server.py script to start server.
  5. Start the application.
  6. In the terminal window, the following text should appear:
    * -- WINC3400 Simple Roaming UDP client example --
    * -- SAM_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
    * wifi_cb: M2M_WIFI_REQ_DHCP_CONF: IP is xxx.xxx.xxx.xxx
    * socket_cb: connect success!
    * Received - xxx xxx xx xx:xx:xx xxxx
    * Data sent from client -> server!
    * Received - xxx xxx xx xx:xx:xx xxxx
    * Data sent from client -> server!
    *
    *
    * Roamed to a new AP
    *
    *
    * Received - xxx xxx xx xx:xx:xx xxxx
    * Data sent from client -> server!
    * Received - xxx xxx xx xx:xx:xx xxxx
    * Data sent from client -> server!
    *

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.