Page 1 of 1

OTA for slave board over RS485 ModBus

Posted: Thu May 19, 2022 7:18 am
by alhadi
Hello,

I have 2 esp32 boards connected to each other through Modbus over RS485
The master board is connected to internet using Ethernet
The OTA for master board is using http to fetch the binary using a URL
Now, I want OTA for the slave board as well
I want the master board also to fetch the binary for the slave board and update it using Modbus RS485
Is there a library for that?

Re: OTA for slave board over RS485 ModBus

Posted: Mon May 23, 2022 7:40 am
by ESP_alisitsyn
Hello alhadi,

Did you try the`https://github.com/espressif/esp-modbus` library with the OTA? The library does not support OTA update functionality from the box and some issues are expected. The current implementation of ESP-Modbus uses RTOS-driven tasks to handle the Modbus requests which can be blocked during OTA update process and cause a timeout. It can be possible with proper configuration of your project. The `CONFIG_ESP_MAIN_TASK_AFFINITY_CPU0` kconfig option can allow starting Modbus tasks on other CPU. The `CONFIG_FMB_PORT_TASK_PRIO` option can be adjusted as well according to the maximum priority of your other tasks. If the Modbus timeout occurred, it is possible to do retries. If you would like to try it, I can help with the configuration.

Re: OTA for slave board over RS485 ModBus

Posted: Thu Jun 22, 2023 7:37 pm
by AndyFreund
Hi,
I found this topic, because I have exactly this use case for a master slave combination of two ESP32. They are connected via RS485.
What I like to now is, did anybody realized this feature, and is willing to share his / her experiences?
Thank you very much
Andy