modbus RTU RS485 (error 0x107)
Posted: Sun Jan 14, 2024 6:56 pm
Hello,
I am trying to initiate a communication between an esp32s3 and a Battery.
but I keep getting this error when requesting the data:
E (31957) MB_CONTROLLER_MASTER: mbc_master_get_parameter(73): Master get parameter failure, error=(0x107) (ESP_ERR_TIMEOUT).
I tried to Increate the Timeout but It didn't work.
I am new to esp-idf so I think the error is caused by the way I am requesting the data.
I am using the esp-idf modbus master example
I just want to retrieve any data for now. I attached the battery docummentation.
I am trying to initiate a communication between an esp32s3 and a Battery.
but I keep getting this error when requesting the data:
E (31957) MB_CONTROLLER_MASTER: mbc_master_get_parameter(73): Master get parameter failure, error=(0x107) (ESP_ERR_TIMEOUT).
I tried to Increate the Timeout but It didn't work.
I am new to esp-idf so I think the error is caused by the way I am requesting the data.
I am using the esp-idf modbus master example
Code: Select all
const mb_parameter_descriptor_t device_parameters[] = {
// { CID, Param Name, Units, Modbus Slave Addr, Modbus Reg Type, Reg Start, Reg Size, Instance Offset, Data Type, Data Size, Parameter Options, Access Mode}
{CID_HOLD_DATA_0, STR("Battery Voltage"), STR("mV"), MB_DEVICE_ADDR1, MB_PARAM_HOLDING,0x1000, 1,
HOLD_OFFSET(holding_data0) , PARAM_TYPE_ASCII, 4, OPTS(0,100,1), PAR_PERMS_READ},
};