OTA for slave board over RS485 ModBus

alhadi
Posts: 15
Joined: Thu Apr 14, 2022 9:29 am

OTA for slave board over RS485 ModBus

Postby alhadi » Thu May 19, 2022 7:18 am

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?

ESP_alisitsyn
Posts: 211
Joined: Fri Feb 01, 2019 4:02 pm
Contact:

Re: OTA for slave board over RS485 ModBus

Postby ESP_alisitsyn » Mon May 23, 2022 7:40 am

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.

User avatar
AndyFreund
Posts: 2
Joined: Sun Apr 26, 2020 7:16 am

Re: OTA for slave board over RS485 ModBus

Postby AndyFreund » Thu Jun 22, 2023 7:37 pm

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

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot], cdollar, Google [Bot], MicroController and 188 guests