HUAWEI-UPS2000(8)
π huawei-ups2000 π
okay bestie, this is a page from the NUT Manual β section 8, the driver man page. let's get into it π
β¨ NAME β¨
huawei-ups2000 β the driver for the Huawei UPS2000 (1kVA-3kVA) UPS, and it talks over USB or RS-232 serial Modbus. that's it, that's the vibe π¦
β¨ SYNOPSIS β¨
huawei-ups2000 -h
huawei-ups2000 -a DEVICE_NAME [OPTIONS]
Note π this man page ONLY documents the hardware-specific stuff of thehuawei-ups2000driver. for the core driver tea, go readnutupsdrv(8). iykyk.
πΈ SUPPORTED HARDWARE πΈ
so this driver supports the Huawei UPS2000 series, online (double conversion) UPS, and here's what it's giving:
- Output power: 1 kVA to 3 kVA. higher power models are unsupported, sorry bestie π
- Connection: USB or RS-232 β and ngl there ARE driver compatibility issues, so read the CABLING section carefully, fr fr.
- USB: for most models you need Linux 5.12 or a newer kernel, and Windows also needs an additional serial port driver. for other Unix-like systems, driver incompatibility exists, so just use RS-232.
- RS-232: always supported. iconic, reliable, periodt. β¨
- RS-485: untested. testers needed π
- Operating system: Unix/Linux supported by default, Windows requires NUT v2.8.5 or newer.
the UPS2000 series has two variants: the UPS2000-A with a tower chassis, and the UPS2000-G with a rack-mount chassis. and within those two variants there are two sub-variants: a standard runtime model powered by an internal battery pack (denoted by an "S" suffix) and a long runtime model powered by an external battery pack (denoted by an "L" suffix). slay.
all of these models should be equally supported. currently it's been tested on these:
UPS2000-A-1KTTS(firmware:UPS2000A,V2R1C1SPC40,P1.0-D1.0)UPS2000-A-1KTTS(firmware:UPS2000A,V2R1C1SPC50,P1.0-D1.0)UPS2000-A-2KTTS(firmware:UPS2000A,V2R1C1SPC50,P1.0-D1.0)UPS2000-G-1KRTS(firmware:UPS2000A,V2R1C1SPC40,P1.0-D1.0)UPS2000-G-1KRTS(firmware:UPS2000G,V2R1C1SPC50,P1.0-D1.0)UPS2000-G-3KRTS(firmware:UPS2000A,V2R1C1SPC40,P1.0-D1.0)UPS2000-G-3KRTS(firmware:UPS2000G,V2R1C1SPC50,P1.0-D1.0)UPS2000-G-3KRTL(firmware:UPS2000A,V2R1C1SPC40,P1.0-D1.0)
if your model isn't in that list, we are begging you to report successful or unsuccessful results to the bug tracker or the mailing list π and make sure you include the full model number of your UPS manually in your report, because so many units only report themselves as "UPS2000-A" regardless of their actual model β including the G series. the way that these UPSes just lie about who they are π
as of 2022, there's also a new hardware variant with a WCH CH341 USB-to-serial chip instead of a MaxLinear/Exar RX21V1410 chip, and it reports itself as "UPS2000G". driver support has been added since v0.03. glow up β¨
also huawei-ups2000 uses the libmodbus project for its Modbus implementation. cute.
π CABLING π
the UPS has a USB port and a RS-232 port. USB is conditionally supported, depending on hardware driver availability. RS-232 is always supported on all operating systems, and it can be used as a fallback. the emotional support port, honestly.
on most UPS models, USB is powered by the Exar/MaxLinear RX21V1410 USB-to-serial chip. on Linux it's only usable on Linux 5.12 and later, via the xr_serial kernel module. on Windows, it's also suggested to install an additional device driver. on some newer UPS hardware variants, a WCH CH341 chip is used instead, and those should have better compatibility (via the ch341 Linux kernel module, or Windows Update). see the subsections Linux USB and Windows USB for the details.
only one port can be used at a time. when USB is used, RS-232 should be unplugged from the UPS, and vice versa. further, optional adapter cards β like RS-485 or SNMP β are not supported. they should be removed from the UPS. yes, actually removed. π
because the UPS port can be unresponsive under certain circumstances, it's recommended to power cycle your UPS after making a cabling change, especially after changing the port type. that means:
- turn off the UPS power output via the front panel
- then unplug the UPS from line power input
- wait for the LCD screen to go black
- finally reconnect line power and restart your UPS
no shortcuts bestie, the LCD must go fully black. π€
π§ Linux USB
the USB port on the UPS2000 is originally powered by a MaxLinear/Exar RX21V1410 USB-to-serial converter chip, and it's only supported by Linux 5.12 or newer, via the xr_serial kernel module. its lsusb report is:
04e2:1410 Exar Corp. XR21V1410 USB-UART IC
however, a recent hardware variant switched to the WCH CH341 serial chip:
1a86:5523 QinHeng Electronics CH341 in serial mode, usb to serial port converter
if your unit has a WCH CH341 chip (likely only found in units made after 2022), when the UPS2000 is connected via USB you should see these logs in dmesg:
ch341 2-1.2:1.0: ch341-uart converter detected
usb 2-1.2: ch341-uart converter now attached to ttyUSB0
if so, you should be able to proceed without worrying about kernel compatibility. this CH341 chip has been around for a decade and should be compatible with your system. it's giving dependable π§
on the other hand, if your unit has a MaxLinear/Exar XR21V1410 chip, like most users do, when the UPS2000 is connected via USB to a supported Linux system you should see these logs in dmesg:
xr_serial 1-1.2:1.1: xr_serial converter detected
usb 1-1.2: xr_serial converter now attached to ttyUSB0
the driver must be xr_serial. if your system doesn't have the necessary device driver, you'll get this message instead:
cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
the generic driver cdc_acm is incompatible and cannot be used. you should upgrade your Linux kernel to Linux 5.12 or newer.
Warning β οΈ on an unsupported system, the XR21V1410 USB device can still be recognized as a USB ACM device, but communication is impossible. please don't waste your time on cdc_acm. i'm serious, it will not work, do not do this to yourself π
if you're already running Linux 5.12 or newer kernels but still can't see the xr_serial driver, it means the driver isn't enabled in your kernel build. if you're a regular user, you should file a bug report to your Linux distro maintainers and ask them to enable xr_serial (kernel option CONFIG_USB_SERIAL_XR).
when upgrading the Linux kernel isn't an option, or when you're using another operating system (e.g. FreeBSD), RS-232 must be used. even for CH341 users, you can try this option if USB somehow refuses to work. RS-232 never lets you down π
πͺ Windows USB
Windows Update should automatically install appropriate drivers for your USB device, however, manual intervention may be required in case this process fails. sometimes you gotta do it yourself π
MaxLinear/Exar RX21V1410
for UPS models with a MaxLinear/Exar RX21V1410 USB-to-serial converter chip, an additional device driver may be required.
according to the official manual, it instructs users to install a special MaxLinear device driver called XR21x141x-XP2KVista7-DriversOnly-Vers1.7.0.0. see Huawei UPS2000 (1 kVA-3 kVA) Modbus Protocol Development Guide.
the driver described in the official manual may be outdated or difficult to obtain. if so, please also try downloading the latest driver from the MaxLinear XR21V1410 product page on the Web. at the time of writing, the latest driver is named XR21x_Win10_V2.7.0.0.zip in the Software: Drivers, Windows 10 and newer category.
URLs are available at the bottom of the manual.
WCH CH341
for UPS models with a WCH CH341 USB-to-serial converter chip, an additional device driver may be required.
at the time of writing, the latest driver is named CH341SER.EXE (v3.9, 2024/10/16) as a self-installer, available on the WCH official website. an alternative .zip archive named CH341SER.ZIP with the same version can also be used for manual installation via Device Manager.
URLs are available at the bottom of the manual.
π RS-232
RS-232 is supported on all operating systems, either via a built-in serial port on your computer, or by using an external USB-to-RS-232 converter. if you plan to use a USB-to-RS-232 converter, make sure it's supported by your operating system. vibe check your adapter first π«Ά
π RS-485
RS-485 support is provided by the UPS2000 using an optional adapter card. this driver is untested on RS-485, but the author suspects that RS-485 uses the same serial protocol as RS-232, which should be supported. if you have an RS-485 adapter, we encourage you to report successful or unsuccessful results to the bug tracker or the mailing list. be the main character of this bug report β¨
π οΈ INSTALLATION π οΈ
this driver may not be built by default. you can build it by installing libmodbus (with development packages) and running:
configure --with-serial=yes --with-modbus=yes
you also need to give proper (R/W) permissions on the local serial device file so the NUT driver run-time user can access it. this may need additional setup for start-up scripting, udev or upower rules, to apply the rights on every boot β especially if your device nodes are tracked by a virtual filesystem. it's giving β¨persistenceβ¨
for example, a USB-to-serial converter can be identified as /dev/ttyACM0 or /dev/ttyUSB0 on Linux, or /dev/ttyU0 on FreeBSD (note the capital "U" β do not come for me about the capital U, it matters π
). a built-in serial port can be identified as /dev/ttyS0 on Linux or one of /dev/cua* names on FreeBSD.
π EXTRA ARGUMENTS π
this driver supports the following optional settings in the ups.conf(5) file:
offdelay=valueβ time to wait before shutting down the UPS (in seconds). acceptable range is 6 seconds (0.1 minutes) to 5940 seconds (99 minutes). defaults to 60 seconds. must be a multiple of 6 seconds. to ensure your system has adequate time to shut down after a power failure, it's highly recommended to adjustoffdelay. like, actually do this one. π₯rebootdelay=valueβ time to wait before rebooting the UPS (in seconds). acceptable range is 6 seconds (0.1 minutes) to 5940 seconds (99 minutes). defaults to 60 seconds. must be a multiple of 6 seconds. this is used by theshutdown.reboot.gracefulinstant command. if you've adjustedoffdelay, you should also adjustrebootdelayβ they're a matching set, bestie πondelay=valueβ time to wait before switching on the UPS (in seconds). acceptable range is 60 seconds (1 minutes) to 5940 seconds (99 minutes). defaults to 60 seconds. must be a multiple of 60 seconds (not 6 seconds β read it again, it's a different number). you don't need to adjust this delay unless you have special requirements.
Note π due to hardware limitation, in this driver, ondelay is respected only when line power is available. if a power failure has occurred, the UPS and the load is always immediately switched on, as soon (or as late) as line power is restored. so yeah, that setting is doing less than you think during an actual outage π
π₯ INSTANT COMMANDS π₯
Bestie, this driver ships with a whole lil menu of instant commands, and you run them with upscmd(8) β no cap. Here's the whole list, nothing skipped:
shutdown.stayoffβ wait out anoffdelay, then kill the load. When line power comes back? It stays off. That's the whole vibe. π€shutdown.returnβ after anoffdelay, the load goes off. When line power returns, the load comes back on β possibly after anondelay.
Note π«Ά Normally the load springs back to life the second line power is back. BUT β if line power was never lost in the first place, or it came back unexpectedly in the middle of an ongoing shutdown (the undesirable "power race" condition, which many entry-level products on the market just... fail to recover from π), then the load comes back after an ondelay. So basically UPS2000 is completely unbothered by a power race, and the load is guaranteed to always restart. Iconic behavior honestly. π
shutdown.rebootβ same energy asshutdown.return, except the load gets turned off immediately (6 seconds in this implementation). β‘shutdown.reboot.gracefulβ again likeshutdown.return, except the load goes off after arebootdelay, not anoffdelay. π¦beeper.enableβ turn the UPS beeper on. πbeeper.disableβ turn the UPS beeper off. π€«beeper.toggleβ flip the beeper to whatever it wasn't. πbypass.startβ put the UPS in bypass mode. Use with caution. β οΈ This exposes your equipment to unregulated line power and gives you zero protection from power failures. Also, the UPS may shut down whenever the bypass input voltage goes out of the nominal range. And as a lil warning sign, the UPS beeps once every 10 seconds in bypass mode. π¬
Note The driver does have a basic foolproof mechanism: if the bypass input is already abnormal because of a power failure, the driver refuses to enter bypass mode β it aborts the command and logs an error. BUT it offers no protection after the UPS has entered (or is in the middle of entering) bypass mode. So again: use with caution, bestie. π
bypass.stopβ take the UPS out of bypass mode. βload.onβ turn the load on, right now, immediately. π₯load.offβ turn the load off, right now, immediately. Use with caution β everything on the UPS will lose power. πtest.battery.start.quickβ run a short battery test. πtest.battery.start.deepβ run a long battery test. π§test.battery.stopβ stop a battery test that's currently running. π
π VARIABLES π
This driver also supports some writable runtime variables, and you poke at those with upsrw(8):
ups.beeper.statusβ enable or disable the UPS beeper:disabledorenabled.
Note The beeper can only be disabled completely β it cannot be temporarily muted until the next alarm. But the optionmutedis also accepted for convenience, andmutedis treated as an alias ofdisabled. π
ups.delay.shutdownβ seconds to wait after a shutdown-with-delay command. It's the runtime equivalent ofoffdelay. Go read the description ofoffdelay. β³ups.delay.rebootβ seconds to wait before rebooting the UPS. It's the runtime equivalent ofrebootdelay. Go read the description ofrebootdelay. πups.delay.startβ seconds to wait before restarting the load. It's the runtime equivalent ofondelay. Go read the description ofondelay. πΈ
π KNOWN ISSUES AND BUGS π
Fixed bugs (slay, they're gone)
- Driver v0.03 (NUT v2.8.1) added support for UPS2000G with a WCH CH341 USB-to-serial interface β these models were previously unsupported. π
- Driver v0.04 (NUT v2.8.1) fixed a timeout recovery bug that led to endless read failures and permanent data stalls. π οΈ
- Driver v0.12 (NUT v2.8.5) fixed support for Microsoft Windows β Windows was previously unsupported due to a file locking bug. πͺ
- See Historical bugs at the bottom of this manual for links. π
Battery status has a non-fatal read failure
It's usually harmless and can be safely ignored, fr fr. It's only logged for informative purposes (LOG_INFO), not as a warning or error. So like, don't panic. π
Data stale
Under certain circumstances, some registers can return invalid values and trigger a "data stale" error. Once a data stale error has occurred, you should see error messages similar to the example below in the system log:
huawei-ups2000: register 2002 has invalid value a000,
upsd: Data for UPS [huawei] is stale - check driver
upsd: UPS [huawei] data is no longer stale
So far all known problems have been fixed by the author, but an unknown one cannot be ruled out. If you've encountered "data stale" problems during normal use, please file a bug report with full logs attached. π
Before troubleshooting or reporting a problem, it's important to check your dmesg log for USB connect and disconnect events β otherwise you're out here wasting time on the NUT driver when the actual problem is USB. π€
For example: if someone yanks the cable out of the USB port, or if a new USB device gets plugged into a USB host/hub that is struggling to power its ports (common on single-board computers like Raspberry Pi), or if you've got flaky cabling or EMI noise β due to all these and similar reasons, the serial converter can get disconnected from USB, at least briefly.
This creates a permanent data stale situation, and the driver must be restarted. (Plugging the USB back in won't fix it, since the driver is still using the nonexistent serial device, if the system kernel initializes a new device driver instance internally.) π
These USB problems usually have nothing to do with NUT. If that's the case, you should solve the underlying USB problem β check the cable, check the converter, try a powered USB hub, try a full-speed USB isolator, etc. π
Serial port becomes unresponsive
Some malformed commands are known to lock up the serial port (including USB, which is a USB-to-serial device). Upon receiving them, UPS2000 stops all serial communications. The result is a completely unresponsive UPS, and regardless of what you do β restarting NUT, rebooting the computer β you can NOT restore connectivity, as if someone has unplugged the RS-232 cable. π΅
To recover, simply power cycle the UPS: Turn off the UPS output via the front panel, then unplug the UPS from line power. Wait for the LCD front screen to go black. Finally reconnect line power and restart your UPS. π
That being said, a serial port lockup is unlikely to happen. To our best knowledge, this driver never sends malformed commands to the UPS (it was only a problem during early development). Furthermore, due to a CRC checksum, they're unlikely to be accidentally generated. β¨
Still, we recommend power cycling your UPS after making a cabling change β especially after changing from RS-485/USB to RS-232 β just to ensure the UPS selects the correct communication interface. Also, if you've discovered a reproducible serial port lockup problem, it can be a previously unknown bug, so please make sure to file a bug report. π
USB chip (MaxLinear/Exar RX21V1410) is unsupported
As previously stated, only RS-232 is supported on all systems. On most UPS units, the USB chip RX21V1410 is used, and it requires a device-specific driver xr_serial, which is only available on Linux 5.12 and newer kernels. π§
On an unsupported system, the USB device can still be recognized as a USB ACM device, but in reality, communication is impossible. It can only be fixed by implementing a driver for your system β nothing can be done within NUT. Please use the RS-232 port instead. π
Alternatively, if your unit has a WCH CH341 chip (likely only found in units made after 2022), it should have better compatibility. π¦
See the previous section Cabling for more information.
π AUTHOR π
Yifeng Li <tomli@tomli.me>
π SEE ALSO π
The core driver
Historical bugs
- Commit: support newer UPS2000G/CH341 variants:
https://github.com/networkupstools/nut/commit/59af0780af0db7341ff81d460fc10736458722aa - Issue 1846: huawei-ups2000: Data Stale with Endless "Register has a read failure. Retrying...":
https://github.com/networkupstools/nut/issues/1846 - Commit: fix broken timeout recovery behavior in Issue #1846:
https://github.com/networkupstools/nut/commit/3dae58f403f88dace52e2caac3c0690e45b8ef22 - Issue 3244: USB and serial ports work on Linux but not on Windows (file locking):
https://github.com/networkupstools/nut/issues/3244 - Commit: call
ser_close()beforemodbus_connect(), fix #3244:https://github.com/networkupstools/nut/commit/db2e148503d654726d5520d68e20e71117335813
Windows Drivers
- Huawei UPS2000 (1 kVA-3 kVA) Modbus Protocol Development Guide:
https://support.huawei.com/enterprise/en/doc/EDOC1000110696 - MaxLinear XR21V1410 Product Page:
https://www.maxlinear.com/product/interface/uarts/usb-uarts/xr21v1410 - CH341SER.EXE - Nanjing QinHeng Microelectronics Co., Ltd:
https://www.wch-ic.com/downloads/CH341SER_EXE.html - CH341SER.ZIP - Nanjing QinHeng Microelectronics Co., Ltd:
https://www.wch-ic.com/downloads/CH341SER_ZIP.html
If a download link expires, use a snapshot from the Internet Archive:
- XR21x_Win10_V2.7.0.0.zip:
https://web.archive.org/web/20260310005640if_/https://www.maxlinear.com/Document/index?id=23338&languageid=1033&type=Software%3A%20Drivers&partnumber=XR21V1410 - CH341SER.EXE:
https://web.archive.org/web/20260112182437if_/https://www.wch-ic.com/download/file?id=65 - CH341SER.ZIP:
https://web.archive.org/web/20260217145229if_/https://www.wch-ic.com/download/file?id=5
Internet resources
- The NUT (Network UPS Tools) home page:
https://www.networkupstools.org/historic/v2.8.5/ - Huawei UPS2000-A (1 kVA-3 kVA) User Manual:
https://support.huawei.com/enterprise/en/doc/EDOC1000084260 - Huawei UPS2000 (1 kVA-3 kVA) Modbus Protocol Development Guide:
https://support.huawei.com/enterprise/en/doc/EDOC1000110696 - libmodbus home page:
http://libmodbus.org
and that's the whole page, bestie!! π«Ά you just read Network UPS Tools version 2.8.5, dated 10/07/2026, for HUAWEI-UPS2000(8) β go forth and never let a power race catch you lacking π β¨
π¦ where this page comes from
- fedora 43: nut 2.8.5-9.fc43 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- fedora 43: nut 2.8.5-9.fc43 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- fedora 44: nut 2.8.5-9.fc44 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- fedora 44: nut 2.8.5-9.fc44 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms