BLAZER_USB(8)

๐Ÿ’– blazer_usb โ€” the NUT manual page, but make it make sense ๐Ÿ’–

so bestie, this is the NUT Manual page for blazer_usb(8), and we're gonna get through it together. Part 1 is right here, and there's more coming, so don't go anywhere ๐Ÿ‘‘


๐ŸŒธ NAME ๐ŸŒธ

blazer_usb โ€” Driver for Megatec/Q1 protocol USB based UPS equipment. That's the whole job description. It talks to your UPS so your computer knows what's up ๐Ÿ”Œโœจ

โœจ SYNOPSIS โœจ

Like, how do you even run this thing? Two ways:

blazer_usb -h
blazer_usb -a UPS_NAME [OPTIONS]

first one is the "help me pls" version, second one is the "okay actually do the thing" version ๐Ÿ’…

๐Ÿ“Œ NOTE ๐Ÿ“Œ

okay real talk โ€” this man page is only about the hardware-specific stuff for the blazer driver. Everything about the core driver (the generic NUT driver machinery, the shared options, all that) lives over in nutupsdrv(8). So if you're looking for something and it's not here, that's where it went ๐Ÿซถ

๐Ÿ“Œ NOTE ๐Ÿ“Œ

and now for the part nobody wants to hear ๐Ÿ˜ญ this driver is deprecated and will not receive new development. No new glow-ups. No new features. It is what it is.

So like โ€” if it already works for managing your devices, cool, fine, carry on, slay. But if you're out here trying to set up a new device with it? Bestie. Please consider the newer nutdrv_qx(8) instead. That one should handle all Q* protocol variants for NUT, and it's the one getting the attention ๐Ÿ‘‘

Also! Please do report if your device works with this driver but nutdrv_qx(8) would not actually support it with any subdriver. That's genuinely useful info and we wanna know ๐Ÿ™ˆ

fr fr, deprecated doesn't mean broken โ€” it means "don't expect new stuff," and for a new setup, nutdrv_qx(8) is the main character โœจ

๐Ÿ”ฅ SUPPORTED HARDWARE ๐Ÿ”ฅ

The blazer driver is known to work with various UPSes from Blazer, Energy Sistem, Fenton Technologies, General Electric, Mustek and many others. The NUT compatibility table lists all the known supported models โ€” that's your vibe check list ๐Ÿ“‹

Keep in mind, however, that other models not listed there may also be supported, but haven't been tested. So it's not a "no", it's a "we literally don't know yet" ๐Ÿคทโ™€๏ธ

All devices with a serial interface (use the blazer_ser driver) and many with a USB interface (use the blazer_usb driver) are supported.

so if your UPS plugs in with a serial cable โ†’ blazer_ser. If it's USB โ†’ blazer_usb. Matching the driver to the cable is the whole game ๐Ÿ’–

โœจ EXTRA ARGUMENTS โœจ

okay so depending on the make and model of your UPS, you might need to override some values or hand the driver some defaults ๐Ÿ’…. The ones below are the glow-up candidates that most likely need changing (peep ups.conf(5) for the deets):

  • default.battery.voltage.high = value โ€” the max battery voltage you hit after roughly 12 to 24 hours of charging โšก. If you want the driver to report a guesstimated battery.charge, bestie you gotta set this (see BATTERY CHARGE GUESSTIMATION).
  • default.battery.voltage.low = value โ€” the minimum battery voltage right before the UPS auto-shuts-down ๐Ÿ˜ด. Same energy: if you want that guesstimated battery.charge, you need to specify this (again, see BATTERY CHARGE GUESSTIMATION).
  • default.battery.voltage.nominal = value, override.battery.voltage.nominal = value โ€” some devices are out here showing a totally wrong nominal battery voltage (or none at all ๐Ÿ™ˆ), so you may need to override or set a default value.
  • override.battery.packs = value โ€” some devices only report a part of the total battery voltage. Like, if battery.voltage.nominal is 24 V but it reports a battery.voltage of around 2 V, the number of battery.packs to fix that reading would be 12. The driver will attempt to detect this automatically, but if that fails somehow, you might wanna override it.
  • ondelay = value โ€” how long to wait before switching the UPS on (in minutes) โฐ. Heads up: a value below 3 minutes may cause earlier firmware versions to not switch on automatically, so it defaults to 3 minutes. The acceptable range is 0..9999 minutes.
  • offdelay = value โ€” how long to wait before shutting the UPS down (in seconds). This value gets truncated to units of 6 seconds (when it's less than 60 seconds) or 60 seconds (when it's more than 60 seconds). Defaults to 30 seconds. The acceptable range is 12..600 seconds.
  • norating โ€” some UPSes will literally lock up ๐Ÿ’€ if you try to read rating information from them. Setting this flag makes the driver skip that step entirely.
  • novendor โ€” same vibe, different data: some UPSes lock up if you try to read vendor information. Setting this flag makes the driver skip it.
  • protocol = string โ€” skip the autodetection of which protocol to use and only use the one you specify. Supported values are megatec, megatec/old, mustek and zinto.
  • runtimecal = value,value,value,value โ€” parameter used in the (optional) runtime estimation. This takes two runtimes at different loads ๐Ÿ“Š. Typically you use the runtime at full load and the runtime at half load. For instance, if your UPS has a rated runtime of 240 seconds at full load and 720 seconds at half load, you'd enter:
