Open Magnatto opened 2 months ago
Thanks for the reply, I understand this logic, which relies on an external URL and ALWAYS from root to children.
What I'm asking is if it's possible to NOT to rely on an external URL (replacing one of the devices in the network with an upgraded version), and for the OTA to spread from ANY device (not just from root to children).
This way I don't need an outside network connection (for client safety reasons), but can still update all devices from any given device in the network (since the root is not easily found among many devices and strict information requirements)
The external URL is just a fallback OTA method used when fetching firmware from the parent node fails. If you do not wish to upgrade via an external URL, you can set extern_url_ota_cb
to NULL
.
For LAN OTA, each node can only retrieve firmware from its parent node. If your root node has stored the binary file required by the child nodes in a specific partition, you can use esp_mesh_lite_ota_register_file_transfer_cb
to provide the binary file to the child nodes. For a simple usage example, please refer to: https://github.com/espressif/esp-mesh-lite/blob/master/components/mesh_lite/include/esp_mesh_lite_core.h#L828-L885
Thank you, I understand that what I want (LAN OTA from child to parent, instead of parent to child) is not currently possible. @tswen would it be possible then to add it in the plan for a future feature? In a network of 50 devices it would be amazing to start and finish the LAN upgrade in the entire network from any device, not just the root.
If a child node obtains a firmware and wants to upgrade all devices directly through LAN OTA, the best way is to transfer the firmware to the root node first, and then upgrade it layer by layer.
LAN OTA cannot meet the requirement of upgrading all devices from any node.
If a child node obtains a firmware and wants to upgrade all devices directly through LAN OTA, the best way is to transfer the firmware to the root node first, and then upgrade it layer by layer.
LAN OTA cannot meet the requirement of upgrading all devices from any node.
Understood, will try that, thanks
Let's say I have 50 devices on a single mesh-lite and I want to do a LAN OTA update and only have the local network (so no external update). If i replace the root device with an updated version it will update all others eventually through
esp_mesh_lite_transmit_file_start
, that's great. But what if it's impossible or very incovenient to replace or know who is the root. Is there a way for me to replace ANY device with the updated version, so it may update the entire network, so the OTA LAN is trasmitted both ways, not just father to children?