I have managed to get the cellular demo working with coreMQTT, however I am now looking to move over to using the MQTT agent. When I run the MQTT agent it connects successfully to AWS but I am the callbacks to process are not triggered, Would anyone be able to explain the best way of integrating the cellular interface with the MQTT agent ?
There is an example called MQTT_Multitask where you can see how they integrate together the MQTT agent with the MQTT_Core.
(FreeRTOS-Plus\Demo\coreMQTT_Windows_Simulator\MQTT_Multitask)
The example starts the MQTT_Agent in mqtt-agent-tasks.c where it initialises the message interface, the pool and the TLS transport layer. If you managed to get the MQTT_Core to work you already have those functions for the transport layer in place.
Apart of the MQTT_Core and MQTT_Agent, in the example you can find the subscription-manager, this is an extra piece of code that allows you to link different callbacks with different topics.
Also be careful with the MQTT_Agent callbacks. The agent runs under its own task and if you try to send a message to the Agent directly from it’s own callback isn’t going to work.
Hope that makes sense.