AWS IoT Over-the-air Update v3.4.0
Client library for AWS IoT OTA
OTA MQTT Interface

The OTA PAL interface definition.

OTA MQTT Overview

The OTA MQTT interface is a set of APIs that must be implemented by a library to enable the OTA library to connect to AWS IoT and manage notification and request data. The OTA library uses MQTT PUBLISH messages to inform AWS IoT about the job status and receives notifications and datablock over job and stream topics.

The OTA MQTT interface is defined in ota_mqtt_interface.h.

The functions that must be implemented are:

These functions can be grouped into the structure OtaMqttInterface_t and passed to OtaInterfaces_t to represent the MQTT interface.

OtaMqttInterface_t mqttInterface;
mqttInterface.subscribe = mqttSubscribe;
mqttInterface.unsubscribe = mqttUnsubscribe;
mqttInterface.publish = mqttPublish;
....
OtaInterfaces_t otaInterfaces;
otaInterfaces.mqtt = mqttInterface
....
OTA_Init( &otaBuffer,
&otaInterfaces,
( CLIENT_IDENTIFIER ),
otaAppCallback )
OtaErr_t OTA_Init(const OtaAppBuffer_t *pOtaBuffer, const OtaInterfaces_t *pOtaInterfaces, const uint8_t *pThingName, OtaAppCallback_t OtaAppCallback)
OTA Agent initialization function.
Definition: ota.c:3236
OTA Interface for referencing different components.
Definition: ota.h:302
OtaMqttInterface_t mqtt
MQTT interface that references the publish subscribe methods and callbacks.
Definition: ota.h:304
OTA Event Interface structure.
Definition: ota_mqtt_interface.h:164
OtaMqttPublish_t publish
Interface for publishing MQTT messages.
Definition: ota_mqtt_interface.h:167
OtaMqttSubscribe_t subscribe
Interface for subscribing to Mqtt topics.
Definition: ota_mqtt_interface.h:165
OtaMqttUnsubscribe_t unsubscribe
interface for unsubscribing to MQTT topics.
Definition: ota_mqtt_interface.h:166