Ошибки ModbusRTU::ReadRegisterRange() в логе

Добрый день!
По Modbus подключено реле WB-MRWL3.

Вроде все работает, реле переключается, но в лог заполнен сообщениями вида
Nov 19 14:35:06 wirenboard-A7YT3BQO user.notice serial: ModbusRTU::ReadRegisterRange(): failed to read 7 input(s) @ 39 of device modbus:58: Serial protocol error: illegal data value
Nov 19 14:35:06 wirenboard-A7YT3BQO user.notice serial: ModbusRTU::ReadRegisterRange(): failed to read 2 input(s) @ 54 of device modbus:58: Serial protocol error: illegal data value
Nov 19 14:35:06 wirenboard-A7YT3BQO user.notice serial: ModbusRTU::ReadRegisterRange(): failed to read 7 input(s) @ 39 of device modbus:58: Serial protocol error: illegal data value
Nov 19 14:35:06 wirenboard-A7YT3BQO user.notice serial: ModbusRTU::ReadRegisterRange(): failed to read 2 input(s) @ 54 of device modbus:58: Serial protocol error: illegal data value
Nov 19 14:35:06 wirenboard-A7YT3BQO user.notice serial: ModbusRTU::ReadRegisterRange(): failed to read 7 input(s) @ 39 of device modbus:58: Serial protocol error: illegal data value
Nov 19 14:35:06 wirenboard-A7YT3BQO user.notice serial: ModbusRTU::ReadRegisterRange(): failed to read 2 input(s) @ 54 of device modbus:58: Serial protocol error: illegal data value
Nov 19 14:35:06 wirenboard-A7YT3BQO user.notice serial: ModbusRTU::ReadRegisterRange(): failed to read 7 input(s) @ 39 of device modbus:58: Serial protocol error: illegal data value
Nov 19 14:35:06 wirenboard-A7YT3BQO user.notice serial: ModbusRTU::ReadRegisterRange(): failed to read 2 input(s) @ 54 of device modbus:58: Serial protocol error: illegal data value
Nov 19 14:35:07 wirenboard-A7YT3BQO user.notice serial: ModbusRTU::ReadRegisterRange(): failed to read 7 input(s) @ 39 of device modbus:58: Serial protocol error: illegal data value
Nov 19 14:35:07 wirenboard-A7YT3BQO user.notice serial: ModbusRTU::ReadRegisterRange(): failed to read 2 input(s) @ 54 of device modbus:58: Serial protocol error: illegal data value
Nov 19 14:35:07 wirenboard-A7YT3BQO user.notice serial: ModbusRTU::ReadRegisterRange(): failed to read 7 input(s) @ 39 of device modbus:58: Serial protocol error: illegal data value
Nov 19 14:35:07 wirenboard-A7YT3BQO user.notice serial: ModbusRTU::ReadRegisterRange(): failed to read 2 input(s) @ 54 of device modbus:58: Serial protocol error: illegal data value
Nov 19 14:35:07 wirenboard-A7YT3BQO user.notice serial: ModbusRTU::ReadRegisterRange(): failed to read 7 input(s) @ 39 of device modbus:58: Serial protocol error: illegal data value
Nov 19 14:35:07 wirenboard-A7YT3BQO user.notice serial: ModbusRTU::ReadRegisterRange(): failed to read 2 input(s) @ 54 of device modbus:58: Serial protocol error: illegal data value
Nov 19 14:35:07 wirenboard-A7YT3BQO user.notice serial: ModbusRTU::ReadRegisterRange(): failed to read 7 input(s) @ 39 of device modbus:58: Serial protocol error: illegal data value
Nov 19 14:35:07 wirenboard-A7YT3BQO user.notice serial: ModbusRTU::ReadRegisterRange(): failed to read 2 input(s) @ 54 of device modbus:58: Serial protocol error: illegal data value
Nov 19 14:35:07 wirenboard-A7YT3BQO user.notice serial: ModbusRTU::ReadRegisterRange(): failed to read 7 input(s) @ 39 of device modbus:58: Serial protocol error: illegal data value
Nov 19 14:35:08 wirenboard-A7YT3BQO user.notice serial: ModbusRTU::ReadRegisterRange(): failed to read 2 input(s) @ 54 of device modbus:58: Serial protocol error: illegal data value
Nov 19 14:35:08 wirenboard-A7YT3BQO user.notice serial: ModbusRTU::ReadRegisterRange(): failed to read 7 input(s) @ 39 of device modbus:58: Serial protocol error: illegal data value
Nov 19 14:35:08 wirenboard-A7YT3BQO user.notice serial: ModbusRTU::ReadRegisterRange(): failed to read 2 input(s) @ 54 of device modbus:58: Serial protocol error: illegal data value
Nov 19 14:35:08 wirenboard-A7YT3BQO user.notice serial: ModbusRTU::ReadRegisterRange(): failed to read 7 input(s) @ 39 of device modbus:58: Serial protocol error: illegal data value
Nov 19 14:35:08 wirenboard-A7YT3BQO user.notice serial: ModbusRTU::ReadRegisterRange(): failed to read 2 input(s) @ 54 of device modbus:58: Serial protocol error: illegal data value

Так же не должно быть?

Добрый день. Да, очень часто.
Реле одно на шине? Проверьте/покажите настройки порта, не менялись параметры, такие как количество стоп-бит?

Да, реле одно на шине.
{
“debug”: false,
“ports”: [
{
“path”: “/dev/ttyRS485-1”,
“devices”: [
{
“slave_id”: “58”,
“device_type”: “WB-MR3”,
“id”: “WB_MR3”
}
],
“baud_rate”: 9600,
“parity”: “N”,
“data_bits”: 8,
“stop_bits”: 2,
“poll_interval”: 10,
“enabled”: true
},
{
“path”: “/dev/ttyRS485-2”,
“devices”: [],
“baud_rate”: 9600,
“parity”: “N”,
“data_bits”: 8,
“stop_bits”: 2,
“poll_interval”: 10,
“enabled”: true
},
{
“path”: “/dev/ttyMOD1”,
“devices”: [],
“baud_rate”: 9600,
“parity”: “N”,
“data_bits”: 8,
“stop_bits”: 2,
“poll_interval”: 10,
“enabled”: false
},
{
“path”: “/dev/ttyMOD2”,
“devices”: [],
“baud_rate”: 9600,
“parity”: “N”,
“data_bits”: 8,
“stop_bits”: 2,
“poll_interval”: 10,
“enabled”: false
},
{
“path”: “/dev/ttyMOD3”,
“devices”: [],
“baud_rate”: 9600,
“parity”: “N”,
“data_bits”: 8,
“stop_bits”: 2,
“poll_interval”: 10,
“enabled”: false
}
]
}

Так, какая длина провода? Как подключено? можно с фото. И включите на несколько минут debug для serial - посмотрим что отправляется и принимается.

