Eaxmple project for using MQTT and FreeRTOS+TCP on STM32H573

Hi,

Could you please provide any example project using core mqtt + freeRTOS+tcp on STM32H573.

Thanks.

@rchilakalapudi

Here is an unofficial demo for STM32H563ZI NUCLEO board that integrated FreeRTOS+TCP: GitHub - tony-josi-aws/STM32H563ZI_FreeRTOS_TCP_CLI

You can take a look at these simulated MQTT demos to integrate it with the above demo: coreMQTT Demo (without TLS) - FreeRTOS™

Hi Tony - Josi,
Thanks for quick reply. I have question related tls part. is freertis+tcp can support TLS? if there please provide the example project.

Thanks.

@rchilakalapudi

is freertis+tcp can support TLS? if there please provide the example project.

yes, we have a simulated demo that uses coreMQTT with TLS (demo uses mbedTLS for TLS part) on top of FreeRTOS+TCP here: coreMQTT Demo (with TLS Server Authentication) - FreeRTOS™

Hi tony-josi-aws,

Thank you for your prompt response. I have one more question related to the TCP component: Is it feasible to use only the TCP library in the future if we want to switch to another RTOS? Please provide more details about this, and let me know if there is any documentation available.

Thanks.

Hi @rchilakalapudi

Is it feasible to use only the TCP library in the future if we want to switch to another RTOS?

FreeRTOS+TCP is designed with FreeRTOS as the supporting RTOS in mind. The task synchronization, memory management, signaling, data types, etc. are tightly coupled with the FreeRTOS “way” of doing it. It could be possible to update it to run on other RTOSes, but it won’t be very straightforward as just mapping APIs.

Hi @tony-josi-aws

Thanks for your reply

your comment:
It could be possible to update it to run on other RTOSes, but it won’t be very straightforward as just mapping APIs.
Ravi: It means that for users it is very difficult to port to other RTOSes?

  1. “We are currently using FreeRTOS in our products and are interested in the FreeRTOS+TCP integration. However, we need a more detailed comparison between lwIP and FreeRTOS+TCP, focusing on their advantages and disadvantages.”
  2. expecting comparison between RAM,ROM utilization, speed, application interfaces, network interface, performance etc…
  3. “I have seen the zero-copy buffer concept, but it seems more applicable to UDP than TCP. Does it support TCP as well? If so, please provide more details or documentation about this.”

@rchilakalapudi

  1. “We are currently using FreeRTOS in our products and are interested in the FreeRTOS+TCP integration. However, we need a more detailed comparison between lwIP and FreeRTOS+TCP, focusing on their advantages and disadvantages.” 2. expecting comparison between RAM,ROM utilization, speed, application interfaces, network interface, performance etc…

You can refer to these existing threads for comparison:

  1. Thread 1
  2. Thread 2
  3. Thread 3
  1. “I have seen the zero-copy buffer concept, but it seems more applicable to UDP than TCP. Does it support TCP as well? If so, please provide more details or documentation about this.”

TCP also offers zero copy. As UDP is a packet-oriented protocol with zero copy, you get to write/read directly to the network packet that is transmitted over the network, whereas in the case of TCP with zero copy, you are directly writing/reading from the TCP stream buffers as its a stream-oriented protocol. You can refer to these pages for documentation:

Also, you can find a TCP zero copy demo here [if USE_TCP_ZERO_COPY is enabled] that optionally uses zero copy.