eclipse / paho.mqtt.embedded-c

Paho MQTT C client library for embedded systems. Paho is an Eclipse IoT project (https://iot.eclipse.org/)
https://eclipse.org/paho
Other
1.35k stars 750 forks source link

Is it work without Freertos? #166

Closed youfu88 closed 8 months ago

youfu88 commented 5 years ago

Dear: Is it work without Freertos? I really need your help. Thank you very much!

scaprile commented 5 years ago

I assume you want to know if the library and/or the client runs without an RTOS, on bare metal. I can answer for the library: yes, it is a set of functions generating and parsing MQTT messages without using "system" functions, with no dynamic memory allocation nor threading, and non-blocking equivalents when you have to wait. I've run it on bare metal on a Cortex-M3 (see the examples). As for the client... if you don't need a real full-fledged client, you can do just with the packet library as I did. If you do, well, wait for the next one to jump in, I haven't used it (yet?). The follow up question is what transport mechanism will you be using. I've run it over sockets in Linux (testing) and for real over bare metal UART (connected to a 3G module). You'll have to write the transport for your particular choice here.

youfu88 commented 5 years ago

Dear: Thanks your answer! I want to port this library to MTK's Feature phone platform(MT6261). This platform does not have FreeRtos. There are 3 platforms in the folder MQTTClient-C\src, Mainly to achieve mqttread, mqttwrite,connect? These implementations are based on library functions from other platforms.What should I do? And the library is support SSL? Thanks!

CIPop commented 1 year ago

There are 3 different options when using the library:

In all cases, your application is responsible with providing the network layer to the broker. If the broker requires TLS, your application is required to provide a TLS client (one is not provided in the library). There are many TLS client options, depending on your environment, that run either on the MCU (e.g. mbedTLS, WolfSSL, etc.) or on the modem.

icraggs commented 8 months ago

Answered.