Стоят вплотную, подключено коротким проводом, несколько сантиметров
root@wirenboard-A7YT3BQO:~# tail -n 500 /var/log/messages
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: AddRegister: 0x7ffbe900
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: AddRegister: 0x7ffbeb50
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: AddRegister: 0x7ffbee20
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: AddRegister: 0x7ffbf090
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: AddRegister: 0x7ffbf348
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: AddRegister: 0x7ffbf650
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: AddRegister: 0x7ffbf8c8
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: AddRegister: 0x7ffbfb58
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: AddRegister: 0x7ffbfde8
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: AddRegister: 0x7ffc00a0
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: AddRegister: 0x7ffc0358
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: AddRegister: 0x7ffc0790
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: AddRegister: 0x7ffc09e8
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: AddRegister: 0x7ffc0c40
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: AddRegister: 0x7ffc0ef8
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: AddRegister: 0x7ffc11b0
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: AddRegister: 0x7ffc1468
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: Warning: no devices defined for port </dev/ttyRS485-2 9600 8 N2 timeout 500> . Skipping.
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: Adding range: 1 holding(s) @ 8 of device modbus:58
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: Adding range: 3 input(s) @ 32 of device modbus:58
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: Adding range: 7 input(s) @ 39 of device modbus:58
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: Adding range: 2 input(s) @ 54 of device modbus:58
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: Adding range: 1 input(s) @ 121 of device modbus:58
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: Adding range: 3 coil(s) @ 0 of device modbus:58
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: Adding range: 3 discrete(s) @ 0 of device modbus:58
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: Adding range: 1 discrete(s) @ 7 of device modbus:58
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: modbus: read 1 holding(s) @ 8 of device modbus:58
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: Connected with code 0
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: Write: 3a 03 00 08 00 01 01 43
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: ReadFrame: 3A 03 02 00 00 5D 81
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: register value change: <modbus:58:holding: 8> <- 0
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: channel Safety Timer device id: WB_MR3 – topic: /devices/WB_MR3/controls/Safety Timer <-- 0
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: modbus: read 3 input(s) @ 32 of device modbus:58
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: Write: 3a 04 00 20 00 03 b5 4a
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: ReadFrame: 3A 04 06 00 00 00 00 00 00 47 A2
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: register value change: <modbus:58:input: 32> <- 0
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: Subscription succeeded.
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: Subscription succeeded.
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: Subscription succeeded.
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: Subscription succeeded.
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: channel Input 1 counter device id: WB_MR3 – topic: /devices/WB_MR3/controls/Input 1 counter <-- 0
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: register value change: <modbus:58:input: 33> <- 0
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: channel Input 2 counter device id: WB_MR3 – topic: /devices/WB_MR3/controls/Input 2 counter <-- 0
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: register value change: <modbus:58:input: 34> <- 0
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: channel Input 3 counter device id: WB_MR3 – topic: /devices/WB_MR3/controls/Input 3 counter <-- 0
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: modbus: read 7 input(s) @ 39 of device modbus:58
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: Write: 3a 04 00 27 00 07 05 48
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: Subscription succeeded.
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: Subscription succeeded.
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: ReadFrame: 3A 84 03 72 CC
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: ModbusRTU::ReadRegisterRange(): failed to read 7 input(s) @ 39 of device modbus:58: Serial protocol error: illegal data value
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: modbus: read 2 input(s) @ 54 of device modbus:58
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: Write: 3a 04 00 36 00 02 95 4e
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: Subscription succeeded.
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: Subscription succeeded.
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: ReadFrame: 3A 84 03 72 CC
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: ModbusRTU::ReadRegisterRange(): failed to read 2 input(s) @ 54 of device modbus:58: Serial protocol error: illegal data value
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: modbus: read 1 input(s) @ 121 of device modbus:58
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: Write: 3a 04 00 79 00 01 e4 98
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: Subscription succeeded.
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: ReadFrame: 3A 04 02 5B F7 26 43
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: new val for <modbus:58:input: 121>: 5bf7
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: register value change: <modbus:58:input: 121> <- 23.543
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: channel Supply voltage device id: WB_MR3 – topic: /devices/WB_MR3/controls/Supply voltage <-- 23.543
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: modbus: read 3 coil(s) @ 0 of device modbus:58
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: Write: 3a 01 00 00 00 03 78 80
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: Subscription succeeded.
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: Subscription succeeded.
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: Subscription succeeded.
Nov 19 15:11:34 wirenboard-A7YT3BQO user.notice serial: Subscription succeeded.

Да, видно

А не запущено ли больше одного драйвера:

ps axl |grep wb-mqtt-serial

root@wirenboard-A7YT3BQO:~# ps axl |grep wb-mqtt-serial
0 0 7535 1 20 0 6520 2232 wait S ? 0:00 /bin/bash -c exec /usr/bin/wb-mqtt-serial -c /etc/wb-mqtt-serial.conf 2>&1 | logger -t serial
0 0 7536 7535 20 0 35656 10064 futex_ Sl ? 19:51 /usr/bin/wb-mqtt-serial -c /etc/wb-mqtt-serial.conf
0 0 8624 8574 20 0 4132 484 pipe_w S+ pts/0 0:00 grep wb-mqtt-serial

Мне кажется, что нет.

Обновил прошивку реле с 1.14.1 до 1.15.1

Проблема ушла.

Спасибо!

1 Симпатия