Hi,
I discovered an issue when trying to configure an APC Back-UPS ES 700G.
As I assume from the documentation nut-scanner -qNU
should create a usable configuration entry which can be directly copied into ups.conf
.
When running the above command I get:
[nutdev1]
driver = "usbhid-ups"
port = "auto"
vendorid = "051D"
productid = "0002"
product = "Back-UPS ES 700G FW:871.O2 .I USB FW:O2 "
serial = "5B1243T01934 "
vendor = "APC"
bus = "002"
For a first quick test I used:
usbhid-ups -DD -u root -a nutdev1
------------%<----------------------------------------------------------------------------------------
Network UPS Tools - Generic HID driver 0.37 (2.6.5)
USB communication driver 0.32
0.000000 debug level is '2'
0.001513 upsdrv_initups...
0.083102 Checking device (8087/0024) (001/002)
0.083195 - VendorID: 8087
0.083211 - ProductID: 0024
0.083225 - Manufacturer: unknown
0.083239 - Product: unknown
0.083253 - Serial Number: unknown
0.083267 - Bus: 001
0.083281 Trying to match device
0.083306 Device does not match - skipping
0.083347 Checking device (1D6B/0002) (001/001)
0.084525 - VendorID: 1d6b
0.084542 - ProductID: 0002
0.084556 - Manufacturer: Linux 3.4.41-dist ehci_hcd
0.084570 - Product: EHCI Host Controller
0.084584 - Serial Number: 0000:00:1a.0
0.084598 - Bus: 001
0.084612 Trying to match device
0.084627 Device does not match - skipping
0.084666 Checking device (8087/0024) (002/002)
0.084740 - VendorID: 8087
0.084755 - ProductID: 0024
0.084769 - Manufacturer: unknown
0.084783 - Product: unknown
0.084797 - Serial Number: unknown
0.084811 - Bus: 002
0.084824 Trying to match device
0.084839 Device does not match - skipping
0.084877 Checking device (1D6B/0002) (002/001)
0.086036 - VendorID: 1d6b
0.086052 - ProductID: 0002
0.086066 - Manufacturer: Linux 3.4.41-dist ehci_hcd
0.086080 - Product: EHCI Host Controller
0.086094 - Serial Number: 0000:00:1d.0
0.086108 - Bus: 002
0.086122 Trying to match device
0.086137 Device does not match - skipping
0.086175 Checking device (051D/0002) (002/004)
0.117261 - VendorID: 051d
0.117312 - ProductID: 0002
0.117365 - Manufacturer: APC
0.117411 - Product: Back-UPS ES 700G FW:871.O2 .I USB FW:O2
0.117452 - Serial Number: 5B1243T01934
0.117482 - Bus: 002
0.117529 Trying to match device
0.117660 Device does not match - skipping
0.117743 No appropriate HID device found
0.117799 No matching HID UPS found
------------%<----------------------------------------------------------------------------------------
So strangely nut-scanner
is detecting the UPS but the driver is not detecting it.
First I tried to cherry-pick some fixes from the git master, applying them when building from the latest release source tarball (2.6.5).
but both patches didn't changed the behavior.
After that I simply tried to uncomment entries from the generated configuration and found out that when uncommenting the product
and serial
entry, the driver is able to detect the UPS. Same applies when only removing the trailing spaces from product
and serial
entry.
usbhid-ups -DD -u root -a nutdev1
------------%<----------------------------------------------------------------------------------------
Network UPS Tools - Generic HID driver 0.37 (2.6.5)
USB communication driver 0.32
0.000000 debug level is '2'
0.001530 upsdrv_initups...
0.083640 Checking device (8087/0024) (001/002)
0.083731 - VendorID: 8087
0.083746 - ProductID: 0024
0.083761 - Manufacturer: unknown
0.083775 - Product: unknown
0.083789 - Serial Number: unknown
0.083803 - Bus: 001
0.083817 Trying to match device
0.083842 Device does not match - skipping
0.083884 Checking device (1D6B/0002) (001/001)
0.085067 - VendorID: 1d6b
0.085083 - ProductID: 0002
0.085098 - Manufacturer: Linux 3.4.41-dist ehci_hcd
0.085112 - Product: EHCI Host Controller
0.085126 - Serial Number: 0000:00:1a.0
0.085140 - Bus: 001
0.085154 Trying to match device
0.085168 Device does not match - skipping
0.085207 Checking device (8087/0024) (002/002)
0.085282 - VendorID: 8087
0.085297 - ProductID: 0024
0.085312 - Manufacturer: unknown
0.085326 - Product: unknown
0.085339 - Serial Number: unknown
0.085353 - Bus: 002
0.085368 Trying to match device
0.085382 Device does not match - skipping
0.085420 Checking device (1D6B/0002) (002/001)
0.086586 - VendorID: 1d6b
0.086602 - ProductID: 0002
0.086616 - Manufacturer: Linux 3.4.41-dist ehci_hcd
0.086630 - Product: EHCI Host Controller
0.086644 - Serial Number: 0000:00:1d.0
0.086658 - Bus: 002
0.086672 Trying to match device
0.086687 Device does not match - skipping
0.086725 Checking device (051D/0002) (002/004)
0.118688 - VendorID: 051d
0.118711 - ProductID: 0002
0.118726 - Manufacturer: APC
0.118740 - Product: Back-UPS ES 700G FW:871.O2 .I USB FW:O2
0.118754 - Serial Number: 5B1243T01934
0.118768 - Bus: 002
0.118782 Trying to match device
0.118887 Device matches
0.125217 HID descriptor length 929
0.272566 Report Descriptor size = 929
0.272777 Using subdriver: APC HID 0.95
------------%<----------------------------------------------------------------------------------------
As we can see the UPS is detected when removing the trailing spaces from the affected config entries.