runtimecal = 240,100,720,50

The first load should always be higher than the second. If you've got values for loads other than 100 and 50 % respectively, you can use those too โ€” but keep them spaced apart as far as reasonably possible. Just don't get too close to no load (prediction of runtime depends more on idle load for the battery then).

  • chargetime = value โ€” the time needed to fully recharge the battery after being fully discharged ๐Ÿ”‹. If you don't specify it, the driver defaults to 43200 seconds (12 hours). Only used if runtimecal is also specified.
  • idleload = value โ€” minimum battery load used by the driver to estimate the runtime. If you don't specify it, the driver defaults to 10%. Only used if runtimecal is also specified.

๐Ÿ”Œ USB INTERFACE ONLY ๐Ÿ”Œ

  • port = string โ€” required option for all NUT drivers, no skips. Some value must be set, typically auto for drivers that handle USB connections.
Note ๐Ÿ“ This could be a device filesystem path like /dev/usb/hiddev0, but the current use of the libusb API precludes knowing and matching by such identifiers. They may also be inherently unreliable (dependent on re-plugging and enumeration order). At this time the actual value is ignored, but syntactically some port configuration must still be there.

It is possible to control multiple UPS units simultaneously by running several instances of this driver, provided they can be uniquely distinguished by setting some combination of the vendor, product, vendorid, productid, serial, bus and/or device options detailed below. For devices or operating systems that do not provide sufficient information, the allow_duplicates option can be of use (limited and risky!) ๐Ÿ˜ฌ

  • vendorid = regex, productid = regex, vendor = regex, product = regex, serial = regex โ€” select a specific UPS, in case there's more than one connected via USB. Each option specifies an extended regular expression (see regex(7) for more on regular expressions), which must match the UPS's entire respective vendor/product/serial string values (minus any surrounding whitespace), or the whole 4-digit hexadecimal code for vendorid and productid.

Try lsusb(8) or running this NUT driver with the -DD command-line argument for finding out the strings to match ๐Ÿ”.

Examples:

  • -x vendor="Foo.Corporation.*"
  • -x vendorid="051d*" (APC)
  • -x product=".*(Smart|Back)-?UPS.*"
  • bus = regex โ€” OPTIONAL, NOT RECOMMENDED ๐Ÿ™…โ€โ™€๏ธ

Select a UPS on a specific USB bus or group of buses. The argument is a regular expression that must match the bus name where the UPS is connected (e.g. bus="002" or bus="00[2-3]") as seen on Linux in /sys/bus/usb/devices or lsusb(8); including leading zeroes.

Note ๐Ÿ“ Bus numbers are not guaranteed by the OS to be stable across re-boots, kernel driver reloads or device re-plugging (e.g. changing visible population of USB hubs).
  • device = regex โ€” OPTIONAL, NOT RECOMMENDED ๐Ÿ™…โ€โ™€๏ธ

Select a UPS on a specific USB device or group of devices. The argument is a regular expression that must match the device name where the UPS is connected (e.g. device="001" or device="00[1-2]") as seen on Linux in /sys/bus/usb/devices or lsusb(8); including leading zeroes.

Note ๐Ÿ“ Device numbers are not guaranteed by the OS to be stable across re-boots or device re-plugging.
  • busport = regex โ€” OPTIONAL, NOT RECOMMENDED ๐Ÿ™…โ€โ™€๏ธ

