I want to write and build 2 applications 1> server app build with freeRTOS and 2> client application build with ubuntu and communicate both the applications through TCP- IP and want to run this simulation on Ubuntu using posix port, I want receive and transmit the runtime data from both side.
Can anyone suggest me the steps if anyone tried this earlier?
Here is a TCP demo using FreeRTOS+TCP on posix port that can run on Ubuntu or any Linux: FreeRTOS/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Posix at main · FreeRTOS/FreeRTOS · GitHub
The demo application is written to act as a TCP echo client, but you can take a look at this file that implements a simple TCP echo server: FreeRTOS/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/DemoTasks/SimpleTCPEchoServer.c at main · FreeRTOS/FreeRTOS · GitHub
With very few modifications, if not none, you should be able to use this with the posix demo.
For the Ubuntu client, you can either use netcat or write a simple python script to connect to the TCP server.
1 Like