Подключил модуль WB-RGB Диммер RGB — Wiren Board. Все по инструкции, но почему-то модуль совсем не хочет работать.
Настройки указал следующие (wb-mqtt-serial.conf):
{
“debug”: true,
“ports”: [
{
“path”: “/dev/ttyAPP1”,
“baud_rate”: 9600,
“data_bits”: 8,
“stop_bits”: 2,
“parity”: “N”,
“enabled”: true,
“devices”: [
{
“device_type”: “WB-MRGB”,
“name”: “wb-mrgb 122”,
“id”: “wb-mrgb_122”,
“slave_id”: 122,
“enabled”: true
}
]
}
]
}
В логи выводится следующее:
Feb 17 05:33:06 wirenboard user.notice serial: Setting up devices at /dev/ttyAPP1
Feb 17 05:33:06 wirenboard user.notice serial: AddDevice: wb-mrgb_122 (WB-MRGB) @ 122 – protocol: modbus
Feb 17 05:33:06 wirenboard user.notice serial: AddRegister: <modbus:122:holding: 1>
Feb 17 05:33:06 wirenboard user.notice serial: AddRegister: <modbus:122:holding: 0>
Feb 17 05:33:06 wirenboard user.notice serial: AddRegister: <modbus:122:holding: 2>
Feb 17 05:33:06 wirenboard user.notice serial: AddRegister: <modbus:122:holding: 6>
Feb 17 05:33:06 wirenboard user.notice serial: AddRegister: <modbus:122:holding: 7>
Feb 17 05:33:06 wirenboard user.notice serial: AddRegister: <modbus:122:holding: 32>
Feb 17 05:33:06 wirenboard user.notice serial: AddRegister: <modbus:122:holding: 33>
Feb 17 05:33:06 wirenboard user.notice serial: Connected with code 0
Feb 17 05:33:06 wirenboard user.notice serial: Subscription succeeded.
Feb 17 05:33:06 wirenboard user.notice serial: Subscription succeeded.
Feb 17 05:33:06 wirenboard user.notice serial: Subscription succeeded.
Feb 17 05:33:06 wirenboard user.notice serial: Subscription succeeded.
Feb 17 05:33:06 wirenboard user.notice serial: Subscription succeeded.
Feb 17 05:33:06 wirenboard user.notice serial: modbus: read 1 holding(s) @ 1 of slave modbus:122
Feb 17 05:33:07 wirenboard user.notice serial: TRegisterHandler::Poll(): warning: Serial protocol error: failed to read holding @ 1 [slave_id is modbus:122(0x7a)]
Feb 17 05:33:07 wirenboard user.notice serial: modbus: read 1 holding(s) @ 0 of slave modbus:122
Feb 17 05:33:07 wirenboard user.notice serial: TRegisterHandler::Poll(): warning: Serial protocol error: failed to read holding @ 0 [slave_id is modbus:122(0x7a)]
Feb 17 05:33:07 wirenboard user.notice serial: modbus: read 1 holding(s) @ 2 of slave modbus:122
Feb 17 05:33:08 wirenboard user.notice serial: TRegisterHandler::Poll(): warning: Serial protocol error: failed to read holding @ 2 [slave_id is modbus:122(0x7a)]
Feb 17 05:33:08 wirenboard user.notice serial: modbus: read 1 holding(s) @ 6 of slave modbus:122
Feb 17 05:33:08 wirenboard user.notice serial: TRegisterHandler::Poll(): warning: Serial protocol error: failed to read holding @ 6 [slave_id is modbus:122(0x7a)]
Feb 17 05:33:08 wirenboard user.notice serial: modbus: read 1 holding(s) @ 7 of slave modbus:122
Feb 17 05:33:09 wirenboard user.notice serial: TRegisterHandler::Poll(): warning: Serial protocol error: failed to read holding @ 7 [slave_id is modbus:122(0x7a)]
Feb 17 05:33:09 wirenboard user.notice serial: modbus: read 1 holding(s) @ 32 of slave modbus:122
…
При попытке запустить wb-mqtt-serial в ручную в отладочном режиме (wb-mqtt-serial -c /etc/wb-mqtt-serial.conf -d) выдает практически то же самое:
root@wirenboard:/dev# wb-mqtt-serial -c /etc/wb-mqtt-serial.conf -d
Setting up devices at /dev/ttyAPP1
AddDevice: wb-mrgb_122 (WB-MRGB) @ 122 – protocol: modbus
AddRegister: <modbus:122:holding: 1>
AddRegister: <modbus:122:holding: 0>
AddRegister: <modbus:122:holding: 2>
AddRegister: <modbus:122:holding: 6>
AddRegister: <modbus:122:holding: 7>
AddRegister: <modbus:122:holding: 32>
AddRegister: <modbus:122:holding: 33>
Connected with code 0
Subscription succeeded.
Subscription succeeded.
Subscription succeeded.
Subscription succeeded.
Subscription succeeded.
modbus: read 1 holding(s) @ 1 of slave modbus:122
TRegisterHandler::Poll(): warning: Serial protocol error: failed to read holding @ 1 [slave_id is modbus:122(0x7a)]
modbus: read 1 holding(s) @ 0 of slave modbus:122
TRegisterHandler::Poll(): warning: Serial protocol error: failed to read holding @ 0 [slave_id is modbus:122(0x7a)]
modbus: read 1 holding(s) @ 2 of slave modbus:122
TRegisterHandler::Poll(): warning: Serial protocol error: failed to read holding @ 2 [slave_id is modbus:122(0x7a)]
modbus: read 1 holding(s) @ 6 of slave modbus:122
TRegisterHandler::Poll(): warning: Serial protocol error: failed to read holding @ 6 [slave_id is modbus:122(0x7a)]
modbus: read 1 holding(s) @ 7 of slave modbus:122
TRegisterHandler::Poll(): warning: Serial protocol error: failed to read holding @ 7 [slave_id is modbus:122(0x7a)]
modbus: read 1 holding(s) @ 32 of slave modbus:122
TRegisterHandler::Poll(): warning: Serial protocol error: failed to read holding @ 32 [slave_id is modbus:122(0x7a)]
modbus: read 1 holding(s) @ 33 of slave modbus:122
TRegisterHandler::Poll(): warning: Serial protocol error: failed to read holding @ 33 [slave_id is modbus:122(0x7a)]
modbus: read 1 holding(s) @ 1 of slave modbus:122
TRegisterHandler::Poll(): warning: Serial protocol error: failed to read holding @ 1 [slave_id is modbus:122(0x7a)]
modbus: read 1 holding(s) @ 0 of slave modbus:122
TRegisterHandler::Poll(): warning: Serial protocol error: failed to read holding @ 0 [slave_id is modbus:122(0x7a)]
modbus: read 1 holding(s) @ 2 of slave modbus:122
TRegisterHandler::Poll(): warning: Serial protocol error: failed to read holding @ 2 [slave_id is modbus:122(0x7a)]
modbus: read 1 holding(s) @ 6 of slave modbus:122
TRegisterHandler::Poll(): warning: Serial protocol error: failed to read holding @ 6 [slave_id is modbus:122(0x7a)]
modbus: read 1 holding(s) @ 7 of slave modbus:122
TRegisterHandler::Poll(): warning: Serial protocol error: failed to read holding @ 7 [slave_id is modbus:122(0x7a)]
modbus: read 1 holding(s) @ 32 of slave modbus:122
TRegisterHandler::Poll(): warning: Serial protocol error: failed to read holding @ 32 [slave_id is modbus:122(0x7a)]
modbus: read 1 holding(s) @ 33 of slave modbus:122
TRegisterHandler::Poll(): warning: Serial protocol error: failed to read holding @ 33 [slave_id is modbus:122(0x7a)]
…
Что делать? Как быть?