[Nut-upsuser] ups not recognized by usbhid-ups
Zeev Tarantov
zeev.tarantov at gmail.com
Tue Aug 25 06:10:09 UTC 2009
I've posted this before being subscribed but was thwarted by moderation.
I have a new UPS, actual manufacturer unknown. It comes with USB and
serial connections, and a CD with windows software and some old unix
software for serial support only. I'm using pretty much bleeding edge
linux, and I want to avoid rs-232 if possible. Am I hopelessly naive?
This is what lsusb says:
Bus 006 Device 002: ID ffff:0000
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0xffff
idProduct 0x0000
bcdDevice 1.00
iManufacturer 1
iProduct 2 068A
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 27
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0 No Subclass
bInterfaceProtocol 0 None
iInterface 0
** UNRECOGNIZED: 09 21 00 01 00 01 22 78 02
Device Status: 0x0000
(Bus Powered)
The ffff:0000 is mighty suspicious, like someone didn't want to pay
for a USB consortium membership.
$ sudo /usr/sbin/upsdrvctl -DDD start myups
Network UPS Tools - UPS driver controller 2.4.1
Starting UPS: myups
exec: /lib/nut/usbhid-ups -a myups
Network UPS Tools - Generic HID driver 0.34 (2.4.1)
USB communication driver 0.31
No matching HID UPS found
Driver failed to start (exit status=1)
$ sudo /usr/sbin/upsdrvctl -DDD start myups
Network UPS Tools - UPS driver controller 2.4.1
Starting UPS: myups
exec: /lib/nut/usbhid-ups -a myups
Network UPS Tools - Generic HID driver 0.34 (2.4.1)
USB communication driver 0.31
Using subdriver: EXPLORE HID 0.1
This is all I could get from usbmon, with explore. This is just
turning on the driver. I don't know how to cause the UPS to send any
more info.
$ sudo usbmon -i 6
265b7600 0.695954 S Ci:6:002:0 s 80 06 0300 0000 00ff 255 <
265b7600 0.700413 C Ci:6:002:0 0 4 = 04030904
265b7600 0.700431 S Ci:6:002:0 s 80 06 0301 0409 00ff 255 <
265b7600 0.705412 C Ci:6:002:0 0 4 = 04032000
265b7600 0.705420 S Ci:6:002:0 s 80 06 0300 0000 00ff 255 <
265b7600 0.710412 C Ci:6:002:0 0 4 = 04030904
265b7600 0.710427 S Ci:6:002:0 s 80 06 0302 0409 00ff 255 <
265b7600 0.716412 C Ci:6:002:0 0 10 = 0a033000 36003800 4100
265b7600 0.716455 S Co:6:002:0 s 01 0b 0000 0000 0000 0
265b7600 0.719412 C Co:6:002:0 0 0
265b7600 0.719427 S Ci:6:002:0 s 81 06 2100 0000 0009 9 <
265b7600 0.724412 C Ci:6:002:0 0 9 = 09210001 00012278 02
265b7600 0.724428 S Ci:6:002:0 s 81 06 2200 0000 0278 632 <
265b7600 0.806424 C Ci:6:002:0 0 632 = 05860904 a1010584 091ea100
8501091f 65007504 95011500 250f6500 b1027504
I've looked at http://www.usb.org/developers/devclass_docs/pdcv10.pdf
(linked from http://www.networkupstools.org/protocols/) and deciphered
the "** UNRECOGNIZED: 09 21 00 01 00 01 22 78 02" line from lsusb,
but I don't know how to get it to spew out the 0x7802 bytes of reports
the document describes.
I suppose that I can install Windows in a virtual machine, pass the
usb device from the host into the VM, install the Windows software
that came with it (I don't know but I suppose it does work) and
reverse engineer a driver from usbmon captures. But that sounds like a
lot of work. And I'll need to buy Windows.
Can anyone suggest an alternative?
-Zeev
More information about the Nut-upsuser
mailing list