Добрый день!
Не получается выполнить обновление прошивки устройств, подключенных через TCP порт посредством MB-MGE.
Я подключился к WB-MGE через socat (предварительно остановив wb-mqtt-serial) и проверил сигнатуру устройства:
root@wirenboard-ACHMBKEO:~# echo -e $(modbus_client -mrtu -pnone -s2 -b115200 /dev/ttyFloor2 -a 64 -t3 -r 290 -c 12 | grep Data | sed -e 's/.*Data://' -e 's/ 0x00/\\x/g')
2022/02/09 09:31:49 socat[21824] I transferred 8 bytes from 5 to 7
2022/02/09 09:31:49 socat[21824] I transferred 29 bytes from 7 to 5
msw3-49-467
Проверил текущую версию прошивки:
root@wirenboard-ACHMBKEO:~# echo -e $(modbus_client -mrtu -pnone -s2 -b115200 /dev/ttyFloor2 -a 64 -t3 -r 250 -c 15 | grep Data | sed -e 's/.*Data://'
-e 's/ 0x00/\\x/g')
2022/02/09 09:32:59 socat[21824] I transferred 8 bytes from 5 to 7
2022/02/09 09:32:59 socat[21824] I transferred 35 bytes from 7 to 5
4.16.4
Попытался выполнить обновление (пробовал и с указанием скорости порта, и без указания, и с флагом -j, и без него, и на скорости порта MB-MGE и socat 9.600), но безуспешно - результат одинаковый:
root@wirenboard-ACHMBKEO:~# wb-mcu-fw-flasher -j -D -d /dev/ttyFloor2 -a 64 -b 115200 -f firmware/msw3-49-467__4.16.19_master_64b9c1c.wbfw
/dev/ttyFloor2 opened successfully.
Send jump to bootloader command and wait 2 seconds...
[40][06][00][81][00][01][17][33]
2022/02/09 09:42:41 socat[21824] I transferred 8 bytes from 5 to 7
Waiting for a confirmation...
ERROR Connection timed out: select
Error: Connection timed out.
May be device already in bootloader, check status led
firmware/msw3-49-467__4.16.19_master_64b9c1c.wbfw opened successfully, size 24648 bytes
Sending info block...[40][10][10][00][00][10][20][05][FC][7F][B0][62][59][72][51][EF][9B][7E][E7][F0][18][7F][16][37][C1][E5][33][F1][A9][E9][31][DB][38][2C][02][A6][9D][88][13][F5][6A]
Waiting for a confirmation...
2022/02/09 09:42:53 socat[21824] I transferred 41 bytes from 5 to 7
ERROR Connection timed out: select
Error while sending info block: Connection timed out
[40][10][10][00][00][10][20][05][FC][7F][B0][62][59][72][51][EF][9B][7E][E7][F0][18][7F][16][37][C1][E5][33][F1][A9][E9][31][DB][38][2C][02][A6][9D][88][13][F5][6A]
Waiting for a confirmation...
2022/02/09 09:43:06 socat[21824] I transferred 41 bytes from 5 to 7
ERROR Connection timed out: select
Error while sending info block: Connection timed out
[40][10][10][00][00][10][20][05][FC][7F][B0][62][59][72][51][EF][9B][7E][E7][F0][18][7F][16][37][C1][E5][33][F1][A9][E9][31][DB][38][2C][02][A6][9D][88][13][F5][6A]
Waiting for a confirmation...
2022/02/09 09:43:19 socat[21824] I transferred 41 bytes from 5 to 7
2022/02/09 09:43:19 socat[21824] I transferred 5 bytes from 7 to 5
<40><90><03><5C><15>
ERROR Illegal data value
Error while sending info block: Illegal data value
Not in bootloader mode? Try repeating with -j
Обновление через wb-mcu-fw-updater тоже сваливается:
root@wirenboard-ACHMBKEO:/mnt/data/root# wb-mcu-fw-updater update-fw /dev/ttyFloor2 -a64
2022-02-09 10:24:12,127 Will find serial port settings for (/dev/ttyFloor2 : 64)...
2022/02/09 10:24:12 socat[26612] I transferred 8 bytes from 5 to 7
2022/02/09 10:24:12 socat[26612] I transferred 7 bytes from 7 to 5
2022-02-09 10:24:12,191 Has found serial port settings: {'baudrate': 9600, 'parity': 'N', 'stopbits': 2}
2022/02/09 10:24:12 socat[26612] I transferred 8 bytes from 5 to 7
2022/02/09 10:24:12 socat[26612] I transferred 29 bytes from 7 to 5
2022/02/09 10:24:16 socat[26612] I transferred 8 bytes from 5 to 7
2022/02/09 10:24:16 socat[26612] I transferred 37 bytes from 7 to 5
2022-02-09 10:24:16,199 Firmware will be upgraded. Will flash (4.16.8) over (4.16.4).
2022/02/09 10:24:16 socat[26612] I transferred 8 bytes from 5 to 7
2022/02/09 10:24:16 socat[26612] I transferred 29 bytes from 7 to 5
2022/02/09 10:24:16 socat[26612] I transferred 8 bytes from 5 to 7
2022/02/09 10:24:16 socat[26612] I transferred 7 bytes from 7 to 5
2022/02/09 10:24:16 socat[26612] I transferred 8 bytes from 5 to 7
2022/02/09 10:24:16 socat[26612] I transferred 8 bytes from 7 to 5
2022/02/09 10:24:16 socat[26612] I transferred 8 bytes from 5 to 7
2022/02/09 10:24:17 socat[26612] I transferred 8 bytes from 5 to 7
2022/02/09 10:24:17 socat[26612] I transferred 41 bytes from 5 to 7
Error while sending info block: Connection timed out
2022/02/09 10:24:22 socat[26612] I transferred 41 bytes from 5 to 7
Error while sending info block: Connection timed out
2022/02/09 10:24:27 socat[26612] I transferred 41 bytes from 5 to 7
Error while sending info block: Connection timed out
Error while sending info block.
Check connection, jump to bootloader and try again.
2022-02-09 10:24:32,212 Flashing has failed!
2022-02-09 10:24:32,230 Command '['/usr/bin/wb-mcu-fw-flasher', '-d', '/dev/ttyFloor2', '-a', '64', '-f', '/var/lib/wb-mcu-fw-updater/msw3-49-467__4.16.8_master_a22edb9.wbfw', '-t', '2.0']' returned non-zero exit status 1
Что я делаю не так? Действия выполнял в соответствии с инструкцией. Скорость всех устройств - 115.200.