- Newest
- Most votes
- Most comments
Hi hans. The OTA library has several dependencies that need to be satisfied to port it: https://freertos.org/Documentation/api-ref/ota-for-aws-iot-embedded-sdk/docs/doxygen/output/html/index.html#ota_dependencies
This is the MQTT interface: https://freertos.org/Documentation/api-ref/ota-for-aws-iot-embedded-sdk/docs/doxygen/output/html/ota_mqtt_interface.html
So instead of using coreMQTT, you could develop your own MQTT implementation around the Quectel, so long as it offers a matching interface.
You can find an OTA demo here: https://github.com/aws/aws-iot-device-sdk-embedded-C/tree/main/demos/ota/ota_demo_core_mqtt. And an example of the setup of the interface here:
- https://github.com/aws/aws-iot-device-sdk-embedded-C/blob/main/demos/ota/ota_demo_core_mqtt/ota_demo_core_mqtt.c#L1507-L1521
- https://github.com/aws/aws-iot-device-sdk-embedded-C/blob/main/demos/ota/ota_demo_core_mqtt/ota_demo_core_mqtt.c#L1435-L1462
That all said, and without knowing the details of which Quectel modem you're using, I'm wondering if this is the best way forward? A lot of work has already been done with the Quectel BG96 to abstract at the TCP level rather than MQTT:
Relevant content
- asked 2 years ago
- Accepted Answerasked 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 years ago
Hi Greg, thanks for this to start with! To add some clarity, we are using a BG95 and have an implementation around MQTT using the device's PPP mode. We had some stability issues and started looking at the modem's capabilities and discovered we could offload the mqtt and encryption onto the modem to save ourselves some overhead. At the base level we can now call "publish" and provide a topic and message and the onboard software handles the rest. We have equivalent functionality in subscribing but have realized that we still want to leverage AWS OTA across MQTT. What functions should I override?
Please refer to the MQTT interface: https://freertos.org/Documentation/api-ref/ota-for-aws-iot-embedded-sdk/docs/doxygen/output/html/ota_mqtt_interface.html. You need to provide a publish, subscribe and unsubscribe that matches that interface.
Okay that seems simple enough, is there an interface for giving the OTA Agent the incoming subscription data?
Hi hans. Please take a close look at the demo I shared. There is some glue between the OTA MQTT interface and the coreMQTT API that setups up the subscription callbacks:
If I've answered all your questions, do please consider to accept my answer so I get the precious points. :-)