Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] OTA don't start (ota_over_mqtt_demo: This is not an OTA job) #114

Closed
WilliamFrasson opened this issue Sep 11, 2024 · 3 comments
Closed

Comments

@WilliamFrasson
Copy link

WilliamFrasson commented Sep 11, 2024

Describe the bug
after configuring aws for the ota demo update as documented in 5 Perform firmware Over-the-Air Updates with AWS IoT
what i see is that esp32/esp32s3 don't start ota update :

I (11446) ota_over_mqtt_demo: Received Job Document event Received

I (11456) ota_over_mqtt_demo: This is not an OTA job

System information

Hardware board: ESP32-S3 /ESP32
IDE used: 5.2.2
Operating System: Windows
Code version: 69d1309 (after #103)
Project/Demo: temp_sub_pub_and_led_control_demo
If your project is a custom application, please add the relevant code snippet(s) in the section titled "Code to reproduce bug".
Expected behavior

Screenshots or console output

....
I (3666) wifi:dp: 1, bi: 102400, li: 3, scale listen interval from 307200 us to 307200 us
I (3756) wifi:AP's beacon interval = 102400 us, DTIM period = 1
I (4886) wifi:idx:0 (ifx:0, e4:8f:34:8f:1c:75), tid:0, ssn:0, winSize:64
> I (5676) core_mqtt_agent_manager: WiFi connected.
> I (5676) app_wifi: Connected with IP Address:192.168.1.15
I (5676) esp_netif_handlers: sta ip: 192.168.1.15, mask: 255.255.255.0, gw: 192.168.1.1

I (5686) main_task: Returned from app_main()
> I (7456) core_mqtt_agent_manager: TLS connection established.
I (7866) coreMQTT: MQTT connection established with the broker.
> I (7866) core_mqtt_agent_manager: Session present: 0

I (7866) sub_pub_unsub_demo: coreMQTT-Agent connected.
I (7866) temp_sub_pub_and_led_control_demo: coreMQTT-Agent connected.
I (7876) sub_pub_unsub_demo: Task "SubPub0" sending subscribe request to coreMQTT-Agent for topic filter: /filter/SubPub0 with id 1
> I (7876) ota_over_mqtt_demo: coreMQTT-Agent connected. Resuming OTA agent.
> I (7896) core_mqtt_agent_manager: coreMQTT-Agent connected.
I (8176) temp_sub_pub_and_led_control_demo: Received subscribe ack for topic /filter/TempSubPubLED containing ID 1
I (8176) sub_pub_unsub_demo: Subscribe 1 for topic filter /filter/SubPub0 succeeded for task "SubPub0".
.....
I (9396) sub_pub_unsub_demo: Unsubscribe 3 for topic filter /filter/SubPub0 succeeded for task "SubPub0".
I (9396) sub_pub_unsub_demo: Task "SubPub0" completed a loop. Delaying before next loop.

> I (11026) ota_over_mqtt_demo: Request Job Document event Received

I (11066) ota_over_mqtt_demo: Sent PUBLISH packet to broker $aws/things/FLTE15/jobs/start-next to broker.

I (11446) coreMQTT: De-serialized incoming PUBLISH packet: DeserializerResult=MQTTSuccess.
I (11446) coreMQTT: State record updated. New state=MQTTPublishDone.
**> I (11446) ota_over_mqtt_demo: Received Job Document event Received

I (11456) ota_over_mqtt_demo: This is not an OTA job**

I (13866) temp_sub_pub_and_led_control_demo: Sending publish request to agent with message "{"temperatureSensor":{ "taskName": "TempSubPubLED", "temperatureValue": 0.000000, "iteration": 1}}" on topic "/filter/TempSubPubLED"

Steps to reproduce bug
Example:
1. "I am using project main branch
2. create the aws requires for the ota update via mqtt: 5 Perform firmware Over-the-Air Updates with AWS IoT
3. "When run on [ ... ], I observed that
> I (11446) ota_over_mqtt_demo: Received Job Document event Received
> I (11456) ota_over_mqtt_demo: This is not an OTA job

Code to reproduce bug
demo application with ota_over_mqtt_demo

Additional context
na

@WilliamFrasson
Copy link
Author

probably my mistake in naming used in CONFIG_GRI_THING_NAME "FLTE15" vs Create thing name in AWS "FTLE15" ..

@aggarg
Copy link
Member

aggarg commented Sep 11, 2024

Does the OTA work after you fixed the above problem?

@WilliamFrasson
Copy link
Author

WilliamFrasson commented Sep 11, 2024

well
on ESP32 works fine while on ESP32S3 there is the demo as is cause a stack overflow when file is downloaded

I (218216) ota_over_mqtt_demo: Sent PUBLISH packet to broker $aws/things/FLTE16S3/streams/AFR_OTA-e43f3184-32d9-40d3-ae7e-7ecea38f1e40/get/json to broker.

I (218226) ota_over_mqtt_demo: Data block request sent.

I (218606) coreMQTT: De-serialized incoming PUBLISH packet: DeserializerResult=MQTTSuccess.
I (218606) coreMQTT: State record updated. New state=MQTTPublishDone.
I (218616) ota_over_mqtt_demo: Received File Block event Received.

**> I (218616) ota_over_mqtt_demo: Downloaded block 247 of 248.

I (218626) ota_over_mqtt_demo: Free OTA buffers 2
I (218626) ota_over_mqtt_demo: Close file event Received**

> ERROR A stack overflow in task OTADemoTask has been detected.

Backtrace: 0x403759d6:0x3fcb1180 0x4037bad5:0x3fcb11a0 0x4037c742:0x3fcb11c0 0x4037d8e3:0x3fcb1240 0x4037c874:0x3fcb1270 0x4037c86a:0x3fcb1290 0x0006001d:0x00000000 |<-CORRUPTED

ELF file SHA256: 5d52f5993

Rebooting...
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x40375915
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce2810,len:0x11b8
load:0x403c8700,len:0x4
load:0x403c8704,len:0xab8

for FIX the OTA demo on ESP32S3 i have changed the OTADemo STack Size from 3072 to 6072 (simple test increasing the size, no specific checks) in sdkconfig (#define CONFIG_GRI_OTA_DEMO_DEMO_TASK_STACK_SIZE 6072)

with the bigger stack size the OTA update works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants