Ошибка при сканировании устройств утилитой wb-mcu-fw-updater

Добрый день!

При попытке автоматического обновления выскакивает вот это:

root@wirenboard-AZ7RCSJ3:~# wb-mcu-fw-updater update-all
2024-05-16 06:58:02,860 Will probe all devices on enabled serial ports of /etc/wb-mqtt-serial.conf:
Probing WB-MAP6S fw2 (port: /dev/ttyRS485-1, slaveid: 69, uart_params: 57600N2, response_timeout: 0.50)... (elapsed: 00:01)
Probing WB-MR6CU (port: /dev/ttyRS485-1, slaveid: 97, uart_params: 57600N2, response_timeout: 0.50)... (elapsed: 00:01)
Probing WB-MRM2-mini-NC-inputs (port: /dev/ttyRS485-1, slaveid: 47, uart_params: 57600N2, response_timeout: 0.50)... (elapsed: 00:01)
Probing WB-MDM3 (port: /dev/ttyRS485-1, slaveid: 45, uart_params: 57600N2, response_timeout: 0.50)... (elapsed: 00:00)
Probing WB-MAP6S fw2 (port: /dev/ttyRS485-1, slaveid: 52, uart_params: 57600N2, response_timeout: 0.50)... (elapsed: 00:01)
Probing WB-MDM3 (port: /dev/ttyRS485-1, slaveid: 44, uart_params: 57600N2, response_timeout: 0.50)... (elapsed: 00:00)
Probing WB-MR3 (port: /dev/ttyRS485-2, slaveid: 43, uart_params: 38400N2, response_timeout: 0.50)... (elapsed: 00:01)
2024-05-16 06:58:11,523 Unhandled exception!
Traceback (most recent call last):
  File "/usr/bin/wb-mcu-fw-updater", line 528, in <module>
    args.func(args)
  File "/usr/bin/wb-mcu-fw-updater", line 208, in update_all
    update_monitor._update_all(
  File "/usr/lib/python3/dist-packages/wb_mcu_fw_updater/update_monitor.py", line 795, in _update_all
    probing_result = probe_all_devices(
  File "/usr/lib/python3/dist-packages/wb_mcu_fw_updater/update_monitor.py", line 750, in probe_all_devices
    modbus_connection=get_correct_modbus_connection(
  File "/usr/lib/python3/dist-packages/wb_mcu_fw_updater/update_monitor.py", line 310, in get_correct_modbus_connection
    check_device_is_a_wb_one(modbus_connection)
  File "/usr/lib/python3/dist-packages/wb_mcu_fw_updater/update_monitor.py", line 263, in check_device_is_a_wb_one
    fw_sig = modbus_connection.get_fw_signature()
  File "/usr/lib/python3/dist-packages/wb_modbus/bindings.py", line 734, in get_fw_signature
    return self.read_string(self.COMMON_REGS_MAP["fw_signature"], self.FIRMWARE_SIGNATURE_LENGTH)
  File "/usr/lib/python3/dist-packages/wb_modbus/bindings.py", line 45, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/wb_modbus/bindings.py", line 72, in wrapper
    raise thrown_exc
  File "/usr/lib/python3/dist-packages/wb_modbus/bindings.py", line 66, in wrapper
    return f(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/wb_modbus/bindings.py", line 511, in read_string
    return self._to_wb_str(self.device.read_string(addr, regs_lenght, 3))
  File "/usr/lib/python3/dist-packages/wb_modbus/minimalmodbus.py", line 743, in read_string
    return self._generic_command(
  File "/usr/lib/python3/dist-packages/wb_modbus/minimalmodbus.py", line 1139, in _generic_command
    payload_from_slave = self._perform_command(functioncode, payload_to_slave)
  File "/usr/lib/python3/dist-packages/wb_modbus/minimalmodbus.py", line 1206, in _perform_command
    payload_from_slave = _extract_payload(response, self.address, self.mode, functioncode)
  File "/usr/lib/python3/dist-packages/wb_modbus/minimalmodbus.py", line 1688, in _extract_payload
    raise InvalidResponseError(text)
wb_modbus.minimalmodbus.InvalidResponseError: Checksum error in rtu mode: '\x8cx' instead of '\xa0\x8c' . The response is: '+\x03\x18\x00m\x00r\x00w\x00l\x003\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8cx' (plain response: '+\x03\x18\x00m\x00r\x00w\x00l\x003\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8cx')
root@wirenboard-AZ7RCSJ3:~# 

Что с этим делать?

Добрый день.
Приложите пожалуйста диагностический архив - хочу проверить насколько актуальные версии ПО.

diag_output_AZ7RCSJ3_2024-05-16-11.01.12.zip (338,5 КБ)

Покажите пожалуйста результаты выполнения

echo -e $(modbus_client_rpc -mrtu -pnone -s2 -b38400 /dev/ttyRS485-2 -a 43-t3 -r 250 -c 15 | grep Data | sed -e 's/.*Data://' -e 's/ 0x00/\\x/g')

ну и

echo -e $(modbus_client_rpc -mrtu -pnone -s2 -b38400 /dev/ttyRS485-2 -a 43-t3 -r 290 -c 12 | grep Data | sed -e 's/.*Data://' -e 's/ 0x00/\\x/g')

и еще

modbus_client_rpc -mrtu -pnone -s2 -b38400 /dev/ttyRS485-2 -a 43-t3 -r 290 -c 12

В общем воспроизвел, но информация будет полезной.

Как то так

root@wirenboard-AZ7RCSJ3:~# echo -e $(modbus_client_rpc -mrtu -pnone -s2 -b38400 /dev/ttyRS485-2 -a 43-t3 -r 250 -c 15 | grep Data | sed -e 's/.*Data://' -e 's/ 0x00/\\x/g')
-bash: modbus_client_rpc: команда не найдена

Установите пакет modbus-utils-rpc

root@wirenboard-AZ7RCSJ3:~# systemctl stop wb-mqtt-serial
root@wirenboard-AZ7RCSJ3:~# echo -e $(modbus_client_rpc -mrtu -pnone -s2 -b38400 /dev/ttyRS485-2 -a 43 -t3 -r 250 -c 15 | grep Data | sed -e 's/.*Data://' -e 's/ 0x00/\\x/g')
2024-05-16 13:11:57,203 [ERROR] Mqtt-rpc client timeout error, timeout 1000 ms

root@wirenboard-AZ7RCSJ3:~# ^[[200~echo -e $(modbus_client_rpc -mrtu -pnone -s2 -b38400 /dev/ttyRS485-2 -a 43 -t3 -r 290 -c 12 | grep Data | sed -e 's/.*Data://' -e 's/ 0x00/\\x/g')~
2024-05-16 13:12:26,430 [ERROR] Mqtt-rpc client timeout error, timeout 1000 ms
-bash: $'\E[200~echo': команда не найдена
root@wirenboard-AZ7RCSJ3:~# echo -e $(modbus_client_rpc -mrtu -pnone -s2 -b38400 /dev/ttyRS485-2 -a 43 -t3 -r 290 -c 12 | grep Data | sed -e 's/.*Data://' -e 's/ 0x00/\\x/g')~
2024-05-16 13:12:38,928 [ERROR] Mqtt-rpc client timeout error, timeout 1000 ms
~
root@wirenboard-AZ7RCSJ3:~# modbus_client_rpc -mrtu -pnone -s2 -b38400 /dev/ttyRS485-2 -a 43 -t3 -r 290 -c 12
2024-05-16 13:12:59,464 [ERROR] Mqtt-rpc client timeout error, timeout 1000 ms

То есть устройства нет, так?

root@wirenboard-AZ7RCSJ3:~# systemctl start wb-mqtt-serial
root@wirenboard-AZ7RCSJ3:~# modbus_client_rpc -mrtu -pnone -s2 -b38400 /dev/ttyRS485-2 -a43 -t3 -r 290 -c 12
SUCCESS: read 12 elements:
        Data: 0x006d 0x0072 0x0077 0x006c 0x0033 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 
root@wirenboard-AZ7RCSJ3:~# echo -e $(modbus_client_rpc -mrtu -pnone -s2 -b38400 /dev/ttyRS485-2 -a43 -t3 -r 290 -c 12 | grep Data | sed -e 's/.*Data://' -e 's/ 0x00/\\x/g')
mrwl3
root@wirenboard-AZ7RCSJ3:~# systemctl start wb-mqtt-serial
root@wirenboard-AZ7RCSJ3:~# echo -e $(modbus_client_rpc -mrtu -pnone -s2 -b38400 /dev/ttyRS485-2 -a43 -t3 -r 250 -c 15 | grep Data | sed -e 's/.*Data://' -e 's/ 0x00/\\x/g')
1.20.4
root@wirenboard-AZ7RCSJ3:~# echo -e $(modbus_client_rpc -mrtu -pnone -s2 -b38400 /dev/ttyRS485-2 -a43 -t3 -r 290 -c 12 | grep Data | sed -e 's/.*Data://' -e 's/ 0x00/\\x/g')
mrwl3
root@wirenboard-AZ7RCSJ3:~# modbus_client_rpc -mrtu -pnone -s2 -b38400 /dev/ttyRS485-2 -a43 -t3 -r 290 -c 12
SUCCESS: read 12 elements:
        Data: 0x006d 0x0072 0x0077 0x006c 0x0033 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 
root@wirenboard-AZ7RCSJ3:~# 

Нет, устройство есть, у Вас ошибка : -a 43-t3

Да, верно. Благодарю, информация поможет разработчикам.
Сейчас - можно в общем обновить вручную.

После обновления wb-mcu-updater есть некоторый прогресс

root@wirenboard-AZ7RCSJ3:~# wb-mcu-fw-updater update-all
2024-05-20 08:47:11,290 Will probe all devices on enabled serial ports of /etc/wb-mqtt-serial.conf:
Probing WB-MAP6S fw2 (port: /dev/ttyRS485-1, slaveid: 52, uart_params: 57600N2, response_timeout: 0.50)... (elapsed: 00:01)
Probing WB-MDM3 (port: /dev/ttyRS485-1, slaveid: 44, uart_params: 57600N2, response_timeout: 0.50)... (elapsed: 00:00)
Probing WB-MR6CU (port: /dev/ttyRS485-1, slaveid: 97, uart_params: 57600N2, response_timeout: 0.50)... (elapsed: 00:00)
Probing WB-MAP6S fw2 (port: /dev/ttyRS485-1, slaveid: 69, uart_params: 57600N2, response_timeout: 0.50)... (elapsed: 00:00)
Probing WB-MRM2-mini-NC-inputs (port: /dev/ttyRS485-1, slaveid: 47, uart_params: 57600N2, response_timeout: 0.50)... (elapsed: 00:00)
Probing WB-MDM3 (port: /dev/ttyRS485-1, slaveid: 45, uart_params: 57600N2, response_timeout: 0.50)... (elapsed: 00:00)
Probing WB-M1W2 BUTTONS (port: /dev/ttyRS485-2, slaveid: 118, uart_params: 38400N2, response_timeout: 0.50)... (elapsed: 00:02)
Probing WB-MSW v.4 (port: /dev/ttyRS485-2, slaveid: 50, uart_params: 38400N2, response_timeout: 0.50)... (elapsed: 00:01)
Probing WB-MAP6S fw2 (port: /dev/ttyRS485-2, slaveid: 49, uart_params: 38400N2, response_timeout: 0.50)... (elapsed: 00:01)
Probing WB-MRGBW-D_fw3_nosubdev (port: /dev/ttyRS485-2, slaveid: 76, uart_params: 38400N2, response_timeout: 0.50)... (elapsed: 00:01)
2024-05-20 08:47:22,761 Unhandled exception!
Traceback (most recent call last):
  File "/usr/bin/wb-mcu-fw-updater", line 528, in <module>
    args.func(args)
  File "/usr/bin/wb-mcu-fw-updater", line 208, in update_all
    update_monitor._update_all(
  File "/usr/lib/python3/dist-packages/wb_mcu_fw_updater/update_monitor.py", line 795, in _update_all
    probing_result = probe_all_devices(
  File "/usr/lib/python3/dist-packages/wb_mcu_fw_updater/update_monitor.py", line 750, in probe_all_devices
    modbus_connection=get_correct_modbus_connection(
  File "/usr/lib/python3/dist-packages/wb_mcu_fw_updater/update_monitor.py", line 310, in get_correct_modbus_connection
    check_device_is_a_wb_one(modbus_connection)
  File "/usr/lib/python3/dist-packages/wb_mcu_fw_updater/update_monitor.py", line 263, in check_device_is_a_wb_one
    fw_sig = modbus_connection.get_fw_signature()
  File "/usr/lib/python3/dist-packages/wb_modbus/bindings.py", line 734, in get_fw_signature
    return self.read_string(self.COMMON_REGS_MAP["fw_signature"], self.FIRMWARE_SIGNATURE_LENGTH)
  File "/usr/lib/python3/dist-packages/wb_modbus/bindings.py", line 45, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/wb_modbus/bindings.py", line 72, in wrapper
    raise thrown_exc
  File "/usr/lib/python3/dist-packages/wb_modbus/bindings.py", line 66, in wrapper
    return f(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/wb_modbus/bindings.py", line 511, in read_string
    return self._to_wb_str(self.device.read_string(addr, regs_lenght, 3))
  File "/usr/lib/python3/dist-packages/wb_modbus/minimalmodbus.py", line 743, in read_string
    return self._generic_command(
  File "/usr/lib/python3/dist-packages/wb_modbus/minimalmodbus.py", line 1139, in _generic_command
    payload_from_slave = self._perform_command(functioncode, payload_to_slave)
  File "/usr/lib/python3/dist-packages/wb_modbus/minimalmodbus.py", line 1206, in _perform_command
    payload_from_slave = _extract_payload(response, self.address, self.mode, functioncode)
  File "/usr/lib/python3/dist-packages/wb_modbus/minimalmodbus.py", line 1688, in _extract_payload
    raise InvalidResponseError(text)
wb_modbus.minimalmodbus.InvalidResponseError: Checksum error in rtu mode: '\x96\x87' instead of 'ô\x97' . The response is: 'L\x03\x18\x00m\x00r\x00g\x00b\x00w\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\x87' (plain response: 'L\x03\x18\x00m\x00r\x00g\x00b\x00w\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\x87')
root@wirenboard-AZ7RCSJ3:~#