Kinetis SDK v.1.2 Demo Applications User's Guide  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
TCP Echo Demo on lwIP TCP/IP Stack

This demo application demonstrates the TCP Echo demo on lwIP TCP/IP stack with bare metal KSDK or different RTOSes.

Overview

This is a TCP echo demo on the lwIP TCP/IP stack with bare metal KSDK or different RTOSes, which uses the TCP protocol and acts as an echo server. The application on board sends back the TCP packets from the PC, which can be used to test whether the TCP connection is available.

Supported RTOS

Supported Hardware

These Freescale Freedom development platforms and Tower System modules are supported by the KSDK TCP Echo demo.

System Requirement

Hardware requirements

Toolchain requirements

Software requirements

Getting Started

See the lwIP TCPIP Stack and Kinetis SDK Integration User'’s Guide (document KSDKLWIPUG) for instructions and requirements.

Prepare the Demo

  1. Connect a USB cable between the PC host and the OpenSDA USB port on the board.
  2. Open a serial terminal with these settings:
    • 115200 baud rate
    • 8 data bits
    • No parity
    • One stop bit
    • No flow control
  3. Download the program to the target board.
  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

For detailed instructions, see a Kinetis SDK User's Guide for your board.

Network Configuration

Configure the IP address of PC network adapters as shown:

Run the demo

  1. Download the program to the target board.
  2. Connect the Ethernet cable between the PC and the board.
  3. When successfully connected, reset the board to run the demo.
  4. Open the command window on PC, type in "ping 192.168.2.102" to test whether the lwIP is running.
  5. If it is running, use an external echo tool to perform the echo request. This tool sends
    TCP packets to the board and checks whether the content sent back from board is the same.
    A similar tool named "echotool" can be downloaded
    from the: http://bansky.net/echotool/ [example: echotool 192.168.2.102 /p tcp /r 7 /d hello]
  6. If the operation is successful, all packets sent back are same as the packets sent to the board.