Через socat читаются. Прочитал, выключил WB-MGE, переподключил socat, опять прочитал - все ок.
root@wirenboard-A32RE5MO:~# socat -d -d -d -x PTY,raw,b115200,parenb=0,cstopb=1,cs8,,link=/dev/ttyBoiler tcp:192.168.214.14:20108&
[1] 472189
root@wirenboard-A32RE5MO:~# 2024/10/03 10:06:14 socat[472189] I socat by Gerhard Rieger and contributors - see www.dest-unreach.org
2024/10/03 10:06:14 socat[472189] I This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/)
2024/10/03 10:06:14 socat[472189] I This product includes software written by Tim Hudson (tjh@cryptsoft.com)
2024/10/03 10:06:14 socat[472189] I setting option "raw"
2024/10/03 10:06:14 socat[472189] I setting option "b115200"
2024/10/03 10:06:14 socat[472189] I setting option "parenb" to 0
2024/10/03 10:06:14 socat[472189] I setting option "cstopb" to 1
2024/10/03 10:06:14 socat[472189] I setting option "cs8"
2024/10/03 10:06:14 socat[472189] I setting option "symbolic-link" to "/dev/ttyBoiler"
2024/10/03 10:06:14 socat[472189] I openpty({5}, {6}, {"/dev/pts/1"},,) -> 0
2024/10/03 10:06:14 socat[472189] N PTY is /dev/pts/1
2024/10/03 10:06:14 socat[472189] N opening connection to AF=2 192.168.214.14:20108
2024/10/03 10:06:14 socat[472189] I starting connect loop
2024/10/03 10:06:14 socat[472189] I socket(2, 1, 6) -> 7
2024/10/03 10:06:14 socat[472189] N successfully connected from local address AF=2 192.168.214.11:39796
2024/10/03 10:06:14 socat[472189] I resolved and opened all sock addresses
2024/10/03 10:06:14 socat[472189] N starting data transfer loop with FDs [5,5] and [7,7]
root@wirenboard-A32RE5MO:~# echo -e $(modbus_client -mrtu -pnone -s1 -b115200 /dev/ttyBoiler -a146 -t3 -r 290 -c 12 | grep Data | sed -e 's/.*Data://' -e 's/ 0x00/\\x/g')
> 2024/10/03 10:06:19.075900 length=8 from=0 to=7
92 03 01 22 00 0c f9 5a
2024/10/03 10:06:19 socat[472189] I transferred 8 bytes from 5 to 7
< 2024/10/03 10:06:19.082827 length=29 from=0 to=28
92 03 18 00 6d 00 72 00 36 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c6 59
2024/10/03 10:06:19 socat[472189] I transferred 29 bytes from 7 to 5
mr6
root@wirenboard-A32RE5MO:~# < 2024/10/03 10:07:04.327563 length=2 from=29 to=30
ff 00
2024/10/03 10:07:04 socat[472189] I transferred 2 bytes from 7 to 5
> 2024/10/03 10:07:04.328178 length=3 from=8 to=10
ff 5e 40
2024/10/03 10:07:04 socat[472189] I transferred 3 bytes from 5 to 7
^C
root@wirenboard-A32RE5MO:~# echo -e $(modbus_client -mrtu -pnone -s1 -b115200 /dev/ttyBoiler -a146 -t3 -r 290 -c 12 | grep Data | sed -e 's/.*Data://' -e 's/ 0x00/\\x/g')
> 2024/10/03 10:07:48.173766 length=8 from=11 to=18
92 03 01 22 00 0c f9 5a
2024/10/03 10:07:48 socat[472189] I transferred 8 bytes from 5 to 7
root@wirenboard-A32RE5MO:~# echo -e $(modbus_client -mrtu -pnone -s1 -b115200 /dev/ttyBoiler -a146 -t3 -r 290 -c 12 | grep Data | sed -e 's/.*Data://' -e 's/ 0x00/\\x/g')
> 2024/10/03 10:07:50.359942 length=8 from=19 to=26
92 03 01 22 00 0c f9 5a
2024/10/03 10:07:50 socat[472189] I transferred 8 bytes from 5 to 7
root@wirenboard-A32RE5MO:~# pkill socat
2024/10/03 10:08:04 socat[472189] N socat_signal(): handling signal 15
2024/10/03 10:08:04 socat[472189] W exiting on signal 15
2024/10/03 10:08:04 socat[472189] N socat_signal(): finishing signal 15
2024/10/03 10:08:04 socat[472189] N exit(143)
2024/10/03 10:08:04 socat[472189] I close(5)
2024/10/03 10:08:04 socat[472189] I shutdown(7, 2)
root@wirenboard-A32RE5MO:~# socat -d -d -d -x PTY,raw,b115200,parenb=0,cstopb=1,cs8,,link=/dev/ttyBoiler tcp:192.168.214.14:20108&
[2] 473126
[1] Exit 143 socat -d -d -d -x PTY,raw,b115200,parenb=0,cstopb=1,cs8,,link=/dev/ttyBoiler tcp:192.168.214.14:20108
root@wirenboard-A32RE5MO:~# 2024/10/03 10:08:09 socat[473126] I socat by Gerhard Rieger and contributors - see www.dest-unreach.org
2024/10/03 10:08:09 socat[473126] I This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/)
2024/10/03 10:08:09 socat[473126] I This product includes software written by Tim Hudson (tjh@cryptsoft.com)
2024/10/03 10:08:09 socat[473126] I setting option "raw"
2024/10/03 10:08:09 socat[473126] I setting option "b115200"
2024/10/03 10:08:09 socat[473126] I setting option "parenb" to 0
2024/10/03 10:08:09 socat[473126] I setting option "cstopb" to 1
2024/10/03 10:08:09 socat[473126] I setting option "cs8"
2024/10/03 10:08:09 socat[473126] I setting option "symbolic-link" to "/dev/ttyBoiler"
2024/10/03 10:08:09 socat[473126] I openpty({5}, {6}, {"/dev/pts/1"},,) -> 0
2024/10/03 10:08:09 socat[473126] N PTY is /dev/pts/1
2024/10/03 10:08:09 socat[473126] N opening connection to AF=2 192.168.214.14:20108
2024/10/03 10:08:09 socat[473126] I starting connect loop
2024/10/03 10:08:09 socat[473126] I socket(2, 1, 6) -> 7
2024/10/03 10:08:09 socat[473126] N successfully connected from local address AF=2 192.168.214.11:51450
2024/10/03 10:08:09 socat[473126] I resolved and opened all sock addresses
2024/10/03 10:08:09 socat[473126] N starting data transfer loop with FDs [5,5] and [7,7]
^C
root@wirenboard-A32RE5MO:~# echo -e $(modbus_client -mrtu -pnone -s1 -b115200 /dev/ttyBoiler -a146 -t3 -r 290 -c 12 | grep Data | sed -e 's/.*Data://' -e 's/ 0x00/\\x/g')
> 2024/10/03 10:08:13.145097 length=8 from=0 to=7
92 03 01 22 00 0c f9 5a
2024/10/03 10:08:13 socat[473126] I transferred 8 bytes from 5 to 7
< 2024/10/03 10:08:13.150650 length=29 from=0 to=28
92 03 18 00 6d 00 72 00 36 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c6 59
2024/10/03 10:08:13 socat[473126] I transferred 29 bytes from 7 to 5
mr6
Еще несколько моментов, которые могут помочь в диагностике:
- Чтобы связь с WB-MGE восстановилось, контроллер не обязательно перегружать. достаточно перегрузить службу wb-mqtt-serial, и все становится хорошо
- Конфигурационные файлы - в том числе конфигурация mqtt-serial - были перенесены с контроллера версии 6.7 (делал миграцию, а не чистую установку).
- Даже когда все работает конфигуратор пишет “Нет связи с устройством”. Хотя устройства опрашиваются и управляются без проблем. Ниже скрин - одно и то же устройство в одно и то же время в конфигураторе (недоступно) и в “Устройствах” (доступно и опрашивается)
PS. wb-mqtt-serial я предварительно обновил, как и говорили. + свежий диаг.
diag_output_A32RE5MO_2024-10-03-10.19.32.zip (536,8 КБ)