# EXCLUSIVE? =\> LwIP + FreeRTOS vs FreeRTOS Plus

**URL:** <https://forums.freertos.org/t/exclusive-lwip-freertos-vs-freertos-plus/18978>\
**Category:** Libraries\
**Created:** [January 19, 2024, 9:18am UTC](https://forums.freertos.org/t/exclusive-lwip-freertos-vs-freertos-plus/18978 "2024-01-19T09:18:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![HispaEmo](https://avatars.discourse-cdn.com/v4/letter/h/d2c977/32.png) [@HispaEmo](https://forums.freertos.org/u/HispaEmo)\
**Post date:** [January 19, 2024, 9:18am UTC](https://forums.freertos.org/t/exclusive-lwip-freertos-vs-freertos-plus/18978/1 "2024-01-19T09:18:11Z")

</div>

Hi,

At the risk of asking an obvious question, when it comes to implementing LwIP + FreeRTOS vs FreeRTOS Plus TCP, are these mutually exclusive?

In other words, can I use both at the same time?

Besides the information available at

> [@FreeRTOS Plus TCP vs FreeRTOS + lwip](https://forums.freertos.org/t/freertos-plus-tcp-vs-freertos-lwip/16910):
>
> Hello! Can anybody explain the difference between FreeRTOS Plus TCP and from linking FreeRTOS and lwip?, please The question caused of necessity to realize TCP based on FreeRTOS And I do not know which way to choose(as it at first time)

What would be the better option for a project that is in its embryonic phase?

Thank you very much.

---

<div class="post-metadata">

**Author:** ![RAc](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rac/32/1389_2.png) [@RAc](https://forums.freertos.org/u/RAc)\
**Post date:** [January 19, 2024, 9:40am UTC](https://forums.freertos.org/t/exclusive-lwip-freertos-vs-freertos-plus/18978/2 "2024-01-19T09:40:57Z")

</div>

well, for once, unless you service two ethernet controllers separately from different network stacks (which also clashes with the idea of multiple end points serviced from the same stack), you would need to find a way to arbitrate your ethernet hardware between the stacks.

---

<div class="post-metadata">

**Author:** ![NikhilKamath](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/nikhilkamath/32/2934_2.png) [@NikhilKamath](https://forums.freertos.org/u/NikhilKamath)\
**Post date:** [January 19, 2024, 10:23am UTC](https://forums.freertos.org/t/exclusive-lwip-freertos-vs-freertos-plus/18978/3 "2024-01-19T10:23:26Z")

</div>

Agree with RAc’s post above.

I might be repeating [https://forums.freertos.org/t/freertos-plus-tcp-vs-freertos-lwip/16910:](https://forums.freertos.org/t/freertos-plus-tcp-vs-freertos-lwip/16910:)  
FreeRTOS-Plus-TCP is built for FreeRTOS, meaning seamless integration with tasks, queues, and other FreeRTOS features. You won’t need additional layers or complex configuration, simplifying your development process. It is fully thread/task-safe, eliminating potential issues with concurrent access to resources. This makes it ideal for applications with multiple tasks and complex network interactions.

In addition to the above, FreeRTOS-Plus-TCP is part of our LTS releases, providing long term stability and bug fixes. Hoping this helps you to make a choice?

Any reason you want to run both +TCP and Lwip together? Let us know if you are looking for any specific features or requirements you have to meet?

You can also try out our demos real quick on [windows](https://freertos.org/embeddedtcp.html) to get a feel for FreeRTOS-Plus-TCP.

---

<div class="post-metadata">

**Author:** ![HispaEmo](https://avatars.discourse-cdn.com/v4/letter/h/d2c977/32.png) [@HispaEmo](https://forums.freertos.org/u/HispaEmo)\
**Post date:** [January 19, 2024, 10:48am UTC](https://forums.freertos.org/t/exclusive-lwip-freertos-vs-freertos-plus/18978/4 "2024-01-19T10:48:11Z")

</div>

Thank you very much for your advice and guidance. The reason for the current project is:

Azure IoT Middleware for FreeRTOS

> **[GitHub - Azure/azure-iot-middleware-freertos: Azure IoT Middleware for FreeRTOS](https://github.com/Azure/azure-iot-middleware-freertos)**
>
> Azure IoT Middleware for FreeRTOS. Contribute to Azure/azure-iot-middleware-freertos development by creating an account on GitHub.

In the Library Architecture Image, we see that both can be used: FreeRTOS+TCP plus / LwIP.

It’s not that I want to run them together, but rather ensure which one would work better in this project, considering that the team is new to this topic. We need to choose the most suitable option for us.

I want to thank the community for this reception.

---

<div class="post-metadata">

**Author:** ![htibosch](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/htibosch/32/62_2.png) [@htibosch](https://forums.freertos.org/u/htibosch)\
**Post date:** [January 19, 2024, 3:19pm UTC](https://forums.freertos.org/t/exclusive-lwip-freertos-vs-freertos-plus/18978/5 "2024-01-19T15:19:45Z")

</div>

I also recommend checking what protocols you plan to use. FreeRTOS+TCP probably doesn’t provide all protocols that you need.

There is one thing that I like less about lwIP: their website says that if you want speed, you should not use the BSD (socket) interface, but rather a low-level interface called “netconn”. Find an explanation [here](https://lwip.fandom.com/wiki/Application_API_layers).

FreeRTOS+TCP only offers a socket interface which is always fast.

Using netconn leads to code that is hard to understand and difficult to translate to other platforms. I rather write BSD-compatible code that can be compiled on multiple platforms.

Btw. I do run FreeRTOS+TCP and lwIP simultaneously on a Zynq. I give them both their own IP and MAC-address. I use it to compare both stacks.  
The lwIP network interface will call functions in FreeRTOS+TCP’s networkInterface.c

Wish you good luck with your project. Please ask if you have new questions.
