ESP-MQTT with custom tx and rx
Posted: 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.
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.