Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
WINC3400 Iperf Example - SAMD21 XPlained Pro Documentation

Introduction

This example demonstrates the use of the WINC3400 with the SAMD21 Xplained Pro board to run Iperf server.
It uses the following hardware:

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

Main Files

  • main.c : Initialize the WINC3400 and run Iperf server.

Usage

  1. Configure the connection information in main.h.
    * #define MAIN_WLAN_SSID "DEMO_AP"
    * #define MAIN_WLAN_AUTH M2M_WIFI_SEC_WPA_PSK
    * #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)
    * #define MAIN_WIFI_M2M_REPORT_INTERVAL (1000)
    *
  2. Build the program and download it into the board.
  3. On the computer, open and configure a terminal application as 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:
    * -- WINC3400 IPERF server example --
    * -- Compiled: xxx xx xxxx xx:xx:xx --
    *
    *
    * (APP)(INFO)Chip ID 3400d2
    * (APP)(INFO)DriverVerInfo: xxxxxxxxx
    * (APP)(INFO)Firmware ver : xx.x.x Svnrev xxxxx
    * (APP)(INFO)Firmware Build xxx xx xxxx Time xx:xx:xx
    * (APP)(INFO)Firmware Min driver ver : xx.xx.x
    * (APP)(INFO)Driver ver: xx.x.x
    * (APP)(INFO)Driver built at xxx xx xxxx xx:xx:xx
    * iperf_wifi_cb: M2M_WIFI_REQ_DHCP_CONF: IP is xxx.xxx.xxx.xxx
    * (APP)(INFO)Socket 0 session ID = 1
    * (APP)(INFO)Socket 7 session ID = 2
    * (APP)(INFO)Socket 8 session ID = 3
    *
    * WINC is Server :
    *
    * ------------------------------------------------------------
    * Server listening on TCP/UDP port 5001
    * TCP window size: ??? KByte
    * ------------------------------------------------------------
    * [ 1] local xxx.xxx.x.x port 5001 connected with xxx.xxx.x.x port 53245
    * [ 1] 0- 0 sec xxx KBytes xxxx Kbits/sec
    * [ 1] 1- 1 sec xxx KBytes xxxx Kbits/sec
    * [ 1] 2- 3 sec xxx KBytes xxxx Kbits/sec
    * [ 1] 3- 3 sec xxx KBytes xxxx Kbits/sec
    * [ 1] 4- 4 sec xxx KBytes xxxx Kbits/sec
    * [ 1] 5- 5 sec xxx KBytes xxxx Kbits/sec
    * [ 1] 6- 6 sec xxx KBytes xxxx Kbits/sec
    * [ 1] 7- 7 sec xxx KBytes xxxx Kbits/sec
    * [ 1] 8- 8 sec xxx KBytes xxxx Kbits/sec
    * [ 1] 9- 9 sec xxx KBytes xxxx Kbits/sec
    * [ 1] Server Report:
    * [ 1] 0- 10 sec xxxx KBytes xxxx Kbits/sec
    *
    * WINC is Client :
    *
    * ------------------------------------------------------------
    * Client connecting to xxx.xxx.x.x, TCP port 5001
    * TCP window size: ??? KByte
    * ------------------------------------------------------------
    * [ 5] local xxx.xxx.x.x port 0 connected with xxx.xxx.x.x port 5001
    * [ 5] 0- 0 sec xxxx KBytes xxxxx Kbits/sec
    * [ 5] 1- 1 sec xxxx KBytes xxxxx Kbits/sec
    * [ 5] 2- 2 sec xxxx KBytes xxxxx Kbits/sec
    * [ 5] 3- 3 sec xxxx KBytes xxxxx Kbits/sec
    * [ 5] 4- 4 sec xxxx KBytes xxxxx Kbits/sec
    * [ 5] 5- 5 sec xxxx KBytes xxxxx Kbits/sec
    * [ 5] 6- 6 sec xxxx KBytes xxxxx Kbits/sec
    * [ 5] 7- 7 sec xxxx KBytes xxxxx Kbits/sec
    * [ 5] 8- 8 sec xxxx KBytes xxxxx Kbits/sec
    * [ 5] 9- 9 sec xxxx KBytes xxxxx Kbits/sec
    * [ 5] Client Report:
    * [ 5] 0- 10 sec xxxxx KBytes xxxxx Kbits/sec
    *
  6. Start the application on client using command.
  7. iperf -c <Server_IP_Address> -t <time_period> -i <time_interval> -r

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

Support and FAQ: visit Microchip Support