Page 1 of 1

Time out Error rs485 modbus

Posted: Wed Feb 23, 2022 10:13 am
by saigajul37
This is a simple example to test my master-slave modus device
https://github.com/espressif/esp-idf/tr ... /mb_master
https://github.com/espressif/esp-idf/tr ... l/mb_slave

same connection and code as per example still I am getting a timeout error

For slave config :
CONFIG_FMB_MASTER_TIMEOUT_MS_RESPOND = 2000
---
CONFIG_MB_UART_PORT_NUM=2
CONFIG_MB_UART_BAUD_RATE=115200
CONFIG_MB_UART_RXD=4
CONFIG_MB_UART_TXD=19
CONFIG_MB_UART_RTS=5
CONFIG_MB_COMM_MODE_RTU=y
# CONFIG_MB_COMM_MODE_ASCII is not set
CONFIG_MB_SLAVE_ADDR=1

For master config :
CONFIG_FMB_MASTER_TIMEOUT_MS_RESPOND = 2000
---
CONFIG_MB_UART_PORT_NUM=2
CONFIG_MB_UART_BAUD_RATE=115200
CONFIG_MB_UART_RXD=4
CONFIG_MB_UART_TXD=19
CONFIG_MB_UART_RTS=18
CONFIG_MB_COMM_MODE_RTU=y
# CONFIG_MB_COMM_MODE_ASCII is not set


Error list:
E (560186) MASTER_TEST: Characteristic #0 (Data_channel_0) read fail, err = 0x107 (ESP_ERR_TIMEOUT).
E (562196) MB_CONTROLLER_MASTER: mbc_master_get_parameter(83): Master get parameter failure, error=(0x107) (ESP_ERR_TIMEOUT).
E (562196) MASTER_TEST: Characteristic #1 (Humidity_1) read fail, err = 0x107 (ESP_ERR_TIMEOUT).
E (564206) MB_CONTROLLER_MASTER: mbc_master_get_parameter(83): Master get parameter failure, error=(0x107) (ESP_ERR_TIMEOUT).
E (564206) MASTER_TEST: Characteristic #2 (Temperature_1) read fail, err = 0x107 (ESP_ERR_TIMEOUT).
E (566216) MB_CONTROLLER_MASTER: mbc_master_get_parameter(83): Master get parameter failure, error=(0x107) (ESP_ERR_TIMEOUT).
E (566216) MASTER_TEST: Characteristic #3 (Humidity_2) read fail, err = 0x107 (ESP_ERR_TIMEOUT).
E (568226) MB_CONTROLLER_MASTER: mbc_master_get_parameter(83): Master get parameter failure, error=(0x107) (ESP_ERR_TIMEOUT).
E (568226) MASTER_TEST: Characteristic #4 (Temperature_2) read fail, err = 0x107 (ESP_ERR_TIMEOUT).
E (570236) MB_CONTROLLER_MASTER: mbc_master_get_parameter(83): Master get parameter failure, error=(0x107) (ESP_ERR_TIMEOUT).
E (570236) MASTER_TEST: Characteristic #5 (Humidity_3) read fail, err = 0x107 (ESP_ERR_TIMEOUT).
E (572246) MB_CONTROLLER_MASTER: mbc_master_get_parameter(83): Master get parameter failure, error=(0x107) (ESP_ERR_TIMEOUT).
E (572246) MASTER_TEST: Characteristic #6 (Test_regs) read fail, err = 0x107 (ESP_ERR_TIMEOUT).
E (574256) MB_CONTROLLER_MASTER: mbc_master_get_parameter(83): Master get parameter failure, error=(0x107) (ESP_ERR_TIMEOUT).
E (574256) MASTER_TEST: Characteristic #7 (RelayP1) read fail, err = 0x107 (ESP_ERR_TIMEOUT).
E (576266) MB_CONTROLLER_MASTER: mbc_master_get_parameter(83): Master get parameter failure, error=(0x107) (ESP_ERR_TIMEOUT).
E (576266) MASTER_TEST: Characteristic #8 (RelayP2) read fail, err = 0x107 (ESP_ERR_TIMEOUT).

Re: Time out Error rs485 modbus

Posted: Fri Mar 04, 2022 8:02 am
by ESP_alisitsyn
Hi @saigajul37,

This error means that the slave device does not receive the request from your master. This issue usually relates to RS485 interface connection.
Please check your connection using the https://github.com/espressif/esp-idf/tr ... echo_rs485 example.

Re: Time out Error rs485 modbus

Posted: Wed Mar 16, 2022 1:01 pm
by ESP_alisitsyn
Hi @saigajul37 ,

Was it possible to solve the issue you described? If not please give me more information about issue: ESP-IDF version, code example.

Thank you.