FreeRTOS TCP server on Raspberry Pi

Hello,

I am new to FreeRTOS. I have some questions.

o: FreeRTOS is an operating system that can run on Raspberry Pi 4. Is that correct ?
o: Is it possible to implement TCP server on Raspberry Pi 4 provided FreeRTOS is running as operating system ?
o: Which software is recommended for Windows PC to run TCP client application ?
o: If the TCP client application is running in Python 3 on Windows PC, can we connect to the TCP server running on Raspberry Pi 4 having FreeRTOS operating system.

@thomas_ee

FreeRTOS is an operating system that can run on Raspberry Pi 4. Is that correct ?

There are few 3rd party projects that are discussed in the Raspberry Pi forum that aim to run FreeRTOS on Raspberry Pi 4, but I’m not sure how well they work. You can refer to a similar forum thread here.

Given that, the Raspberry Pi Pico boards (1 and 2) support FreeRTOS straight away. You can find the SMP and non-SMP demos here: FreeRTOS-Community-Supported-Demos/CORTEX_M0+_RP2040 at 272ca5bfbe0ea8a5e24a19a4a0e2bd4bf00b4066 · FreeRTOS/FreeRTOS-Community-Supported-Demos · GitHub

Is it possible to implement TCP server on Raspberry Pi 4 provided FreeRTOS is running as operating system ?

FreeRTOS+TCP stack can act as a TCP server, but to make it run on Raspberry Pi 4, you need a network interface implementation that interfaces the FreeRTOS+TCP stack with its ethernet or WiFi drivers.

Which software is recommended for Windows PC to run TCP client application ?

It depends on your application; for simple use cases, a Python script should be enough to connect with the server.

If the TCP client application is running in Python 3 on Windows PC, can we connect to the TCP server running on Raspberry Pi 4 having FreeRTOS operating system.

If you get the parts mentioned in the first 2 answers right, then yes.

Would you please share your reason/use-case of running FreeRTOS on Raspberry Pi?

Regarding the question on reason/use-case of running FreeRTOS on Raspberry PI is described below.

TCP server on Raspberry Pi 4 running FreeRTOS.
Is that possible to run/implement TCP server on Raspberry Pi 4 provided FreeRTOS running on it already ?

TCP client application on Python running in Windows PC.
Is that possible to create Python based client program running on standard Windows PC ? Someone has tried ?

How Python based TCP client program in Windows run with TCP server in Raspberry Pi 4 running FreeRTOS ?

Well yes, if you happen to have an RPi based on FreeRTOS AND FreeRTOS+TCP or another network stack running on the Pi, you can take any existing sample code for a TCP server, but that would normally be C or C++.

So you WANT a client on Windows coded in Python or you already HAVE one? What exactly is your question?

If you need guidance on coding TCP applications in Python under Windows, this here forum is probably not the best place to ask that question.

In Python, I already have implemented and run the Echo server example with multiple servers and one client. Both servers and client written in Python.

Not sure if FreeRTOS RPi servers also able to communicate with Python client or not. Someone has tired it already ?

Now looking for Echo server example in FreeRTOS that I can run on RPi 4.

The communication by definiton (ISO/OSI model) will never depend on what language your layer 4+ applications are written in, neither will the OS make any difference.

It is still unclear why you insist in using FreeRTOS on the RPi. Using native network communication under Paspbian, you will be able to communicate just fine with a functioning stack and compliant application software written in any language on any OS.

Agreed with RAc here. It is very possible to host a TCP server on a RPI 4 using FreeRTOS. The thing is that it may require more work than a simple TCP server application running on top of your RPI’s OS.

This is the most important thing @thomas_ee. If your goal is to run a TCP server or client, using Raspbian would be way more easier.

Alright æ. Thanks for your reply.

I understand that it is bit easier in Paspbian OS.

Is this the same as Raspberry Pi OS ?

I am wondering for which type of microcontroller or prosessors FreeRTOS TCP/IP is suitable. As I found TCP some documents or TCP/IP support for FreeRTOS.

yes. Raspberry Pi OS - Wikipedia

you need to distinguish between the controllers and the peripherals. FreeRTOS+TCP is an extension of FreeRTOS that supports networking. Thus, in order to get it to work on a particularPOD, there needs to be a driver for the network peripherals on a given POD.

For example, FreeRTOS itself (the core without the networking extensions) runs on any ARM Cortex M4 POD, but you can not run FreeRTOS+TCP on all of those without additional driver support (for some, there are ports, for others, there are not).

“In 2020, the Raspberry Pi Foundation renamed Raspbian to Raspberry Pi OS.”

Yes, I understand this.

Both FreeRTOS and Raspberry Pi OS are operating systems that can run on Raspberry Pi 4.

It is easier to use Raspberry Pi OS in order to implement TCP server on RPI.