On Jan 31, 2013, at 1:07 AM, Georgi Todorov wrote: > Hello, > > I have a CyberPower CP1500PFCLCD and I'm trying to get nut to see it under > OpenIndiana. All search online suggested that it basically can't happen, but > I decided to ask again, maybe things have changed since then. > > The UPS can be seen by the system: > # /usr/sbin/cfgadm -lv usb9/1.1 > Ap_Id Receptacle Occupant Condition > Information > When Type Busy Phys_Id > usb9/1.1 connected configured ok Mfg: > CP1500PFCLCD Product: CRCA102-3I1 NConfigs: 1 Config: 0 <no cfg str descr> > unavailable usb-input n /devices/pci@0,0/pci15d9,631@1d/hub@1:1.1 > > According to prtconf the device is mapped to /dev/usb/hid2, which points to: > crw------- 1 ups ups 228, 6 2013-01-30 22:20 > /devices/pci@0,0/pci15d9,631@1d/hub@1/input@1:hid_-124_4
NUT uses libusb-0.1 to access the UPS, and libusb needs something like a ugen node (instead of /dev/usb/hid*). A quick search yields the following: http://barbz.com.au/blog/?p=407 ("Compile and Configure NUT on Openindiana") > My ups.conf has: > [cyberpower] > driver = usbhid-ups > port = /dev/usb/hid2 > desc = "CP1500PFCLCD RCA102-3I1 CPS" > > However usbhid-ups doesn't seem to like it: > # usbhid-ups -DDDDDDD -a cyberpower > Network UPS Tools - Generic HID driver 0.37 (2.6.5) > USB communication driver 0.31 > 0.000000 send_to_all: SETINFO driver.parameter.port "/dev/usb/hid2" > 0.000052 debug level is '7' > 0.000331 upsdrv_initups... > 0.001113 No appropriate HID device found > 0.001152 No matching HID UPS found > > Strangely enough if I pass -u root, it ignores my port setting and just tries > to open the first thing in /dev/usb and exists: > # ./usbhid-ups -a cyberpower -DDDDDDD -u root > Network UPS Tools - Generic HID driver 0.37 (2.6.5) > USB communication driver 0.31 > 0.000000 debug level is '7' > 0.000427 upsdrv_initups... > 13.019758 Checking device (0000/0000) (/dev/usb/557.2221/0) > 26.039796 Failed to open device, skipping. (I/O error) > 26.039845 No appropriate HID device found > 26.039874 No matching HID UPS found > This is not entirely unexpected. libusb does not allow specifying a USB device by its path, hence usbhid-ups ignores "port". (There are other parameters to specify the UPS by its USB IDs.) http://www.networkupstools.org/docs/man/usbhid-ups.html#_implementation The difference when you pass "-u root" is that the drivers ordinarily drop permissions (even when started from a root shell), and the unprivileged user doesn't even have permissions to scan the USB bus(es). > If anyone has an idea of how to try and fix this, please let me know. > > Thanks, > Georgi > _______________________________________________ > Nut-upsuser mailing list > Nut-upsuser@lists.alioth.debian.org > http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser -- Charles Lepple clepple@gmail
_______________________________________________ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser