Skip to content

nutdrv_qx multiple identical ups USB issue #1174

@arisjr

Description

@arisjr

We have several 15 identical voltronic UPS's here and they came only with USB and Serial ports enabled. We are trying to implement the monitoring on RPi3's for every four nobreaks. For one ups it works fine, the problem is to connect more than one ups.

For a reason we don't know, all serial numbers returned from the UPS to the driver are "unkown", so we do not have a way to individualize the nobreaks on ups.conf.

In this scenario, with "port = auto", only the first USB port is accessed by the driver. Even if we had four ups configured on ups.conf, only the last loaded ups will work, because the driver only access the first device it sees.

Is there a way to make the driver more aware of the devices it already handles and only load the driver on unused devices?
Or is there another form for me to individualize the UPS devices for it to load correctly multiple USB devices?

System Specs:

UPS: Voltronic Power, Model: WINNER PRO 3000VA
Machine: Rpi3
System: ubuntu 20.04 server armhf raspi
Nutdrv_qx (from APT): Network UPS Tools - Generic Q* USB/Serial driver 0.28 (2.7.4), USB communication driver 0.33

ups.conf example

[ups-port01]
driver = nutdrv_qx
port = auto
desc = "Voltronic Power PORT01"

[ups-port02]
driver = nutdrv_qx
port = auto
desc = "Voltronic Power PORT02"

Driver exit (I intentionally set a random serial number for it to list all devices)

$ sudo /usr/lib/nut/nutdrv_qx -a ups-port01 -DD
Network UPS Tools - Generic Q* USB/Serial driver 0.28 (2.7.4)
USB communication driver 0.33
0.000000 debug level is '2'
0.003595 upsdrv_initups...
0.004911 Checking device (0665/5161) (001/005)
1.373362 - VendorID: 0665
1.373487 - ProductID: 5161
1.373581 - Manufacturer: unknown
1.373670 - Product: unknown
1.373732 - Serial Number: unknown
1.373812 - Bus: 001
1.373873 - Device release number: 0002
1.373923 Trying to match device
1.374007 Device does not match - skipping
1.374115 Checking device (0665/5161) (001/004)
1.384912 - VendorID: 0665
1.385042 - ProductID: 5161
1.385169 - Manufacturer: INNO TECH
1.385266 - Product: USB to Serial
1.385346 - Serial Number: unknown
1.385425 - Bus: 001
1.385502 - Device release number: 0002
1.385580 Trying to match device
1.385686 Device does not match - skipping
1.385787 Checking device (0424/EC00) (001/003)
1.385964 - VendorID: 0424
1.386025 - ProductID: ec00
1.386072 - Manufacturer: unknown
1.386151 - Product: unknown
1.386205 - Serial Number: unknown
1.386243 - Bus: 001
1.386297 - Device release number: 0200
1.386359 Trying to match device
1.386415 Device does not match - skipping
1.386493 Checking device (0424/9514) (001/002)
1.386603 - VendorID: 0424
1.386659 - ProductID: 9514
1.386718 - Manufacturer: unknown
1.386771 - Product: unknown
1.386823 - Serial Number: unknown
1.386877 - Bus: 001
1.386921 - Device release number: 0200
1.386972 Trying to match device
1.387035 Device does not match - skipping
1.387111 Checking device (1D6B/0002) (001/001)
1.387235 - VendorID: 1d6b
1.387288 - ProductID: 0002
1.387346 - Manufacturer: unknown
1.387398 - Product: unknown
1.387451 - Serial Number: unknown
1.387500 - Bus: 001
1.387557 - Device release number: 0504
1.387608 Trying to match device
1.387669 Device does not match - skipping

lsusb (with two UPS connected on rpi)

$ lsusb -v -d 0665:

Bus 001 Device 005: ID 0665:5161 Cypress Semiconductor USB to Serial
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x0665 Cypress Semiconductor
idProduct 0x5161 USB to Serial
bcdDevice 0.02
iManufacturer 1
iProduct 2
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0022
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 3
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 4
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.00
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 27
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 1

Bus 001 Device 004: ID 0665:5161 Cypress Semiconductor USB to Serial
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x0665 Cypress Semiconductor
idProduct 0x5161 USB to Serial
bcdDevice 0.02
iManufacturer 1
iProduct 2
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0022
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 3
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 4
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.00
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 27
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    USBUSB VID=0001 PID=0000 (Fry's Electronics/MEC0003)Seems to be a generic USB chip interfacing many devices and protocols (Qx, USB HID, ATCL...)USB-duplicate-devicesTrack bugs and issues about monitoring several devices that seem identical to NUT or libusb

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions