ESP-MQTT with custom tx and rx

GreenGiant
Posts: 28
Joined: Tue Sep 10, 2019 7:22 am

ESP-MQTT with custom tx and rx

Postby GreenGiant » Fri Aug 20, 2021 9:58 am

Is it possible to use the ESP-MQTT library but override the default low level send and receive functions? Using IDF v3.3 release.

For example,
I have an ESP32 WROOM connected to a cellular modem which is connected over UART using AT commands. On the modem I have setup a TLS/SSL connection to AWS-IoT and provides me with a socket. I just need to send the raw MQTT data appended to a specific AT command; be that CONNECT, PUBLISH, etc etc, as per the MQTT spec. It would be nice to use the MQTT library to do all the header construction and be able to provide it with a function to send data (i.e. the MQTT header(s) followed by payload, all constructed by the library), and a callback or a task for received data.

Who is online

Users browsing this forum: atx823, brushlow18 and 241 guests