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#

Reply via email to