OTA 에이전트 구현 - 에 대한 관리형 통합 AWS IoT Device Management

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

OTA 에이전트 구현

관리형 통합에서 작업 문서를 받으면 작업 문서를 처리하고, 업데이트를 다운로드하고, 설치 작업을 수행하는 자체 OTA 에이전트를 구현해야 합니다. OTA 에이전트는 다음 단계를 수행해야 합니다.

  1. 펌웨어 Amazon S3 URLs.

  2. HTTP를 통해 펌웨어 업데이트를 다운로드합니다.

  3. 디지털 서명을 확인합니다.

  4. 검증된 업데이트를 설치합니다.

  5. SUCCESS 또는 FAILED 상태로 iotmi\_JobsHandler\_updateJobStatus를 호출합니다.

디바이스가 OTA 작업을 성공적으로 완료하면 상태가 인 iotmi\_JobsHandler\_updateJobStatus API를 호출JobSucceeded하여 성공적인 작업을 보고해야 합니다.

/** * @brief Enumeration of possible job statuses. */ typedef enum{ JobQueued, /** The job is in the queue, waiting to be processed. */ JobInProgress, /** The job is currently being processed. */ JobFailed, /** The job processing failed. */ JobSucceeded, /** The job processing succeeded. */ JobRejected /** The job was rejected, possibly due to an error or invalid request. */ } iotmi_JobCurrentStatus_t; /** * @brief Update the status of a job with optional status details. * * @param[in] pJobId Pointer to the job ID string. * @param[in] jobIdLength Length of the job ID string. * @param[in] status The new status of the job. * @param[in] statusDetails Pointer to a string containing additional details about the job status. * This can be a JSON-formatted string or NULL if no details are needed. * @param[in] statusDetailsLength Length of the status details string. Set to 0 if `statusDetails` is NULL. * * @return 0 on success, non-zero on failure. */ int iotmi_JobsHandler_updateJobStatus( const char * pJobId, size_t jobIdLength, iotmi_JobCurrentStatus_t status, const char * statusDetails, size_t statusDetailsLength );