При попытке обновления прошивки перестал отвечать WB-MSW v.3.
root@wirenboard-AYTB4NYV:~# wb-mcu-fw-updater update-fw /dev/ttyRS485-1 -a57
2020-09-10 16:20:10,057 Will find serial port settings for (/dev/ttyRS485-1 : 57)…
2020-09-10 16:20:10,112 Has found serial port settings: {‘baudrate’: 9600, ‘stopbits’: 2, ‘parity’: ‘N’}
2020-09-10 16:20:11,718 Firmware will be upgraded. Will flash (4.14.0) over (4.13.0).
Error while sending info block: Resource temporarily unavailable
Error while sending info block: Resource temporarily unavailable
Error while sending info block: Resource temporarily unavailable
Error while sending info block.
Check connection, jump to bootloader and try again.
2020-09-10 16:20:23,295 Flashing has failed!
2020-09-10 16:20:23,309 Command ‘[’/usr/bin/wb-mcu-fw-flasher’, ‘-d’, ‘/dev/ttyRS485-1’, ‘-a’, ‘57’, ‘-f’, ‘/var/lib/wb-mcu-fw-updater/fw/msw3-48mh__4.14.0.wbfw’, ‘-t’, ‘2.0’]’ returned non-zero exit status 1
root@wirenboard-AYTB4NYV:~# service wb-mqtt-serial stop
root@wirenboard-AYTB4NYV:~# wb-mcu-fw-flasher -j -d /dev/ttyRS485-1 -a 57 -u
/dev/ttyRS485-1 opened successfully.
Send jump to bootloader command and wait 2 seconds…
Error: Connection timed out.
May be device already in bootloader, check status led
Send reset UART settings and modbus address command…
Ok.
Device is in Bootloader now! To flash FW run
wb-mcu-fw-flasher -d -f <firmware.wbfw>
root@wirenboard-AYTB4NYV:~# service wb-mqtt-serial start
root@wirenboard-AYTB4NYV:~# service wb-mqtt-serial stop
root@wirenboard-AYTB4NYV:~# wb-mcu-fw-flasher -j -d /dev/ttyRS485-1 -a 57 -e
/dev/ttyRS485-1 opened successfully.
Send jump to bootloader command and wait 2 seconds…
Error: Connection timed out.
May be device already in bootloader, check status led
Send format EEPROM command…
Ok.
Device is in Bootloader now! To flash FW run
wb-mcu-fw-flasher -d -f <firmware.wbfw>
root@wirenboard-AYTB4NYV:~# service wb-mqtt-serial start
root@wirenboard-AYTB4NYV:~#
root@wirenboard-AYTB4NYV:~# echo -e $(modbus_client -mrtu -pnone -s2 /dev/ttyRS485-1 -a 0 -t3 -r 290 -c 12 | grep Data | sed -e ‘s/.*Data://’ -e ‘s/ 0x00/\x/g’)
msw3-48mh
root@wirenboard-AYTB4NYV:~# wget http://fw-releases.wirenboard.com/fw/by-signature/msw3-48mh/stable/latest.wbfw--2020-09-10 18:22:13-- http://fw-releases.wirenboard.com/fw/by-signature/msw3-48mh/stable/latest.wbfw
Распознаётся fw-releases.wirenboard.com (fw-releases.wirenboard.com)… 52.218.41.4
Подключение к fw-releases.wirenboard.com (fw-releases.wirenboard.com)|52.218.41.4|:80… соединение установлено.
HTTP-запрос отправлен. Ожидание ответа… 200 OK
Длина: 22880 (22K) [application/octet-stream]
Сохранение в: «latest.wbfw»
latest.wbfw 100%[==========================================>] 22,34K 131KB/s in 0,2s
2020-09-10 18:22:14 (131 KB/s) - «latest.wbfw» сохранён [22880/22880]
root@wirenboard-AYTB4NYV:~# wb-mcu-fw-flasher -d /dev/ttyRS485-1 -j 1
/dev/ttyRS485-1 opened successfully.
Send jump to bootloader command and wait 2 seconds…
Error: Connection timed out.
May be device already in bootloader, check status led
To flash FW on running device, run
wb-mcu-fw-flasher -d -a <modbus_addr> -j -u -f <firmware.wbfw>
root@wirenboard-AYTB4NYV:~# wb-mcu-fw-flasher -j -d /dev/ttyRS485-1 -a 0 -f latest.wbfw
/dev/ttyRS485-1 opened successfully.
Send jump to bootloader command and wait 2 seconds…
Error: Connection timed out.
May be device already in bootloader, check status led
latest.wbfw opened successfully, size 22880 bytes
Sending info block… OK
Sending data block 74 of 168…
Error while sending data block: Connection timed out
Sending data block 74 of 168…
Error while sending data block: Connection timed out
Sending data block 74 of 168…
Error while sending data block: Connection timed out
Sending data block 74 of 168…
Error while sending data block: Connection timed out
Sending data block 75 of 168…
Error while sending data block: Connection timed out
Sending data block 75 of 168…
Error while sending data block: Connection timed out
Sending data block 75 of 168…
Error while sending data block: Connection timed out
root@wirenboard-AYTB4NYV:~# service wb-mqtt-serial stop
root@wirenboard-AYTB4NYV:~# wb-mcu-fw-flasher -j -d /dev/ttyRS485-1 -a 0 -f latest.wbfw
/dev/ttyRS485-1 opened successfully.
Send jump to bootloader command and wait 2 seconds…
Error: Connection timed out.
May be device already in bootloader, check status led
latest.wbfw opened successfully, size 22880 bytes
Sending info block… OK
Sending data block 168 of 168… OK.
Диод горит постоянно.
Через еще некоторое время колдовства датчик ожил… Спасибо за помощь
Отлично, рад что получилось. А на порту /dev/ttyRS485-1 какое-либо устройство кроме MSW было? (с этим может быть связяно то, что сразу же не получилось прошить с адресом “0”)
Нет, устройства отключил, но забыл отключить сервис wb-mqtt-serial. Точнее не забыл, а думал что он отключен, т.к ранее отключил, но он скорее всего включился когда выходил из бутлоадера.
32 банка действительно поддерживаются, однако они не прокинуты в веб интерфейс, вы можете использовать командную строку или добавить койлы в интерфейс отредактировав файл /usr/share/wb-mqtt-serial/templates/config-wb-msw_v3.json