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.
Diffs to get it working
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.
Accepted
Done on rev5421.
See: http://freenas.svn.sourceforge.net/viewvc/freenas/branches/?view=log
Regards,
Michael Zoon