APC_MODBUS(8) NUT Manual APC_MODBUS(8) (NAME) apc_modbus - APC Smart-UPS (SYNOPSIS) apc_modbus -h apc_modbus -a UPS_NAME [OPTIONS] (SUPPORTED HARDWARE) UPS APC . . APC ( ) USB HID . : o SMT1500 (Smart-UPS 1500, Firmware 9.6) o SMX750 (Smart-UPS X 750, Firmware 10.1) o SMX1500 (Smart-UPS X 1500, Firmware 15.0) o SMX2200 (Smart-UPS X 2200, Firmware 15.0) . UPS (Advanced Menu) Configuration Modbus . TCP USB . TCP USB libmodbus ( pull request ) NUT . ( NUT ) NUT PR #2063 . UPS . ( ) . ( UPS ). apctest ( "apcupsd") "Test to kill power" . (EXTRA ARGUMENTS) : port = string NUT. USB auto . /dev/usb/hiddev0 API libusb . ( ). port . UPS vendor product vendorid productid serial bus / device . allow_duplicates ( !). vendorid = regex, productid = regex, vendor = regex, product = regex, serial = regex UPS USB . ( regex(7) ) vendor/product/serial UPS ( ) vendorid productid . lsusb(8) NUT -DD . : o -x vendor="Foo.Corporation.*" o -x vendorid="051d*" (APC) o -x product=".*(Smart|Back)-?UPS.*" bus = regex . UPS (bus) . UPS ( bus="002" bus="00[2-3]") /sys/bus/usb/devices lsusb(8) . ( USB) . device = regex . UPS USB . UPS ( device="001" device="00[1-2]") /sys/bus/usb/devices lsusb(8) . . busport = regex . libusb USB device -- . USB lsusb -tv . NUT ( ) NUT . allow_duplicates . UPS ( VID:PID ) . "Resource busy" -- . (non-deterministic) ! ! UPS . ! usb_set_altinterface = bAlternateSetting usb_set_altinterface() USB UPS 0 () . usb_config_index, usb_hid_rep_index, usb_hid_desc_index, usb_hid_ep_in, usb_hid_ep_out (endpoint) (descriptor index) 0 ( ). . usb_hid_desc_index wDescriptorLength ( ) lsusb . LIBUSB_DEBUG = INTEGER USB NUT NUT ( DEBUG_MIN ups.conf(5) driver.debug ) LibUSB . LIBUSB_DEBUG LIBUSB_DEBUG NUT (export) ( nut.conf(5) "export" ) 4 (" "). : o https://libusb.sourceforge.io/api-1.0 o https://libusb.sourceforge.io/api-1.0/group__libusb__lib.html porttype=value . serial RS232/485 tcp TCP/IP usb USB. port=value . usb auto serial /dev/ttyS0 tcp IP example.com:502 . baudrate=num . baudrate 9600 . parity=value () . N (none) E (even) O (odd). parity N (none) . databits=num . databits 8 . stopbits=num . stopbits 1 . slaveid=num slave . slave id 1 . response_timeout_ms=num . libmodbus . TCP . (BUGS) RTU USB (RTU USB support) USB ( TCP ) libmodbus . pull request . libmodbus NUT NUT https://github.com/networkupstools/nut/wiki/APC-UPS-with-Modbus-protocol . : cd ~/ git clone -b rtu_usb https://github.com/networkupstools/libmodbus cd libmodbus ./autogen.sh ./configure --with-libusb --prefix=/path/to/prefix make install o ( --prefix=/usr/local/ups NUT -- sudo ) /tmp `make && sudo make install` . o ./configure --with-libusb --enable-static --disable-shared --prefix=/path/to/prefix libmodbus.a ( /tmp ) Modbus+USB apc_modbus . 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 o configure NUT --prefix, --with-confdir, --with-user --with-group NUT . ./configure --enable-inplace-runtime NUT https://github.com/networkupstools/nut/wiki/Building-NUT-for-in%E2%80%90place-upgrades-or-non%E2%80%90disruptive-tests . UPS NMC (Using host names for UPS NMC) (NMC) UPS IP / ( DHCP) . UPS . DHCP/DNS ( UPS ). UPS IP ( /etc/hosts ). (AUTHORS) o Axel Gembe (SEE ALSO) (The core driver) nutupsdrv(8), ups.conf(5) (Internet resources) NUT (Network UPS Tools): https://www.networkupstools.org/historic/v2.8.5 Network UPS Tools 2.8.5 06/21/2026 APC_MODBUS(8)