12 063
правки
(Новая страница: «=== Register reading example === Let's check whether it is true that we are connected to the module of the desired type. (Module wb-mqtt-serial needs to be stoppe…») |
|||
Строка 470: | Строка 470: | ||
The Wiren Board controller software includes modbus_client utility to work with devices connected to the RS-485 outputs, via Modbus Protocol, the detailed description of the command is on the page [[Modbus-client/en| Modbus client]]. Access to the command line is described in [[SSH/en| SSH]]. | The Wiren Board controller software includes modbus_client utility to work with devices connected to the RS-485 outputs, via Modbus Protocol, the detailed description of the command is on the page [[Modbus-client/en| Modbus client]]. Access to the command line is described in [[SSH/en| SSH]]. | ||
=== | === Register reading example === | ||
Let's check whether it is true that we are connected to the module of the desired type. (Module wb-mqtt-serial needs to be stopped). At address 200, a unique signature of 6 registers is stored. Let's read 6 registers, starting with the address 200, and convert the received hexadecimal answer into a character string: | |||
<syntaxhighlight lang="bash">echo -e `modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 \ | <syntaxhighlight lang="bash">echo -e `modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 \ |
правки