ESP32S3 AWS IOT OTA problem

chikichaka
Posts: 14
Joined: Tue Aug 09, 2022 7:53 am

ESP32S3 AWS IOT OTA problem

Postby chikichaka » Wed Jul 05, 2023 3:18 am

I'm implementing AWS IoT OTA to ESP32-S3.

I built an example from esp-aws-iot (https://github.com/espressif/esp-aws-io ... a/ota_mqtt
and set configuration for wifi and aws endpoint, certs.

I set policy and role for OTA.
I reference this page (https://gist.github.com/ahmedwahdan/144 ... bae5107aa1)

After execution code in ESP32S3, I could see error as below.
(5479) AWS_OTA: OTA over MQTT demo, Application version 0.9.2
I (5489) AWS_OTA: Establishing a TLS session to AWS ENDPOINT.
I (8989) AWS_OTA: Creating an MQTT connection to AWS ENDPOINT.
I (10219) coreMQTT: MQTT connection established with the broker.
I (10219) AWS_OTA: MQTT connection successfully established with broker.


I (10219) AWS_OTA: otaPal_GetPlatformImageState
I (10229) esp_ota_ops: aws_esp_ota_get_boot_flags: 1
I (10229) esp_ota_ops: [0] aflags/seq:0x2/0x1, pflags/seq:0xffffffff/0x0
I (10239) AWS_OTA: Current State=[RequestingJob], Event=[Start], New state=[RequestingJob]
I (10249) AWS_OTA: SUBSCRIBE topic $aws/things/testClient/jobs/notify-next to broker.


I (10259) AWS_OTA: Subscribed to MQTT topic: $aws/things/testClient/jobs/notify-next
I (11269) AWS_OTA: Sent PUBLISH packet to broker $aws/things/testClient/jobs/$next/get to broker.


W (11269) AWS_OTA: OTA Timer handle NULL for Timerid=0, can't stop.
I (11269) AWS_OTA: Current State=[WaitingForJob], Event=[RequestJobDocument], New state=[WaitingForJob]
E (11449) coreMQTT: Call to receiveSingleIteration failed. Status=MQTTRecvFailed
E (11449) AWS_OTA: MQTT_ProcessLoop returned with status = MQTTRecvFailed.
I (11459) AWS_OTA: Disconnecting the MQTT connection with a26gao3sj9tvxb-ats.iot.us-east-1.amazonaws.com.
I (11469) coreMQTT: Disconnected from the broker.
W (11469) AWS_OTA: OTA Timer handle NULL for Timerid=0, can't stop.
W (11479) AWS_OTA: OTA Timer handle NULL for Timerid=1, can't stop.
I (11489) AWS_OTA: OTA Agent is suspended.
I (11489) AWS_OTA: Current State=[Suspended], Event=[Suspend], New state=[Suspended]
I (11499) AWS_OTA: Establishing a TLS session to AWS ENDPOINT.
I (14319) AWS_OTA: Creating an MQTT connection to AWS ENDPOINT.
I (15549) coreMQTT: MQTT connection established with the broker.
I (15549) AWS_OTA: MQTT connection successfully established with broker.


I (15549) AWS_OTA: otaPal_GetPlatformImageState
I (15559) esp_ota_ops: aws_esp_ota_get_boot_flags: 1
I (15569) esp_ota_ops: [0] aflags/seq:0x2/0x1, pflags/seq:0xffffffff/0x0
I (15569) AWS_OTA: Current State=[RequestingJob], Event=[Resume], New state=[RequestingJob]
I (15589) AWS_OTA: SUBSCRIBE topic $aws/things/testClient/jobs/notify-next to broker.


E (15589) coreMQTT: Failed to register callback: Record for topic filter already exists: TopicFilter=$aws/things/+/jobs/#
W (15599) AWS_OTA: Failed to register a callback to subscription manager with error = 3.
I (15609) AWS_OTA: Subscribed to MQTT topic: $aws/things/testClient/jobs/notify-next
I (16619) AWS_OTA: Sent PUBLISH packet to broker $aws/things/testClient/jobs/$next/get to broker.


I (16619) AWS_OTA: Current State=[WaitingForJob], Event=[RequestJobDocument], New state=[WaitingForJob]
E (16979) coreMQTT: Call to receiveSingleIteration failed. Status=MQTTRecvFailed
E (16979) AWS_OTA: MQTT_ProcessLoop returned with status = MQTTRecvFailed.
I (16979) AWS_OTA: Disconnecting the MQTT connection with a26gao3sj9tvxb-ats.iot.us-east-1.amazonaws.com.
I (16989) coreMQTT: Disconnected from the broker.
Also when I make an OTA job in AWS, I could not find ESP32S3 in code signing profile.
Is it okay just pick Window Simulator?

chikichaka
Posts: 14
Joined: Tue Aug 09, 2022 7:53 am

Re: ESP32S3 AWS IOT OTA problem

Postby chikichaka » Wed Jul 05, 2023 7:07 am

I found solution.
I added modify policy of AWS IOT device like this link.
https://docs.aws.amazon.com/ko_kr/freer ... ertos.html


But after executing device and doing OTA job, it is nothing happend.

Who is online

Users browsing this forum: No registered users and 318 guests