16 348
правок
(Новая страница: «==Useful links== * [https://habr.com/p/772308/ Upgrading Modbus: arbitration, bus scanning, events] - an article with details on implementing the extension * [https://github.com/wirenboard/wb-modbus-ext-scanner/blob/main/protocol.md Extension description on GitHub] * Modbus protocol description * [https://github.com/wirenboard/wb-modbus-ext-scanner Scanning utility repository]») Метки: правка с мобильного устройства правка из мобильной версии |
|||
Строка 111: | Строка 111: | ||
# Install the utility using the command: | # Install the utility using the command: | ||
#:<syntaxhighlight lang="bash"> | #:<syntaxhighlight lang="bash"> | ||
apt update && apt install wb-modbus-ext-scanner | apt update && apt install wb-modbus-ext-scanner | ||
</syntaxhighlight> | </syntaxhighlight> | ||
# Stop the wb-mqtt-serial driver using the command: | # Stop the wb-mqtt-serial driver using the command: | ||
#:<syntaxhighlight lang="bash"> | #:<syntaxhighlight lang="bash"> | ||
systemctl stop wb-mqtt-serial | systemctl stop wb-mqtt-serial | ||
</syntaxhighlight> | </syntaxhighlight> | ||
# Execute the command: | # Execute the command: | ||
#:<syntaxhighlight lang="bash"> | #:<syntaxhighlight lang="bash"> | ||
wb-modbus-scanner -d /dev/ttyRS485-1 -b 115200 -s 4267937719 -i 3 | wb-modbus-scanner -d /dev/ttyRS485-1 -b 115200 -s 4267937719 -i 3 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
# Where, /dev/ttyRS485-1 is the port to which the device is connected, | # Where, /dev/ttyRS485-1 is the port to which the device is connected, | ||
# 115200 is the exchange rate, | # 115200 is the exchange rate, | ||
Строка 133: | Строка 127: | ||
# 3 is the new slave ID. | # 3 is the new slave ID. | ||
# As a result, the following output should appear: | # As a result, the following output should appear: | ||
#:<syntaxhighlight lang="bash"> | #:<syntaxhighlight lang="bash"> | ||
Serial port: /dev/ttyRS485-1 | Serial port: /dev/ttyRS485-1 | ||
Строка 139: | Строка 132: | ||
Change ID for device with serial 4267937719 [FE638FB7] New ID: 3 | Change ID for device with serial 4267937719 [FE638FB7] New ID: 3 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
# Start the wb-mqtt-serial driver again using the command: | # Start the wb-mqtt-serial driver again using the command: | ||
#:<syntaxhighlight lang="bash"> | #:<syntaxhighlight lang="bash"> | ||
systemctl start wb-mqtt-serial | systemctl start wb-mqtt-serial | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Support for scanning in firmware === | === Support for scanning in firmware === |