Translations:WB Modbus Devices Firmware Update/84/en

Версия от 07:56, 27 августа 2024; A.Degtyarev (обсуждение | вклад) (Новая страница: «{{note|info| '''Attention!''' The instructions consider an example in which the devices operate at a speed of '''115200 8N2'''. In your case, the connection settings may be different.}} To update the firmware: #Connect to the controller twice via SSH, you should have two windows open: the first to create a socat tunnel, the second to send commands to the device. #Stop wb-mqtt-serial: #:<syntaxhighlight lang="bash"> systemctl stop wb-mqtt-serial </...»)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)

Attention! The instructions consider an example in which the devices operate at a speed of 115200 8N2. In your case, the connection settings may be different. To update the firmware:

  1. Connect to the controller twice via SSH, you should have two windows open: the first to create a socat tunnel, the second to send commands to the device.
  2. Stop wb-mqtt-serial:
     
    systemctl stop wb-mqtt-serial
    
  3. In the first window, start the redirect:
     
    socat -d -d -d -x PTY,raw,b115200,parenb=0,cstopb=2,cs8,link=/dev/ttyRS485-5 tcp:192.168.0.7:23
    
    if you have a stable release up to and including wb-2207, instead of the b115200 parameter, use ispeed=115200,ospeed=115200 .
  4. In the second window, change the device port speed to 9600 kbps:
     
    modbus_client --debug -mrtu -b115200 -pnone -s2 /dev/ttyRS485-5 -a58 -t0x06 -r110 96
    
  5. In the first window, terminate the socat connection with Ctrl + C .
  6. In gateway settings set the port speed to 9600 kbps.
  7. In the first window, restart socat forwarding with the new connection parameters:
     
    socat -d -d -d -x PTY,raw,b9600,parenb=0,cstopb=2,cs8,link=/dev/ttyRS485-5 tcp:192.168.0.7:23
    
    if you have a stable release up to and including wb-2207, instead of the b9600 parameter, use ispeed=9600,ospeed=9600 .
  8. In the second window, run the device firmware update, for example, with the wb-mcu-fw-flasher utility (full instructions):
     
    wb-mcu-fw-flasher -j -d /dev/ttyRS485-5 -a25 -f ./firmware.wbfw
    
  9. After finishing the firmware, return the old speed of 115200 kbps to the device:
     
    modbus_client --debug -mrtu -b9600 -pnone -s2 /dev/ttyRS485-5 -a58 -t0x06 -r110 1152
    
  10. In the first window, break the socat connection with Ctrl + C .
  11. In the gateway settings, change the port speed from 9600 kbps to 115200 kbps.
  12. Connect the gateway to the controller via Ethernet.
  13. Run wb-mqtt-serial
     
    systemctl start wb-mqtt-serial