SPNA248 March   2021 TM4C1292NCPDT , TM4C1292NCPDT , TM4C1292NCZAD , TM4C1292NCZAD , TM4C1294KCPDT , TM4C1294KCPDT , TM4C1294NCPDT , TM4C1294NCPDT , TM4C1294NCZAD , TM4C1294NCZAD , TM4C1299KCZAD , TM4C1299KCZAD , TM4C1299NCZAD , TM4C1299NCZAD , TM4C129DNCPDT , TM4C129DNCPDT , TM4C129DNCZAD , TM4C129DNCZAD , TM4C129EKCPDT , TM4C129EKCPDT , TM4C129ENCPDT , TM4C129ENCPDT , TM4C129ENCZAD , TM4C129ENCZAD , TM4C129LNCZAD , TM4C129LNCZAD , TM4C129XKCZAD , TM4C129XKCZAD , TM4C129XNCZAD , TM4C129XNCZAD

 

  1.   Trademarks
  2. Introduction
    1. 1.1 License
    2. 1.2 IwIP Version
    3. 1.3 lwIP Customization
    4. 1.4 IwIP API
      1. 1.4.1 TCP RAW APIs
      2. 1.4.2 UDP RAW APIs
    5. 1.5 lwIP Development Home Page and Support
  3. Application Examples
  4. Application Setup
    1. 3.1 Hardware Setup
    2. 3.2 Software Tools
  5. Download and Import the Ethernet examples
  6. Enet_tcpecho_server_lwip Example Overview
    1. 5.1 Build and Flash the Program
    2. 5.2 Check and Program the MAC Address
      1. 5.2.1 Using The LM Flash Programmer
      2. 5.2.2 Using the CCS
      3. 5.2.3 Using Uniflash
    3. 5.3 Configure the Terminal Window
    4. 5.4 Run the enet_tcpecho_server_lwip Example
  7. Enet_tcpecho_server_static_ip_lwip Example Overview
    1. 6.1 How to Configure lwIP for Static Address
    2. 6.2 Run the enet_tcpecho_server_static_ip_lwip Example
  8. Enet_udpecho_server_lwip Example Overview
    1. 7.1 Run the enet_udpecho_server_lwip Example
  9. Enet_dns_lwip Example Overview
    1. 8.1 How to Configure lwIP for DNS
    2. 8.2 How to View the DNS Traffic on Wireshark
    3. 8.3 Run the enet_dns_lwip Example
  10. Enet_sntp_lwip Example Overview
    1. 9.1 Run the enet_sntp_lwip Example
  11. 10Enet_tcpecho_client_lwip Example Overview
    1. 10.1 Configure the Server IP Address
    2. 10.2 Configure the SocketTest Server and Run the enet_tcpecho_client_lwip Example
    3. 10.3 Wireshark Capture for enet_tcpecho_client_lwip Example
  12. 11Enet_adcsensor_client_lwip Example Overview
    1. 11.1 Run the adcsensor_client_lwip Example
  13. 12Enet_udpecho_client_lwip Example Overview
    1. 12.1 Run the enet_udpecho_client_lwip Example
  14. 13References

Configure the SocketTest Server and Run the enet_tcpecho_client_lwip Example

Since this is a client application, the server must be setup first and be in a listening state before the client can connect to it.

Follow the steps shown in Figure 10-1 to setup the SocketTest server:

  1. Open the Server tab in SocketTest.
  2. Enter the server IP address as well as the port number. The IP address is the PC from which the SocketTest is running on. The IP and port number need to match the settings defined in the enet_tcpecho_client_lwip.c as shown in Section 10.1. Finally, press the “Start Listening” button. Wait for the greetings message conversation window once the client connects.
  3. After the client connects to the SocketTest server, it will send a “Hello World!\n\r” greetings message. The conversation field in box 3 of Figure 10-1 displays the “Hello World!” message from the client IP address 192.168.254.85 as soon as the server accepts the connection from the client.
  4. Go to the Message field in the SocketTest shown in box 4 and type some message. Whatever message is entered is echoed by the client prepended with a “Client:” heading. In this example, the message entered is “This is a tcp echo example\n\r” with a total length of 28 characters.

If you go back to the terminal window, it also indicates the same number of characters it receives from the remote host.

GUID-20210301-CA0I-NV6W-5L2M-KP46TQN2MGFF-low.png Figure 10-1 SocketTest Server Configuration for Enet_tcpecho_client_lwip
GUID-20210301-CA0I-RTWQ-QRVN-BRVK43QTWWMB-low.png Figure 10-2 Enet_tcpecho_client_lwip Output