Menu

#800 UPS support for Megatec USB UPSs fails

closed
nobody
Others (142)
5
2012-10-28
2010-10-01
Brian Smith
No

NUT claims to support Megatec protocol UPSs via USB connections, but the support doesn't actually work.

There are two problems:

The UPS pretends to be an HID-compliant device when it isn't, so the kernel loads an HID driver for it, when the HID driver won't work. It needs to be added to the usb_quirks list in /usr/src/sys/dev/usb/usb_quirks.c (and therefore to usbdevs in the same directory) so the kernel will properly ignore its HID-ness and load a ugen driver for it.

Communication with the UPS is via NUT's blazer_usb driver, which uses libusb's usb_get_string_simple, which always attempts to ask the USB device for supported languages before fetching the string. With Megatec's damaged USB implementation, this always fails, and ends communication. You have to skip the language lookup and request the result string first.

Discussion

  • Brian Smith

    Brian Smith - 2010-10-01

    Diffs to get it working

     
  • Brian Smith

    Brian Smith - 2010-10-01

    Added diffs that should get it working. They've been tested on FreeBSD, but not yet on FreeNAS because I haven't got a FreeNAS build to work yet.

     

Log in to post a comment.