OTA updates in Rainmaker with Mesh-Lite

SagiAx
Posts: 1
Joined: Tue Feb 11, 2025 11:08 pm

OTA updates in Rainmaker with Mesh-Lite

Postby SagiAx » Tue Feb 11, 2025 11:32 pm

Hi everyone,

I've been struggling for the past few days with the basic `led_light` example from the ESP-Mesh-Lite repository, which integrates RainMaker with OTA updates. However, I am encountering an issue when attempting an OTA update:

## Problem Description
When initiating an OTA update, the ESP32 hangs in `esp_rmaker_mesh_lite_ota_cb` when calling `strlen(ota_data->url)`. Upon further investigation, I discovered that the `ota` structure passed from the handler to the callback gets corrupted, leading to invalid pointer values.

## Debug Logs
Here are relevant log outputs that illustrate the issue:

Code: Select all

I (14855) app_rainmaker_ota_topic: File Size: 1442048
I (14865) app_rainmaker_ota_topic: Firmware version: 1.1
I (14865) app_rainmaker_ota_topic: esp_rmaker_mesh_lite_ota_url_handler: ota = 0x3ffe4f00, url = 0x3fff2c24, fw_version = 0x3ffb15c4, metadata = 0x0, transient_priv = 0x3ffb1ac8, filesize = 0x160100, ota_in_progress = 0x1, rolled_back = 0x0, last_reported_status = 0x0

I (14885) esp_rmaker_ota: esp_rmaker_mesh_lite_ota_cb: ota = 0x3ffe4f00, url = 0x160100, fw_version = 0x1, metadata = 0x656d6954, transient_priv = 0x14, filesize = 0x0, ota_in_progress = 0xc8, rolled_back = 0xfb, last_reported_status = 0x0

I (14915) app_rainmaker_ota: Lite Callback: ota = 0x3ffe70e0, url = 0x160100, fw_version = 0x1, metadata = 0x656d6954, filesize = 0x0
As seen in the logs, the `ota` structure initially contains valid pointer addresses (`url = 0x3fff2c24`, `fw_version = 0x3ffb15c4`), but by the time it reaches the callback, the `url` and other pointers become invalid (`url = 0x160100`, `fw_version = 0x1`, etc.).

## Steps Taken So Far
- Tried ESP-IDF versions 5.0.8 and 5.2.3, but the issue persists.
- Using `led_light` version 1.0.1 from the ESP-Mesh-Lite repository.

Has anyone encountered a similar issue with ESP RainMaker's OTA implementation in Mesh-Lite?

Thanks in advance!

Who is online

Users browsing this forum: No registered users and 121 guests