If supported by the hardware, OS and libusb on the particular deployment, this option should let you specify physical port numbers on a USB hub, rather than logical device enumeration values โ€” and in turn, this should be less volatile across reboots or re-plugging. The value may be seen in the USB topology output of lsusb -tv on systems with that tool, for example.

Note ๐Ÿ“ This option is not practically supported by some NUT builds (it should be ignored with a warning then), and not by all systems that NUT can run on.
  • allow_duplicates โ€” OPTIONAL, NOT RECOMMENDED ๐Ÿ™…โ€โ™€๏ธ

If you have several UPS devices that may not be uniquely identified by the options above (e.g. only VID:PID can be discovered there), this flag allows each driver instance where it is set to take the first match if available, or proceed to try another.

Normally the driver initialization would abort at this point claiming "Resource busy" or a similar error, assuming that the otherwise properly matched device is unique โ€” and some other process already handles it.

Warning ๐Ÿšจ This feature is inherently non-deterministic! The association of driver instance name to actual device may vary between runs! If you only care to know that at least one of your no-name UPSes is online, this option can help ๐Ÿซถ If you must really know which one, it will not! ๐Ÿ’€
  • usb_set_altinterface = bAlternateSetting โ€” force a redundant call to usb_set_altinterface(), especially if it's needed for devices serving multiple USB roles where the UPS is not represented by the interface number 0 (the default).
  • usb_config_index, usb_hid_rep_index, usb_hid_desc_index, usb_hid_ep_in, usb_hid_ep_out โ€” force use of specific interface, endpoint, descriptor index etc. numbers, rather than defaulting to 0 (rarely other values in certain drivers for some devices known to use non-zero numbers). Specified as a hexadecimal number.

As a rule of thumb for usb_hid_desc_index discovery, you can see larger wDescriptorLength values (roughly 600+ bytes) in reports of lsusb or similar tools ๐Ÿ‘€

  • LIBUSB_DEBUG = INTEGER โ€” run-time troubleshooting of USB-capable NUT drivers can involve not only raising the common NUT debug verbosity (e.g. using the DEBUG_MIN setting in ups.conf(5) or protocol commands to change the driver.debug value), but may also benefit from LibUSB-specific debugging.

For the latter, you can set the LIBUSB_DEBUG driver option; alternatively you can classically export the environment variable LIBUSB_DEBUG before starting a NUT driver program (may be set and "exported" in driver init script or service method, perhaps via nut.conf(5)), to a numeric value such as 4 ("All messages are emitted") ๐Ÿ”Š

For more details, including the currently supported values for your version of the library, see e.g.:

  • subdriver = string โ€” select a serial-over-USB subdriver to use. You've got a choice between phoenix, ippon, cypress, and krauler. When using this option, it is mandatory to also specify the vendorid and productid โš ๏ธ
  • langid_fix = value โ€” apply the language ID workaround to the krauler subdriver. This is mandatory for some devices to work (LDLC, Dynamix and others). You must provide a value (0x409 or 0x4095), according to your device entry in the NUT hardware compatibility list (HCL) ๐Ÿ’–

๐ŸŽฎ UPS COMMANDS ๐ŸŽฎ

