# How to validate FreeRTOS Plus TCP echo Posix Server Application

**URL:** <https://forums.freertos.org/t/how-to-validate-freertos-plus-tcp-echo-posix-server-application/23311>\
**Category:** Libraries\
**Created:** [June 25, 2025, 9:37am UTC](https://forums.freertos.org/t/how-to-validate-freertos-plus-tcp-echo-posix-server-application/23311 "2025-06-25T09:37:47Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![PA\_adas](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/pa_adas/32/5716_2.png) [@PA\_adas](https://forums.freertos.org/u/PA_adas)\
**Post date:** [June 25, 2025, 9:37am UTC](https://forums.freertos.org/t/how-to-validate-freertos-plus-tcp-echo-posix-server-application/23311/1 "2025-06-25T09:37:47Z")

</div>

I am using the SimpleTCPEchoServer.c present in FreeRTOS\_Plus\_TCP\_Echo\_Posix, made below modifications to make the application work as server :  
a) Initialize the network same as done for client by calling prvMiscInitialisation() & FreeRTOS\_IPInit(ucIPAddress, ucNetMask, ucGatewayAddress, ucDNSServerAddress, ucMACAddress);  
b) Start the scheduler  
c) In main.c invoke vStartSimpleTCPServerTasks( mainECHO\_SERVER\_TASK\_STACK\_SIZE, mainECHO\_SERVER\_TASK\_PRIORITY ); from void vApplicationDaemonTaskStartupHook( void )  
d) In SimpleTCPEchoServer.c changed the line xBindAddress.sin\_port = FreeRTOS\_htons( xBindAddress.sin\_port ); to xBindAddress.sin\_port = FreeRTOS\_htons(9292); as I want to listen on port 9292 because previously it showed Socket 7 → **[0.0.0.0]:0** State eCLOSED-\>eTCP\_LISTEN. Also adding prints after FreeRTOS\_listen( xListeningSocket, xBacklog ); it shows Listening on 0.0.0.0:19492.  
What does [0.0.0.0]:0 or [0.0.0.0]:19492 mean does it create any internal port for binding purpose?  
e) ipconfigUSE\_DHCP as 0 as it is server do did not want to enable DHCP server.

with above changes when execute the application I see below prints :  
Trace started.  
The trace will be dumped to disk if a call to configASSERT() fails.

The trace will be dumped to disk if Enter is hit.  
Seed for randomiser: 1750842071  
Random numbers: 00001481 00002DEF 000069EE 00003FF9  
FreeRTOS\_IPInit  
FreeRTOS\_AddEndPoint: MAC: 44-41 IPv4: a00020fip

prvIPTask started  
FreeRTOS\_bind: requested port 9292 and assigned port is 9292  
Socket 9292 → [0.0.0.0]:0 State eCLOSED-\>eTCP\_LISTEN  
Listening on 0.0.0.0:19492  
xNetworkInterfaceOutput: 0x55d86b61be80:0x7f101001b70e

I tried to also execute a client application on same system but it is not able to connect with the server. Can you please point is anything missing at server side or what shall be done to test between Server & Client.

---

<div class="post-metadata">

