Date: Fri, 19 Jul 2024 14:53:07 +1000 From: Graham Menhennitt <graham@menhennitt.com.au> To: freebsd-ports@freebsd.org Subject: Re: Nut can't open Mini-Box OPEN-UPS2 (SOLVED) Message-ID: <019983a9-9429-4c12-bdb9-932a8f0f63d8@menhennitt.com.au> In-Reply-To: <12903a5d-c6c0-4476-bb20-4a60ec00b0e5@menhennitt.com.au> References: <12903a5d-c6c0-4476-bb20-4a60ec00b0e5@menhennitt.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------nmVQDBxVKZXqZQGMqcj0Y50T Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Thanks to Michael Gmelin for pointing me to https://forums.freebsd.org/threads/nut-2-8-0-generic-ups-blazer_usb-cant-claim-usb-device.90744/ and from there to https://forum.opnsense.org/index.php?topic=28695.0. As the first link says, the problem is that the device is claimed by the HID driver. Running the "detach" command fixes the problem (until the next reboot). As described in the second link, I added a line to /boot/loader.conf: hw.usb.quirk.0="0x04D8 0xD005 0 0xffff UQ_HID_IGNORE" and it's fixed permanently. Thanks again, Michael. Graham On 1/06/2024 2:57 pm, Graham Menhennitt wrote: > Hi FreeBSDers, > > Trying to get nut to talk to my Mini-Box OPEN-UPS2 (FreeBSD 13.3 with > nut-2.8.2 built from ports). I've fixed devfs.rules correctly so that > the /dev entry is owned by user nut. > > When I start nut, I get a message "Can't claim USB device > [04d8:d005]@0/0/0: Other error". See below for details including > usbconfig output for the device. > > Does anybody have a clue, please. > > Thanks in advance for any hints, > > Graham > > > root@larabee# ll -L /dev/ugen0.2 /dev/usb/0.2.0 > crw-rw---- 1 nut nut 0x59 1 Jun 14:12 /dev/ugen0.2 > crw-rw---- 1 nut nut 0x59 1 Jun 14:12 /dev/usb/0.2.0 > > > root@larabee# service nut restart > nut not running? (check /var/db/nut/upsd.pid). > Network UPS Tools - UPS driver controller 2.8.2 > Network UPS Tools - Generic HID driver 0.53 (2.8.2) > USB communication driver (libusb 1.0) 0.47 > Can't claim USB device [04d8:d005]@0/0/0: Other error > upsnotify: failed to notify about state 4: no notification tech > defined, will not spam more about it > Driver failed to start (exit status=1) > /usr/local/etc/rc.d/nut: WARNING: failed precmd routine for nut > > > root@larabee# usbconfig -v -d ugen0.2 > ugen0.2: <Mini-Box.Com OPEN-UPS2> at usbus0, cfg=0 md=HOST spd=FULL > (12Mbps) pwr=ON (100mA) > ugen0.2.0: uhid0: <Mini-Box.Com OPEN-UPS2, class 0/0, rev 2.00/0.03, > addr 2> > > bLength = 0x0012 > bDescriptorType = 0x0001 > bcdUSB = 0x0200 > bDeviceClass = 0x0000 <Probed by interface class> > bDeviceSubClass = 0x0000 > bDeviceProtocol = 0x0000 > bMaxPacketSize0 = 0x0020 > idVendor = 0x04d8 > idProduct = 0xd005 > bcdDevice = 0x0003 > iManufacturer = 0x0001 <Mini-Box.Com> > iProduct = 0x0002 <OPEN-UPS2> > iSerialNumber = 0x0004 <LI-ION> > bNumConfigurations = 0x0001 > > > Configuration index 0 > > bLength = 0x0009 > bDescriptorType = 0x0002 > wTotalLength = 0x0029 > bNumInterfaces = 0x0001 > bConfigurationValue = 0x0001 > iConfiguration = 0x0000 <no string> > bmAttributes = 0x00c0 > bMaxPower = 0x0032 > > Interface 0 > bLength = 0x0009 > bDescriptorType = 0x0004 > bInterfaceNumber = 0x0000 > bAlternateSetting = 0x0000 > bNumEndpoints = 0x0002 > bInterfaceClass = 0x0003 <HID device> > bInterfaceSubClass = 0x0000 > bInterfaceProtocol = 0x0000 > iInterface = 0x0000 <no string> > > Additional Descriptor > > bLength = 0x09 > bDescriptorType = 0x21 > bDescriptorSubType = 0x11 > RAW dump: > 0x00 | 0x09, 0x21, 0x11, 0x01, 0x00, 0x01, 0x22, 0xf7, > 0x08 | 0x02 > > Endpoint 0 > bLength = 0x0007 > bDescriptorType = 0x0005 > bEndpointAddress = 0x0081 <IN> > bmAttributes = 0x0003 <INTERRUPT> > wMaxPacketSize = 0x0020 > bInterval = 0x000a > bRefresh = 0x0000 > bSynchAddress = 0x0000 > > Endpoint 1 > bLength = 0x0007 > bDescriptorType = 0x0005 > bEndpointAddress = 0x0001 <OUT> > bmAttributes = 0x0003 <INTERRUPT> > wMaxPacketSize = 0x0020 > bInterval = 0x000a > bRefresh = 0x0000 > bSynchAddress = 0x0000 > > > > root@larabee# > > --------------nmVQDBxVKZXqZQGMqcj0Y50T Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <p>Thanks to Michael Gmelin for pointing me to <a class="moz-txt-link-freetext" href="https://forums.freebsd.org/threads/nut-2-8-0-generic-ups-blazer_usb-cant-claim-usb-device.90744/" style="white-space: pre-wrap;">https://forums.freebsd.org/threads/nut-2-8-0-generic-ups-blazer_usb-cant-claim-usb-device.90744/</a> and from there to <a moz-do-not-send="true" href="https://forum.opnsense.org/index.php?topic=28695.0" class="moz-txt-link-freetext">https://forum.opnsense.org/index.php?topic=28695.0</a>.</p> <p>As the first link says, the problem is that the device is claimed by the HID driver. Running the "detach" command fixes the problem (until the next reboot).</p> <p>As described in the second link, I added a line to /boot/loader.conf:</p> <p> hw.usb.quirk.0="0x04D8 0xD005 0 0xffff UQ_HID_IGNORE"</p> <p>and it's fixed permanently.</p> <p>Thanks again, Michael.</p> <p>Graham</p> <p><br> </p> <p><br> </p> <div class="moz-cite-prefix">On 1/06/2024 2:57 pm, Graham Menhennitt wrote:<br> </div> <blockquote type="cite" cite="mid:12903a5d-c6c0-4476-bb20-4a60ec00b0e5@menhennitt.com.au">Hi FreeBSDers, <br> <br> Trying to get nut to talk to my Mini-Box OPEN-UPS2 (FreeBSD 13.3 with nut-2.8.2 built from ports). I've fixed devfs.rules correctly so that the /dev entry is owned by user nut. <br> <br> When I start nut, I get a message "Can't claim USB device [04d8:d005]@0/0/0: Other error". See below for details including usbconfig output for the device. <br> <br> Does anybody have a clue, please. <br> <br> Thanks in advance for any hints, <br> <br> Graham <br> <br> <br> root@larabee# ll -L /dev/ugen0.2 /dev/usb/0.2.0 <br> crw-rw---- 1 nut nut 0x59 1 Jun 14:12 /dev/ugen0.2 <br> crw-rw---- 1 nut nut 0x59 1 Jun 14:12 /dev/usb/0.2.0 <br> <br> <br> root@larabee# service nut restart <br> nut not running? (check /var/db/nut/upsd.pid). <br> Network UPS Tools - UPS driver controller 2.8.2 <br> Network UPS Tools - Generic HID driver 0.53 (2.8.2) <br> USB communication driver (libusb 1.0) 0.47 <br> Can't claim USB device [04d8:d005]@0/0/0: Other error <br> upsnotify: failed to notify about state 4: no notification tech defined, will not spam more about it <br> Driver failed to start (exit status=1) <br> /usr/local/etc/rc.d/nut: WARNING: failed precmd routine for nut <br> <br> <br> root@larabee# usbconfig -v -d ugen0.2 <br> ugen0.2: <Mini-Box.Com OPEN-UPS2> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA) <br> ugen0.2.0: uhid0: <Mini-Box.Com OPEN-UPS2, class 0/0, rev 2.00/0.03, addr 2> <br> <br> bLength = 0x0012 <br> bDescriptorType = 0x0001 <br> bcdUSB = 0x0200 <br> bDeviceClass = 0x0000 <Probed by interface class> <br> bDeviceSubClass = 0x0000 <br> bDeviceProtocol = 0x0000 <br> bMaxPacketSize0 = 0x0020 <br> idVendor = 0x04d8 <br> idProduct = 0xd005 <br> bcdDevice = 0x0003 <br> iManufacturer = 0x0001 <Mini-Box.Com> <br> iProduct = 0x0002 <OPEN-UPS2> <br> iSerialNumber = 0x0004 <LI-ION> <br> bNumConfigurations = 0x0001 <br> <br> <br> Configuration index 0 <br> <br> bLength = 0x0009 <br> bDescriptorType = 0x0002 <br> wTotalLength = 0x0029 <br> bNumInterfaces = 0x0001 <br> bConfigurationValue = 0x0001 <br> iConfiguration = 0x0000 <no string> <br> bmAttributes = 0x00c0 <br> bMaxPower = 0x0032 <br> <br> Interface 0 <br> bLength = 0x0009 <br> bDescriptorType = 0x0004 <br> bInterfaceNumber = 0x0000 <br> bAlternateSetting = 0x0000 <br> bNumEndpoints = 0x0002 <br> bInterfaceClass = 0x0003 <HID device> <br> bInterfaceSubClass = 0x0000 <br> bInterfaceProtocol = 0x0000 <br> iInterface = 0x0000 <no string> <br> <br> Additional Descriptor <br> <br> bLength = 0x09 <br> bDescriptorType = 0x21 <br> bDescriptorSubType = 0x11 <br> RAW dump: <br> 0x00 | 0x09, 0x21, 0x11, 0x01, 0x00, 0x01, 0x22, 0xf7, <br> 0x08 | 0x02 <br> <br> Endpoint 0 <br> bLength = 0x0007 <br> bDescriptorType = 0x0005 <br> bEndpointAddress = 0x0081 <IN> <br> bmAttributes = 0x0003 <INTERRUPT> <br> wMaxPacketSize = 0x0020 <br> bInterval = 0x000a <br> bRefresh = 0x0000 <br> bSynchAddress = 0x0000 <br> <br> Endpoint 1 <br> bLength = 0x0007 <br> bDescriptorType = 0x0005 <br> bEndpointAddress = 0x0001 <OUT> <br> bmAttributes = 0x0003 <INTERRUPT> <br> wMaxPacketSize = 0x0020 <br> bInterval = 0x000a <br> bRefresh = 0x0000 <br> bSynchAddress = 0x0000 <br> <br> <br> <br> root@larabee# <br> <br> <br> </blockquote> </body> </html> --------------nmVQDBxVKZXqZQGMqcj0Y50T--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?019983a9-9429-4c12-bdb9-932a8f0f63d8>