# UPS / USB - Device Error



## s2r (Dec 16, 2019)

Hello. I bought an UPS from a local brand (http://www.atomlux.com.ar/web/UPS-Estabilizador-Controlado-por-Microprocesador-3000.php) It states that can be monitored via software. I checked and there's a version of it for windows and linux (also FreeBSD but too old 3.x) I wanted to try to connect to the UPS using NUT however when I plug the cable to the server (Dell T130, using USB 2.0 ports) I get the following error:


```
[freebsd:/usr/ports/sysutils $]> uname -ar
│FreeBSD freebsd.xsdd.local 12.1-RELEASE-p1 FreeBSD 12.1-RELEASE-p1 GENERIC  amd64

│[freebsd:/usr/ports/sysutils $]> dmesg
│usb_alloc_device: set address 3 failed (USB_ERR_IOERROR, ignored)
│usbd_setup_device_desc: getting device descriptor at addr 3 failed, USB_ERR_IOERROR
│usbd_req_re_enumerate: addr=3, set address failed! (USB_ERR_IOERROR, ignored)
│usbd_setup_device_desc: getting device descriptor at addr 3 failed, USB_ERR_IOERROR
│usbd_req_re_enumerate: addr=3, set address failed! (USB_ERR_IOERROR, ignored)
│usbd_setup_device_desc: getting device descriptor at addr 3 failed, USB_ERR_IOERROR
│usbd_req_re_enumerate: addr=3, set address failed! (USB_ERR_IOERROR, ignored)
│usbd_setup_device_desc: getting device descriptor at addr 3 failed, USB_ERR_IOERROR
│usbd_req_re_enumerate: addr=3, set address failed! (USB_ERR_IOERROR, ignored)
│usbd_setup_device_desc: getting device descriptor at addr 3 failed, USB_ERR_IOERROR
│ugen0.3: <Unknown > at usbus0 (disconnected)
│uhub_reattach_port: could not allocate new device
```

I entered into the BIOS for the server looking for some USB configuration to force it to an old USB version, just in case, but I couldn't find any. Any ideas from where you I start to troubleshoot? I'm going to install the software UPSILON2000 on a Windows machine and try it so to check if it's a FreeBSD related thing. I also tried to connect the cable on a Raspberry Pi3b and it was not detected not even an error.


----------



## s2r (Dec 16, 2019)

```
pciconf -lv

hostb0@pci0:0:0:0:      class=0x060000 card=0x06aa1028 chip=0x59188086 rev=0x05 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers'
    class      = bridge
    subclass   = HOST-PCI
pcib1@pci0:0:1:0:       class=0x060400 card=0x06aa1028 chip=0x19018086 rev=0x05 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = 'Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16)'
    class      = bridge
    subclass   = PCI-PCI
pcib2@pci0:0:1:2:       class=0x060400 card=0x06aa1028 chip=0x19098086 rev=0x05 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = 'Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x4)'
    class      = bridge
    subclass   = PCI-PCI
xhci0@pci0:0:20:0:      class=0x0c0330 card=0x06aa1028 chip=0xa12f8086 rev=0x31 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '100 Series/C230 Series Chipset Family USB 3.0 xHCI Controller'
    class      = serial bus
    subclass   = USB
none0@pci0:0:20:2:      class=0x118000 card=0x06aa1028 chip=0xa1318086 rev=0x31 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '100 Series/C230 Series Chipset Family Thermal Subsystem'
    class      = dasp
none1@pci0:0:22:0:      class=0x078000 card=0x06aa1028 chip=0xa13a8086 rev=0x31 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '100 Series/C230 Series Chipset Family MEI Controller'
    class      = simple comms
none2@pci0:0:22:1:      class=0x078000 card=0x06aa1028 chip=0xa13b8086 rev=0x31 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '100 Series/C230 Series Chipset Family MEI Controller'
    class      = simple comms
ahci0@pci0:0:23:0:      class=0x010601 card=0x06aa1028 chip=0xa1028086 rev=0x31 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Q170/Q150/B150/H170/H110/Z170/CM236 Chipset SATA Controller [AHCI Mode]'
    class      = mass storage
    subclass   = SATA
pcib3@pci0:0:29:0:      class=0x060400 card=0x06aa1028 chip=0xa1188086 rev=0xf1 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = '100 Series/C230 Series Chipset Family PCI Express Root Port'
    class      = bridge
    subclass   = PCI-PCI
pcib4@pci0:0:29:2:      class=0x060400 card=0x06aa1028 chip=0xa11a8086 rev=0xf1 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = '100 Series/C230 Series Chipset Family PCI Express Root Port'
    class      = bridge
    subclass   = PCI-PCI
isab0@pci0:0:31:0:      class=0x060100 card=0x06aa1028 chip=0xa1498086 rev=0x31 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'C236 Chipset LPC/eSPI Controller'
    class      = bridge
    subclass   = PCI-ISA
none3@pci0:0:31:2:      class=0x058000 card=0x06aa1028 chip=0xa1218086 rev=0x31 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '100 Series/C230 Series Chipset Family Power Management Controller'
    class      = memory
none4@pci0:0:31:4:      class=0x0c0500 card=0x06aa1028 chip=0xa1238086 rev=0x31 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '100 Series/C230 Series Chipset Family SMBus'
    class      = serial bus
    subclass   = SMBus
mrsas0@pci0:1:0:0:      class=0x010400 card=0x1f441028 chip=0x005f1000 rev=0x02 hdr=0x00
    vendor     = 'LSI Logic / Symbios Logic'
    device     = 'MegaRAID SAS-3 3008 [Fury]'
    class      = mass storage
    subclass   = RAID
bge0@pci0:3:0:0:        class=0x020000 card=0x06a71028 chip=0x165f14e4 rev=0x00 hdr=0x00
    vendor     = 'Broadcom Inc. and subsidiaries'
    device     = 'NetXtreme BCM5720 2-port Gigabit Ethernet PCIe'
    class      = network
    subclass   = ethernet
bge1@pci0:3:0:1:        class=0x020000 card=0x06a71028 chip=0x165f14e4 rev=0x00 hdr=0x00
    vendor     = 'Broadcom Inc. and subsidiaries'
    device     = 'NetXtreme BCM5720 2-port Gigabit Ethernet PCIe'
    class      = network
    subclass   = ethernet
pcib5@pci0:4:0:0:       class=0x060400 card=0x001d1912 chip=0x001d1912 rev=0x00 hdr=0x01
    vendor     = 'Renesas Technology Corp.'
    device     = 'SH7758 PCIe Switch [PS]'
    class      = bridge
    subclass   = PCI-PCI
pcib6@pci0:5:0:0:       class=0x060400 card=0x001d1912 chip=0x001d1912 rev=0x00 hdr=0x01
    vendor     = 'Renesas Technology Corp.'
    device     = 'SH7758 PCIe Switch [PS]'
    class      = bridge
    subclass   = PCI-PCI
pcib7@pci0:6:0:0:       class=0x060400 card=0x001a1912 chip=0x001a1912 rev=0x00 hdr=0x01
    vendor     = 'Renesas Technology Corp.'
    device     = 'SH7758 PCIe-PCI Bridge [PPB]'
    class      = bridge
    subclass   = PCI-PCI
vgapci0@pci0:7:0:0:     class=0x030000 card=0x06aa1028 chip=0x0534102b rev=0x01 hdr=0x00
    vendor     = 'Matrox Electronics Systems Ltd.'
    device     = 'G200eR2'
    class      = display
    subclass   = VGA
```

usbconfig

```
usbconfig
ugen0.1: <0x8086 XHCI root HUB> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA)
ugen0.2: <no manufacturer Gadget USB HUB> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (100mA)
```


----------



## ralphbsz (Dec 17, 2019)

Try plugging it into a USB 2.0 port, you might have plugged it into a USB 3.0 port (I think you have one of those on ugen0.1). I've seen some crappy hardware not work on USB 3 but do fine on USB 2 (some no-name-brand Ethernet adapter).
Your output of usbconfig does not show any USB device, only the two hubs. Perhaps that's because the attempt to discover it caused the above error.
My next suggestion was going to be to connect it to some Linux machine (like a Raspberry Pi) and run lsusb (the Linux equivalent of usbconfig), but you already tried that.
 I bet that the "Atomlux" is not actually a local Argentinian product, but probably an import from China that gets re-badged in Argentina. It probably uses the protocol of some other brand (like APC, which seems to be the leader in consumer UPSes). So by editing the file that assigns drivers to USB IDs, you might be able to fool FreeBSD into believing that it really is an APC product. But a web search found no hint of that (and yes, I do speak Spanish).
Sorry, I don't have any good ideas.


----------



## s2r (Dec 17, 2019)

Sorry, I forgot to write that in the manual it points to a software monitoring UPSilon 2000, on Megatec.com.tw. I tried with megatec, megatec_usb, blazer_usb driver but nothing happened. The problem is that it's not even detected as *any* USB device. I've got two UPSs the other one is APC, as a last resort I would connect FreeBSD to the APC. I didn't want to because it's smaller 1000va vs 3500va.

Do you know if you can force USB ports as USB 2.0 on a Dell T130, I looked iside iDrac and BIOS and didn't find anything.


----------



## ralphbsz (Dec 18, 2019)

No idea on Dell USB.

When you plug it in, it needs to at least be detected as something. Even if it said "unknown USB manufacturer 1234 unknown model 5678", that would be something we can work with. If it doesn't even get detected at all, and this is consistent across multiple USB ports, then it seems very likely that the problem is not FreeBSD and not your Dell. Best option: Try that UPS on a *different* computer with *different* OS, and if it still doesn't work, you probably have a defective UPS, or a defective cable. Matter-of-fact, I would definitely replace the cable first.


----------



## s2r (Dec 19, 2019)

The problem was the USB cable, I changed it and it is was detected.


----------