**Author:** ![tony-josi-aws](https://avatars.discourse-cdn.com/v4/letter/t/a6a055/32.png) [@tony-josi-aws](https://forums.freertos.org/u/tony-josi-aws)\
**Post date:** [June 26, 2025, 3:38am UTC](https://forums.freertos.org/t/how-to-validate-freertos-plus-tcp-echo-posix-server-application/23311/2 "2025-06-26T03:38:01Z")

</div>

@PA_adas

Though the SimpleTCPEchoServer.c file is present as part of the demo, the server tasks need to be started explicitly when the network is up.

You can take a look at the `vApplicationIPNetworkEventHook_Multi` in the FreeRTOS\_Plus\_TCP\_Minimal\_Windows\_Simulator demo [here](https://github.com/FreeRTOS/FreeRTOS/blob/V10.4.1/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/main.c#L243-L247) to see how it’s done. In the case of posix demo this function is present in the SimpleTCPEchoServer.c, so that function can be invoked from the `vApplicationIPNetworkEventHook_Multi` of posix demo. This is similar to how the TCP demo client task is started once the network is up in the posix demo. [[refer](https://github.com/FreeRTOS/FreeRTOS/blob/main/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Posix/main_networking.c#L227-L231)]

---

<div class="post-metadata">

**Author:** ![PA\_adas](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/pa_adas/32/5716_2.png) [@PA\_adas](https://forums.freertos.org/u/PA_adas)\
**Post date:** [June 26, 2025, 5:42am UTC](https://forums.freertos.org/t/how-to-validate-freertos-plus-tcp-echo-posix-server-application/23311/3 "2025-06-26T05:42:58Z")

</div>

@tony-josi-aws  
I am invoking the server tasks from main.c.  
Please find attached patch for the server tasks (Few of the prints added in SimpleTCPEchoServer.c, main.c are made for debug purpose) .  
[freertos\_tcp\_posix\_server.patch](https://forums.freertos.org/uploads/short-url/pr5lNGmInf4edK3G3qOfuL3ddqZ.patch) (11.9 KB)

At client side I just modified FreeRTOSConfig.h for configECHO\_SERVER\_ADDR as “192.168.1.111” , configIP\_ADDR0-ADDR as “192.168.1.111” & TCPEchoClient\_SingleTasks.c echoECHO\_PORT as 9292. Both Client and Server are running on same machine.

---

<div class="post-metadata">

**Author:** ![tony-josi-aws](https://avatars.discourse-cdn.com/v4/letter/t/a6a055/32.png) [@tony-josi-aws](https://forums.freertos.org/u/tony-josi-aws)\
**Post date:** [June 26, 2025, 4:31pm UTC](https://forums.freertos.org/t/how-to-validate-freertos-plus-tcp-echo-posix-server-application/23311/4 "2025-06-26T16:31:35Z")

</div>

@PA_adas

One thing to note is that the posix demo uses the FreeRTOS+TCP’s libslirp virtual network interface, and libslirp works by creating a NAT’d virtual network. This means the guest (posix demo) has a private IP address within a virtual network. The host (PC where you run the demo) acts as a router/NAT device, translating the guest’s private IP to the host’s public IP when communicating with the outside world. When you run the echo server demo, the client applications running outside of the NAT’d network won’t be able to reach the guest by default. Each separate instance of posix demo runs on its own virtual network even though the assigned address/libslirp DHCP provided address seems to be in the same subnet.

Although currently not present in the implementation, it should be possible to modify the libslirp network interface implementation to add port forwarding to the port at which the echo server is running (`slirp_add_hostfwd`), so that traffic arriving at a specific address and port on the host is forwarded to a specific address and port on the guest; by default, that is not implemented.

I have tested the concept with the following modifications:

- Libslirp port forwarding -  
[libslirp\_network\_interface.patch](https://forums.freertos.org/uploads/short-url/zGqCI8xPIEblbiwyyD87SKqnw5m.patch) (2.1 KB) This patch needs to be applied on the FreeRTOS+TCP submodule for the server demo application.
- TCP client can now connect to the host PC’s IP address and host forwarded port as the server’s IP and port. (Example patch to match the network interface modification patch -  
[tcp\_client.patch](https://forums.freertos.org/uploads/short-url/tBHiNzTcUgCeu1c6zcLZrNSdRuK.patch) (1.5 KB))

---

<div class="post-metadata">

**Author:** ![PA\_adas](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/pa_adas/32/5716_2.png) [@PA\_adas](https://forums.freertos.org/u/PA_adas)\
**Post date:** [June 27, 2025, 4:58am UTC](https://forums.freertos.org/t/how-to-validate-freertos-plus-tcp-echo-posix-server-application/23311/5 "2025-06-27T04:58:26Z")

</div>

@tony-josi-aws  
Thank you for your response. With the patch ( [libslirp\_network\_interface.patch](https://forums.freertos.org/uploads/short-url/zGqCI8xPIEblbiwyyD87SKqnw5m.patch)) provided I am able to connect Client with Server both running on same machine.  
At the server side we should be able to see the same text when we tried to connect posix\_demo\_client application with “sudo nc -l -p” or that needs to be implemented in SimpleTCPEchoServer.c? Attaching the server & client side logs for reference (client\_logs.zip, server\_logs.zip).  
[client\_logs.zip](https://forums.freertos.org/uploads/short-url/trSeqNwrs0ruImmomUvl448O6nU.zip) (1.7 KB)  
[server\_logs.zip](https://forums.freertos.org/uploads/short-url/xCNHL32dYpn9Dsxzz41I1PDwFyt.zip) (780 Bytes)

Also, I tried to print the data received after FreeRTOS\_recv but nothing gets printed. So I checked FreeRTOS\_accept and it seems it is stuck at accept.

---

<div class="post-metadata">

**Author:** ![tony-josi-aws](https://avatars.discourse-cdn.com/v4/letter/t/a6a055/32.png) [@tony-josi-aws](https://forums.freertos.org/u/tony-josi-aws)\
**Post date:** [June 30, 2025, 6:46am UTC](https://forums.freertos.org/t/how-to-validate-freertos-plus-tcp-echo-posix-server-application/23311/6 "2025-06-30T06:46:22Z")

</div>

> [@PA\_adas](#):
>
> At the server side we should be able to see the same text when we tried to connect posix\_demo\_client application with “sudo nc -l -p” or that needs to be implemented in SimpleTCPEchoServer.c?

Yes, currently the default implementation doesn’t log the received contents in the server implementation. You can use a thread-safe logging call in the `prvServerConnectionInstance` function, probably after the `lBytes = FreeRTOS_recv( xConnectedSocket, pucRxBuffer, ipconfigTCP_MSS, 0 );` line, logging the contents of `pucRxBuffer`.

In the `prvEchoClientTask`, `lMaxLoopCount` is set as 1, so there will be only one iteration of sending and receiving data per each client connection.

If its still not working share how you have added logging inside the `prvServerConnectionInstance`

---

<div class="post-metadata">

**Author:** ![PA\_adas](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/pa_adas/32/5716_2.png) [@PA\_adas](https://forums.freertos.org/u/PA_adas)\
**Post date:** [June 30, 2025, 7:09am UTC](https://forums.freertos.org/t/how-to-validate-freertos-plus-tcp-echo-posix-server-application/23311/7 "2025-06-30T07:09:05Z")

</div>

@tony-josi-aws It was observed that the server application used to get stuck at xConnectedSocket = FreeRTOS\_accept( xListeningSocket, &xClient, &xSize );. So, I changed the static const TickType\_t xReceiveTimeOut = portMAX\_DELAY; to static const TickType\_t xReceiveTimeOut = pdMS\_TO\_TICKS(4000); and then was able to see the debug prints kept in prvServerConnectionInstance. But I still see prints “Received 4294967274 bytes” at server side even though the client application sends data in some specific bytes. So, I believe the issue of application stuck at accept got resolved due to the timeout factor but still the server is not receiving the data correctly from client. Please correct me if my changes are wrong. Sharing the patch of SimpleTCPEchoServer.c and the logs for server. I also created a tap interface to connect between client and server on same machine but the issue still persists of successful connection. Also, is there any more configuration to be done at any side (ex: FreeRTOSConfig.h etc)?  
[echo\_server\_logs\_custom\_changes.zip](https://forums.freertos.org/uploads/short-url/2jvFrgaFdSS8MxBh0s1LhEeFGi3.zip) (870 Bytes)  
[echo\_server\_custom\_changes.patch](https://forums.freertos.org/uploads/short-url/naGUQWS7K7KuUs59wtvIeidn4ip.patch) (4.8 KB)

---

<div class="post-metadata">

**Author:** ![tony-josi-aws](https://avatars.discourse-cdn.com/v4/letter/t/a6a055/32.png) [@tony-josi-aws](https://forums.freertos.org/u/tony-josi-aws)\
**Post date:** [June 30, 2025, 8:32am UTC](https://forums.freertos.org/t/how-to-validate-freertos-plus-tcp-echo-posix-server-application/23311/8 "2025-06-30T08:32:22Z")

</div>

> [@PA\_adas](#):
>
> . But I still see prints “Received 4294967274 bytes” at the server side even though the client application sends data in some specific bytes.

I believe that’s because you are using the wrong format specifier with printf:

```auto
+ printf("==>>>>>>>>>>>>>>>RX LEN : %d\r\n", lBytes);
+ printf("==>>>>>>>>>>>>>>>RX DATA: %.*s\n", lBytes, pucRxBuffer);

```

the above logging prints the exact data sent by the client at the server side.

Logs and diffs for reference:  
[client\_log.zip](https://forums.freertos.org/uploads/short-url/2tgnRwbsEDJpm6Zsv6a8YrdrWbW.zip) (2.0 KB)  
[server\_log.zip](https://forums.freertos.org/uploads/short-url/x8fsMpjjHpHJ68us5UuMnaSFB6s.zip) (1.7 KB)  
[client\_logging.patch](https://forums.freertos.org/uploads/short-url/4bxnswHSLBjPesYAv5fhf4yv7Vp.patch) (1.5 KB)  
[server\_logging.patch](https://forums.freertos.org/uploads/short-url/ebUP2tIdPzaVXnfNVV2WEb1Psvt.patch) (1.1 KB)

Note - I set `ipconfigHAS_DEBUG_PRINTF` to zero to have the logs less verbose.

---

<div class="post-metadata">

**Author:** ![PA\_adas](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/pa_adas/32/5716_2.png) [@PA\_adas](https://forums.freertos.org/u/PA_adas)\
**Post date:** [June 30, 2025, 9:08am UTC](https://forums.freertos.org/t/how-to-validate-freertos-plus-tcp-echo-posix-server-application/23311/9 "2025-06-30T09:08:50Z")

</div>

@tony-josi-aws It seems I am still observing the connection issue between Client and Server. I tried the server\_logging.patch where I am using the port no as the one where the packets will be forwarded from 5050 → 50 based on the ( [libslirp\_network\_interface.patch](https://forums.freertos.org/uploads/short-url/zGqCI8xPIEblbiwyyD87SKqnw5m.patch)). Below changes are done for Server Application -  
a) Applied patch [libslirp\_network\_interface.patch](https://forums.freertos.org/uploads/short-url/zGqCI8xPIEblbiwyyD87SKqnw5m.patch))  
b) Modified xReceiveTimeOut in prvConnectionListeningTask() from portMAX\_DELAY to pdMS\_TO\_TICKS(4000) as it was observed that application was stuck in FreeRTOS\_accept(). Currently it is disabled to it is stuck at printf(“Before FreeRTOS\_accept\n”); as per my ([echo\_server\_custom\_changes.patch](https://forums.freertos.org/uploads/short-url/naGUQWS7K7KuUs59wtvIeidn4ip.patch)).  
c) Tried to use physical eno1 interface with IP assigned as 192.168.1.111. In Client FreeRTOSConfig.h configured the Server IP address & config IP address as 192.168.1.111, configNETWORK\_INTERFACE\_TO\_USE as the number allocated for eno1 and echoECHO\_PORT  
as 5050. At server side, FreeRTOSConfig.h is same as client one and FreeRTOSIPConfig.h has ipconfigIPv4\_BACKWARD\_COMPATIBLE = 1 & ipconfigUSE\_DHCP = 0.  
d) Created TAP interface and instead of using 192.168.1.111 and eno1 interface replaced as 192.168.42.1 as server IP address and 192.168.42.2 as Client IP address.

With these modifications still my server application is stuck at FreeRTOS\_accept and does not match the logs which you shared. Can you please explain your setup configuration? Is TAP interface required?

---

<div class="post-metadata">

**Author:** ![tony-josi-aws](https://avatars.discourse-cdn.com/v4/letter/t/a6a055/32.png) [@tony-josi-aws](https://forums.freertos.org/u/tony-josi-aws)\
**Post date:** [June 30, 2025, 10:09am UTC](https://forums.freertos.org/t/how-to-validate-freertos-plus-tcp-echo-posix-server-application/23311/10 "2025-06-30T10:09:16Z")

</div>

> [@PA\_adas](#):
>
> Is TAP interface required?

No, my setup is both server and client runs with DHCP enabled; server has the patch [libslirp\_network\_interface.patch](https://forums.freertos.org/uploads/short-url/zGqCI8xPIEblbiwyyD87SKqnw5m.patch), client is connecting to the host IP address (your PC’s IP address) and the forwarded port which is 5050 in the patch.

> [@PA\_adas](#):
>
> odified xReceiveTimeOut in prvConnectionListeningTask() from portMAX\_DELAY to pdMS\_TO\_TICKS(4000) as it was observed that application was stuck in FreeRTOS\_accept().

I don’t have this change. `FreeRTOS_accept` is supposed to block until there is an incoming TCP connection on the `xListeningSocket`, once it gets a connection, it again blocks for the next connection.

---

<div class="post-metadata">

**Author:** ![PA\_adas](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/pa_adas/32/5716_2.png) [@PA\_adas](https://forums.freertos.org/u/PA_adas)\
**Post date:** [June 30, 2025, 11:18am UTC](https://forums.freertos.org/t/how-to-validate-freertos-plus-tcp-echo-posix-server-application/23311/11 "2025-06-30T11:18:02Z")

</div>

@tony-josi-aws Understood, so you mean apart from the xReceiveTimeOut all changes are same in your setup also? Is it possible for you to share your FreeRTOSConfig.h for server and client?

---

<div class="post-metadata">

**Author:** ![tony-josi-aws](https://avatars.discourse-cdn.com/v4/letter/t/a6a055/32.png) [@tony-josi-aws](https://forums.freertos.org/u/tony-josi-aws)\
**Post date:** [June 30, 2025, 12:18pm UTC](https://forums.freertos.org/t/how-to-validate-freertos-plus-tcp-echo-posix-server-application/23311/12 "2025-06-30T12:18:11Z")

</div>

> [@PA\_adas](#):
>
> so you mean apart from the xReceiveTimeOut all changes are same in your setup also?

Yes

> [@PA\_adas](#):
>
> Is it possible for you to share your FreeRTOSConfig.h for server and client?

[FreeRTOSIPConfig\_client.h](https://forums.freertos.org/uploads/short-url/4KQPul3Fy0AjPW8sQAZF7rhUtGR.h) (17.1 KB)  
[FreeRTOSIPConfig\_server.h](https://forums.freertos.org/uploads/short-url/4KQPul3Fy0AjPW8sQAZF7rhUtGR.h) (17.1 KB)

---

<div class="post-metadata">

**Author:** ![PA\_adas](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/pa_adas/32/5716_2.png) [@PA\_adas](https://forums.freertos.org/u/PA_adas)\
**Post date:** [June 30, 2025, 12:26pm UTC](https://forums.freertos.org/t/how-to-validate-freertos-plus-tcp-echo-posix-server-application/23311/13 "2025-06-30T12:26:27Z")

</div>

> [@tony-josi-aws](#):
>
> No, my setup is both server and client runs with DHCP enabled; server has the patch [libslirp\_network\_interface.patch](https://forums.freertos.org/uploads/short-url/zGqCI8xPIEblbiwyyD87SKqnw5m.patch), client is connecting to the host IP address (your PC’s IP address) and the forwarded port which is 5050 in the patch.

@tony-josi-aws Based on this input I was able to validate the communication between Client and Server. My observation has been there is no role of FreeRTOSConfig.h at server side when making changes for port and IP directly in SimpleTCPEchoServer.c  
Thanks for your support.

---

<div class="post-metadata">

**Author:** ![tony-josi-aws](https://avatars.discourse-cdn.com/v4/letter/t/a6a055/32.png) [@tony-josi-aws](https://forums.freertos.org/u/tony-josi-aws)\
**Post date:** [July 1, 2025, 4:24am UTC](https://forums.freertos.org/t/how-to-validate-freertos-plus-tcp-echo-posix-server-application/23311/14 "2025-07-01T04:24:41Z")

</div>

Thanks for reporting back.

---

<div class="post-metadata">

**Author:** ![ironman](https://avatars.discourse-cdn.com/v4/letter/i/f9ae1b/32.png) [@ironman](https://forums.freertos.org/u/ironman)\
**Post date:** [July 1, 2025, 8:43am UTC](https://forums.freertos.org/t/how-to-validate-freertos-plus-tcp-echo-posix-server-application/23311/15 "2025-07-01T08:43:42Z")

</div>

Hi @tony-josi-aws

I am also attempting to address the same issue, but my client connects to the server, and only IPARP\_Request messages are visible on the server side.

Would it be possible for you to share your complete patches or code workspace? Your assistance would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![tony-josi-aws](https://avatars.discourse-cdn.com/v4/letter/t/a6a055/32.png) [@tony-josi-aws](https://forums.freertos.org/u/tony-josi-aws)\
**Post date:** [July 1, 2025, 9:28am UTC](https://forums.freertos.org/t/how-to-validate-freertos-plus-tcp-echo-posix-server-application/23311/16 "2025-07-01T09:28:12Z")

</div>

If you already have your client connecting, patches I shared in this [post](https://forums.freertos.org/t/how-to-validate-freertos-plus-tcp-echo-posix-server-application/23311/8) should be enough to get the echo messages logged.

---

<div class="post-metadata">

**Author:** ![ironman](https://avatars.discourse-cdn.com/v4/letter/i/f9ae1b/32.png) [@ironman](https://forums.freertos.org/u/ironman)\
**Post date:** [July 1, 2025, 2:45pm UTC](https://forums.freertos.org/t/how-to-validate-freertos-plus-tcp-echo-posix-server-application/23311/17 "2025-07-01T14:45:28Z")

</div>

Thanks I recheck everything and applied your patches, Now I am able to Connect Sever-Client and log signals also,  
Server Side Logs-  
Trace started.  
The trace will be dumped to disk if a call to configASSERT() fails.

The trace will be dumped to disk if Enter is hit.  
Starting echo server demo  
Seed for randomiser: 1751380884  
Random numbers: 000046F0 00001985 00000AF9 00005835  
FreeRTOS\_IPInit  
FreeRTOS\_AddEndPoint: MAC: 44-41 IPv4: ac13c325ip  
vTaskStartScheduler  
vIPSetDHCP\_RATimerEnableState: Off  
prvCloseDHCPSocket[44-41]: closed, user count 0  
TCP port forwarding 0.0.0.0:5050 → 10.0.2.15:50 added successfully.  
vDHCPProcessEndPoint: enter 0  
DHCP-socket[44-41]: DHCP Socket Create  
prvCreateDHCPSocket[44-41]: open, user count 1  
prvInitialiseDHCP: start after 250 ticks  
vDHCP\_RATimerReload: 250  
vDHCPProcessEndPoint: exit 1  
vDHCPProcessEndPoint: enter 1  
vDHCPProcess: discover  
vDHCPProcessEndPoint: exit 2  
xNetworkInterfaceOutput: 0x5701df7a4640:0x7ceac001c31e  
vDHCPProcessEndPoint: enter 2  
vDHCPProcess: offer a00020fip for MAC address 44-41  
vDHCPProcess: reply a00020fip  
vDHCPProcessEndPoint: exit 3  
xNetworkInterfaceOutput: 0x5701df7a46a0:0x7ceac001c31e  
vDHCPProcessEndPoint: enter 3  
vDHCPProcess: offer a00020fip for MAC address 44-41  
vDHCPProcess: acked a00020fip

IP Address: 10.0.2.15  
Subnet Mask: 255.255.255.0  
Gateway Address: 10.0.2.2  
DNS Server Address: 10.0.2.3

prvCloseDHCPSocket[44-41]: closed, user count 0  
vDHCP\_RATimerReload: 43200000  
vDHCPProcessEndPoint: exit 5  
xNetworkInterfaceOutput: 0x5701df7a4760:0x7ceac001b7ae  
Socket 50 → [0.0.0.0]:0 State eCLOSED-\>eTCP\_LISTEN  
xNetworkInterfaceOutput: 0x5701df7a4820:0x7ceac001b7ae  
pxEasyFit: ARP a00020fip → a000202ip  
ipARP\_REPLY from a000202ip to a00020fip end-point a00020fip  
Gain: Socket 50 now has 1 / 20 child me: 0x7ceac001c5f0 parent: 0x7ceaa0000b90 peer: 0x7ceac001c5f0  
prvSocketSetMSS: 1460 bytes for a000202ip port 36064  
Socket 50 → [10.0.2.2]:36064 State eCLOSED-\>eSYN\_FIRST  
prvWinScaleFactor: uxRxWinSize 2 MSS 1460 Factor 0  
Socket 50 → [10.0.2.2]:36064 State eSYN\_FIRST-\>eSYN\_RECEIVED  
xNetworkInterfaceOutput: 0x5701df7a47c0:0x7ceaa8000b9e  
TCP: passive 50 =\> 2.2.0.10 port 36064 set ESTAB (scaling 0)  
Socket 50 → [10.0.2.2]:36064 State eSYN\_RECEIVED-\>eESTABLISHED  
prvAcceptWaitClient: client 0x7ceac001c5f0 parent 0x7ceaa0000b90  
xNetworkInterfaceOutput: 0x5701df7a4940:0x7ceaa8000b9e  
==\>\>\>\>\>\>\>\>\>\>\>\>\>\>\>RX LEN : 25  
==\>\>\>\>\>\>\>\>\>\>\>\>\>\>\>RX DATA: Hello from Ubuntu Client!  
xNetworkInterfaceOutput: 0x5701df7a49a0:0x7ceac00235ee  
Socket 50 → [10.0.2.2]:36064 State eESTABLISHED-\>eLAST\_ACK  
xNetworkInterfaceOutput: 0x5701df7a4a00:0x7ceaa8000b9e  
vTCPStateChange: Closing (Queued 0, Accept 0 Reuse 0)  
vTCPStateChange: me 0x7ceac001c5f0 parent 0x7ceac001c5f0 peer (nil) clear 0  
vTCPStateChange: xHasCleared = 0  
Socket 50 → [10.0.2.2]:36064 State eLAST\_ACK-\>eCLOSE\_WAIT

Client Side Logs -  
Connected to FreeRTOS server at 127.0.0.1:5050  
Message sent: Hello from Ubuntu Client!  
Echo received: Hello from Ubuntu Client!

---

<div class="post-metadata">

**Author:** ![tony-josi-aws](https://avatars.discourse-cdn.com/v4/letter/t/a6a055/32.png) [@tony-josi-aws](https://forums.freertos.org/u/tony-josi-aws)\
**Post date:** [July 3, 2025, 5:39am UTC](https://forums.freertos.org/t/how-to-validate-freertos-plus-tcp-echo-posix-server-application/23311/18 "2025-07-03T05:39:15Z")

</div>

Thanks for reporting back.
