How does OTA agent work? How does it interface with OTA PAL? What is a file context?

0

I would like to know in more details, how OTA update works. Specifically, what is the role of OTA agent, and how does it initiate an update? What does it send to the device? What is a file context?

질문됨 2년 전294회 조회
1개 답변
3

Hi. If you didn't already find it, please review the OTA design documentation. This explains the software architecture in detail.

The AWS IoT OTA library is the at the centre of all this. It's a highly portable pure ANSI C library, free of any operating system dependencies. And it is the OTA agent implementation. It offers a public API consisting of only a handful of functions. You call these from your application firmware. An example implementation (on FreeRTOS) can be found here: https://github.com/aws/amazon-freertos/blob/main/demos/ota/ota_demo_core_mqtt/ota_demo_core_mqtt.c

The AWS IoT OTA mechanism is built on top of AWS IoT Core Jobs. OTA is a job with a special pre-defined job document. The AWS IoT OTA library processes incoming jobs, and specifically the OTA job document.

An OTA update is initiated on the cloud side from the console or from a CLI or SDK call of the relevant API. This creates a job with an OTA job document. The OTA agent on the device polls the job queue and sees when the job, with OTA job document, has been made available.

The OTA PAL (Platform Abstraction Layer) is a layer you need to develop (to match a pre-defined API) to port the OTA library to your device. It abstracts the storage of the new binary file in your device, amongst other things. You can find some reference implementations here:

Finally, the file context is just a data structure used by the OTA agent to remember the current state of its processing of a particular file. The OTA update contains one or more files (and very often just one file, being a single firmware binary image file).

profile pictureAWS
전문가
Greg_B
답변함 2년 전
profile picture
지원 엔지니어
검토됨 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