On Feb 14, 2015, at 2:43 PM, J Neethling <[email protected]> wrote:
> 67611 blazer_usb CALL write(0x2,0x7fffffffd2a0,0xc) > 67611 blazer_usb GIO fd 2 wrote 12 bytes > " 0.280697 " > 67611 blazer_usb RET write 12/0xc > 67611 blazer_usb CALL write(0x2,0x7fffffffd2a0,0x35) > 67611 blazer_usb GIO fd 2 wrote 53 bytes > "read: (229.6 219.5 220.0 021 49.7 2.25 18.5 00000001 > " Here's the strange part: the driver successfully queried the UPS once, and got a valid string back. > 67611 blazer_usb CALL ioctl(0x4,USB_DO_REQUEST,0x7fffffffe030) > 67611 blazer_usb RET ioctl -1 errno 5 Input/output error However, this part indicates that there is a disconnect between the NUT driver (which printed "Permissions problem" due to an EPERM return code somewhere), and the kernel driver, which returned EIO. Sadly, all nonzero error codes get mapped to EIO here: http://fxr.watson.org/fxr/source/dev/usb/usb_generic.c?v=FREEBSD92;im=10#L911 If we look further into the kernel driver, it appears that there are some debugging messages: http://fxr.watson.org/fxr/source/dev/usb/usb_request.c?v=FREEBSD92;im=10#L393 It is unclear as to whether this can be enabled with a sysctl (hw.usb.debug), or if additional #defines are needed. For this, you might want to check with the FreeNAS folks, or try the FreeBSD USB list. This is a bit of wishful thinking, but NUT 2.7.2 also has a newer driver for Megatec equipment: nutdrv_qx. While I don't recall any FreeBSD-specific tweaks to it, trying it would probably be faster than recompiling the kernel, and there is little to lose. -- Charles Lepple clepple@gmail _______________________________________________ Nut-upsuser mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

