UDP Echo

Table of Contents

Example Summary

This application demonstrates how to echo UDP packets.

Resources & Jumper Settings

Please refer to the development board’s Hardware User’s Guide.

Python 3.X is required for this example. To install python download the latest version at https://www.python.org/downloads/release

Example Usage

The connection should have the following connection settings:

    Baud-rate:     115200
    Data bits:          8
    Stop bits:          1
    Parity:          None
    Flow Control:    None

For secured AP use:

#define SSID_NAME                             "DemoAP"                  /* AP SSID */
#define SECURITY_TYPE                         SL_WLAN_SEC_TYPE_WPA_WPA2
#define SECURITY_KEY                          "12345678"                /* Password of the secured AP */

For unsecured AP use:

#define SSID_NAME                             "DemoAP"                  /* AP SSID */
#define SECURITY_TYPE                         SL_WLAN_SEC_TYPE_OPEN
#define SECURITY_KEY                          ""

Usage:

python udpSendReceive.py <IP-addr> <port> <id> -l[length] -s[sleep in mS] -n[number of transmits per report]

  <IP-addr>     is the IP address of the device
  <port>        is the TCP port being listened to (1000)
  <id>          is a unique id for the executable. Printed out with a packet transmission report.
                It allows the user to run multiple instances of udpSendReceive.


  Optional:
    -l[length]      size of the packet in bytes. Default is 256 bytes. Note: When specifying a length greater than 256 bytes, must increase the buffer size in the target side app (udpEcho.c) accordingly.
    -s[sleep in mS] usleep time to between sends. Default is 0 mSecs.
    -n[number of transmits per report] the number of transmits to occur before being reported onto the console. Default is 100 transmits.

Example: python udpSendReceive.py 192.168.1.100 1000 1 -s100

Application Design Details

References

For further information please refer to the user programmers guide: CC3X20 Programmer’s Guide