okay so this driver supports some instant commands โ€” you know, the ones you fire off with upscmd(8). Here's the whole menu, bestie:

  • beeper.toggle โ€” flips the UPS beeper on/off. (Not available on some hardware, so don't come for me if it ghosts you. ๐Ÿ’€)
  • load.on โ€” turns the load back on, right now, immediately, no waiting. โœจ
  • load.off โ€” turns the load off immediately. โš ๏ธ (go check KNOWN PROBLEMS before you do this one, fr fr)
  • shutdown.return โ€” turns the load off and then brings it back when the power comes back. It uses the timers you set with ondelay and offdelay.
  • shutdown.stayoff โ€” turns the load off and keeps it off. (again: KNOWN PROBLEMS, look it up ๐Ÿ™ˆ) Uses the timer from offdelay.
  • shutdown.stop โ€” stops a shutdown that's already in progress. the save button basically. ๐Ÿ›‘
  • test.battery.start.deep โ€” runs a long battery test. (Not available on some hardware.)
  • test.battery.start.quick โ€” runs a quick battery test (like, 10 seconds quick).
  • test.battery.start value โ€” runs a battery test for value minutes. you pick the number, bestie.
  • test.battery.stop โ€” stops a battery test that's currently running (not available on some hardware.)

๐Ÿ”‹ BATTERY CHARGE GUESSTIMATION ๐Ÿ”‹

okay so literally due to popular demand (the people spoke!!), this driver will report a guesstimated battery.charge value and optionally battery.runtime โ€” but only if you set a couple of those EXTRA ARGUMENTS we talked about earlier. ๐Ÿ‘‘

If you put both battery.voltage.high and battery.voltage.low in ups.conf(5), but you don't enter runtimecal, it'll guesstimate the state of charge just by looking at the battery voltage alone. and bestie, this is not reliable under load. it only gives you reasonably accurate readings if you disconnect the load, let the battery chill for a couple of minutes, and then measure the open cell voltage. which likeโ€ฆ is just not practical when the power already went out and your UPS is busy keeping your systems alive. ๐Ÿ˜ญ

                        battery.voltage - battery.voltage.low
battery.charge =  ------------------------------------------ x 100 %
                  battery.voltage.high - battery.voltage.low

Now, there IS a way to get better readings without disconnecting the load โ€” but it means you have to keep track of how much current (and how fast) is going in and out of the battery. If you specified runtimecal, the driver will attempt to do this. โš ๏ธ But heads up: this heavily relies on the values you enter, and the UPS must be able to report the load too. And there are quite a couple of devices out there that report 0% (or some other fixed value) at all times โ€” in which case, yeah, this obviously doesn't work. ๐Ÿ™ƒ

The driver also has no way of determining the degradation of the battery capacity over time, so that's a you problem (fix it by adjusting the values in runtimecal). Also note the driver guesses the initial state of charge based on the battery voltage, so it may come in at less than 100% even when you're 100% certain they're full. there's just no way to reliably measure it between 0 and 100% full charge. that's the vibe. ๐ŸŒธ

This is better than nothing (but not by much). If any of the above calculations are giving you incorrect readings, remember that you are the one who put in the values in ups.conf(5), so don't complain to the author. ๐Ÿ’… If you need something better, consider buying a UPS that reports battery.charge and battery.runtime all by itself without the help of a NUT driver.

๐Ÿ’Œ NOTES FOR THE PREVIOUS USER OF MEGATEC DRIVERS ๐Ÿ’Œ

Since the blazer drivers replaced the megatec ones, if you're switching over to blazer you might need to change some config. sorry not sorry, glow-up requires adjustments. ๐Ÿฆ‹

Part of that: the following megatec options in ups.conf have to be changed:

  • battvolts โ€” you need to use default.battery.voltage.high and default.battery.voltage.low instead.
  • dtr and rts โ€” you need to use cablepower instead.
  • ignoreoff โ€” this parameter can simply be discarded, since it was a wrong understanding of the specification. bye boo ๐Ÿ‘‹

๐Ÿ’€ KNOWN PROBLEMS ๐Ÿ’€

Some UPS commands aren't supported by all models. In most cases, the driver will send a message to the system log when the user tries to execute an unsupported command. Unfortunately, some models don't even provide a way for the driver to check for this, so the unsupported commands will silently fail. no error, no nothing, just vibes. ๐Ÿ™ˆ

Both the load.off and shutdown.stayoff instant commands are meant to turn the load off indefinitely. However, some UPS models don't allow this. โš ๏ธ

Some models report a bogus value for the beeper status (it'll always show as enabled or always as disabled). So the beeper.toggle command may appear to have no effect in the status reported by the driver when, in fact, it's working fine. gaslighting, but make it hardware. ๐Ÿ˜ญ

The temperature and load value is known to be bogus in some models. just so you know. ๐Ÿ”ฅ


๐Ÿ‘‘ AUTHORS ๐Ÿ‘‘

  • Arjen de Korte <adkorte-guest at alioth.debian.org>
  • Alexander Gordeev <lasaine at lvk.cs.msu.su>

๐ŸŒˆ SEE ALSO ๐ŸŒˆ

blazer_ser(8), nutupsdrv(8), upsc(8), upscmd(8), upsrw(8)

๐ŸŒ Internet Resources:


and that's the whole page bestie, you made it to the end!! ๐ŸŽ€ this iconic little number is from Network UPS Tools 2.8.5, dated 10/07/2026, and it's BLAZER_USB(8). go forth and UPS responsibly. ๐Ÿ’–โœจ

๐Ÿ“ฆ where this page comes from