I'm attempting to get a HP R1500 G2 UPS working with Solaris 10 connected via USB. Thanks to Arnaud's patch to drivers/tripplite-hid.c found at lists.alioth.debian.org/pipermail/nut-upsuser/2010-February/005887.html things mostly work. upsc ups01 shows a couple of things that don't look quite right. [....] battery.temperature: -234.1 [....] ups.alarm: No battery installed! But the real problem I'm having right now is it does not want to turn off the UPS. --------< ups.conf >-------- [ups01] driver = usbhid-ups port = auto desc = "HP R1500 G2" offdelay = 120 ---------------------------- Here is the last part of the log from "/opt/mt/nut-svn/libexec/usbhid-ups -DDDDD -a ups01 -k" ..... opening /dev/usb/3f0.1fe0/0/cntrl0 opening ep0 failed, -1 usb_open_ep0 failed: 16 usb_close(): hdl=0x0 usb_error(): error=22 usb_devices list: 0: 3f0.1fe0/0 0.017204 Checking device (0000/0000) (/dev/usb/3f0.1fe0/0) usb_open: device ptr is 0x4bea8 usb_open: pindex = 0 usb_open(): usb_open_ep0(): opening /dev/usb/3f0.1fe0/0/cntrl0 opening ep0 failed, -1 usb_open_ep0 failed: 16 usb_strerror(): usb_error_type=2, errno=22 0.018193 Failed to open device, skipping. (Invalid argument) 0.018350 No appropriate HID device found 0.018511 No matching HID UPS found ..... And running it under truus I see thih line 838: open("/dev/usb/3f0.1fe0/0/cntrl0", O_RDWR) Err#16 EBUSY So it looks like maybe it was opened in exclusive mode. Any thoughts? -- Tim Rice Multitalents (707) 887-1469 tim at multitalents.net
On Wed, Apr 7, 2010 at 9:38 PM, Tim Rice <tim at multitalents.net> wrote:> And running it under truus I see thih line > 838: ? ?open("/dev/usb/3f0.1fe0/0/cntrl0", O_RDWR) ? ? ?Err#16 EBUSY > > So it looks like maybe it was opened in exclusive mode. > Any thoughts?USB devices generally need to be opened exclusively. (Technically, the interfaces are opened exclusively, but most UPSes have only one HID interface, and that's what we use.) The intent for the "-k" flag is that the system is ready for the power to be cut, so the first thing I'd check is whether there is another usbhid-ups driver still running. If not, you might need to use "lsof" or something similar to see what else might have claimed the device/interface in the mean time. -- - Charles Lepple
Hi Tim, 2010/4/8 Tim Rice <tim at multitalents.net>> > I'm attempting to get a HP R1500 G2 UPS working with Solaris 10 > connected via USB. > > Thanks to Arnaud's patch to drivers/tripplite-hid.c found at > > lists.alioth.debian.org/pipermail/nut-upsuser/2010-February/005887.html > things mostly work. >thanks for the feedback Tim. Glad to hear it's useful ;-) upsc ups01 shows a couple of things that don't look quite right.> [....] > battery.temperature: -234.1 > [....] > ups.alarm: No battery installed! >I'll have to check this, but not before monday... But the real problem I'm having right now is it does not want to turn> off the UPS. > --------< ups.conf >-------- > [ups01] > driver = usbhid-ups > port = auto > desc = "HP R1500 G2" > offdelay = 120 > ---------------------------- > Here is the last part of the log from > "/opt/mt/nut-svn/libexec/usbhid-ups -DDDDD -a ups01 -k" > ..... > opening /dev/usb/3f0.1fe0/0/cntrl0 > opening ep0 failed, -1 > usb_open_ep0 failed: 16 > usb_close(): hdl=0x0 > usb_error(): error=22 > usb_devices list: > 0: 3f0.1fe0/0 > 0.017204 Checking device (0000/0000) (/dev/usb/3f0.1fe0/0) > usb_open: device ptr is 0x4bea8 > usb_open: pindex = 0 > usb_open(): > usb_open_ep0(): > opening /dev/usb/3f0.1fe0/0/cntrl0 > opening ep0 failed, -1 > usb_open_ep0 failed: 16 > usb_strerror(): usb_error_type=2, errno=22 > 0.018193 Failed to open device, skipping. (Invalid argument) > 0.018350 No appropriate HID device found > 0.018511 No matching HID UPS found > ..... > > And running it under truus I see thih line > 838: open("/dev/usb/3f0.1fe0/0/cntrl0", O_RDWR) Err#16 EBUSY > > So it looks like maybe it was opened in exclusive mode. > Any thoughts? >as Charles told, check that no other usbhid-ups instance is running. on solaris, libusb is based on the ugen kernel driver, which doesn't support multi access... cheers, Arnaud -- Linux / Unix Expert R&D - Eaton - eaton.com/mgeops Network UPS Tools (NUT) Project Leader - networkupstools.org Debian Developer - debian.org Free Software Developer - arnaud.quette.free.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: <lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20100409/ad76af19/attachment.htm>