Skip to content

Commit

Permalink
docs/man/apc_modbus.txt, docs/nut.dict: update manpage with instructi…
Browse files Browse the repository at this point in the history
…ons for USB-capable builds [networkupstools#2063]

Signed-off-by: Jim Klimov <[email protected]>
  • Loading branch information
jimklimov committed Mar 22, 2024
1 parent 75a60ec commit 66b3102
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
40 changes: 40 additions & 0 deletions docs/man/apc_modbus.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,46 @@ Set the Modbus slave id. The default slave id is 1.
Set the Modbus response timeout. The default timeout is set by libmodbus. It can
be good to set a higher timeout on TCP connections with high latency.

BUGS
----

This driver relies on advanced features of `libmodbus` to talk Modbus protocol
over USB specifically (Serial and TCP are part of common library codebase).
At the time of this writing, the common library project is just expecting a
merge of the pull request with this ability.

For the time being, if your OS distribution does not ship the required feature
set, you may have to build your own `libmodbus` and subsequently (re-)build NUT
against this library, as detailed in the NUT GitHub Wiki at
https://github.com/networkupstools/nut/wiki/APC-UPS-with-Modbus-protocol

The short sequence may be like follows:
------
cd ~/
git clone -b rtu_usb https://github.com/networkupstools/libmodbus
cd libmodbus
./autogen.sh
./configure --with-libusb --prefix=/path/to/prefix
make install

cd ~/
git clone https://github.com/networkupstools/nut
cd nut
./autogen.sh
./configure --with-drivers=apc_modbus --with-usb --with-modbus \
--with-modbus-includes=-I/path/to/prefix/include/modbus \
--with-modbus-libs="-L/path/to/prefix/lib -lmodbus"
make
------

NOTE: Other `configure` options may be needed for proper behavior, such as
`--prefix`, `--with-sysconfdir`, `--with-user` and `--with-group` to match
your packaged or otherwise preceding NUT installation.

The `./configure --enable-inplace-runtime` may be a good start to inherit
build configuration from an existing NUT deployment, as further detailed at
https://github.com/networkupstools/nut/wiki/Building-NUT-for-in%E2%80%90place-upgrades-or-non%E2%80%90disruptive-tests

AUTHORS
-------

Expand Down
4 changes: 3 additions & 1 deletion docs/nut.dict
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
personal_ws-1.1 en 3478 utf-8
personal_ws-1.1 en 3480 utf-8
AAC
AAS
ABI
Expand Down Expand Up @@ -2431,6 +2431,7 @@ lk
lldb
llvm
lm
lmodbus
ln
lnetsnmp
loadPercentage
Expand Down Expand Up @@ -2940,6 +2941,7 @@ rqt
rsa
rsync
rts
rtu
ru
rubygem
runlevel
Expand Down

0 comments on commit 66b3102

Please sign in to comment.