[Nut-upsuser] suse linux and nut

Peter Selinger selinger at mathstat.dal.ca
Sat Aug 26 02:06:01 UTC 2006


Marc,

interesting, actually, we have seen this device before; see the posts
by Barry Fawthrop around August 1. It is a HID device, but it does not
follow the USB HID standard for power devices. So decoding it might be
tricky.

I am attaching a patch that adds a rudimentary subdriver for this
device. It should be sufficient to drop the "-x generic", attach the
driver to the device, and observe some variables with upsc.

Apply the patch to the SVN version (don't forget to re-run
./configure). See if the driver works, and try to run upsd and to read
the values of the variables with upsc. If this works, please observe
how the values of the variables change in response to events (loss of
power, on battery, low battery, battery charging, battery full, etc).
If successful, this will give clues as to how to interpret the
different variables. The "low battery" condition is especially
important, as it is used by upsmon. 

-- Peter

Marc Collin wrote:
> 
> Le vendredi 25 ao=FBt 2006 18:17, vous avez =E9crit :
> > Dear Marc,
> >
> > first, the 'powercom' driver is a serial driver, so it will not work
> > for USB.
> >
> > Second, newhidups does not currently support Powercom. The reason is
> > simple: this is (as far as I remember) the first time we are seeing a
> > Powercom USB device. It might not be too difficult to add support for
> > it to NUT (or it might be very difficult - too early to know).
> > To find out requires some effort on your part:
> >
> > * get the latest development version of NUT from SVN. You can follow
> >   the instructions at http://www.networkupstools.org/source.html under
> >   "Development tree" to get it.
> >
> > * send the output of
> >
> >   drivers/newhidups -DD -u root -x generic -x vendorid=0d9f auto
> >
> >   from this newest NUT version.
> >
> > This will help us determine whether your device is a HID device, and
> > if yes, how to support it. Thanks, -- Peter
> >
> hi
> 
> dmesg return:
> 
> usb 1-4: USB disconnect, address 4
> usb 1-4: new low speed USB device using ohci_hcd and address 5
> usb 1-4: new device found, idVendor=0d9f, idProduct=0001
> usb 1-4: new device strings: Mfr=1, Product=2, SerialNumber=3
> usb 1-4: configuration #1 chosen from 1 choice
> usbcore: registered new driver hiddev
> hiddev96: USB HID v1.00 Device [HID 0d9f:0001] on usb-0000:00:0b.0-4
> usbcore: registered new driver usbhid
> drivers/usb/input/hid-core.c: v2.6:USB HID core driver
> usb 1-4: usbfs: USBDEVFS_CONTROL failed cmd newhidups rqt 128 rq 6 len 255
> ret -110
> usb 1-4: usbfs: USBDEVFS_CONTROL failed cmd newhidups rqt 128 rq 6 len 255
> ret -110
> usb 1-4: usbfs: USBDEVFS_CONTROL failed cmd newhidups rqt 128 rq 6 len 255
> ret -110
> 
> 
> 
> ok this is the info asked:
> 
> linux64:/home/collinm/Download/trunk # drivers/newhidups -DD -u root -x
> generic -x vendorid=0d9f auto
> Network UPS Tools: 0.28 USB communication driver 0.28 - core 0.30 (2.1.0)
> 
> debug level is '2'
> Checking device (0000/0000) (002/001)
> - VendorID: 0000
> - ProductID: 0000
> - Manufacturer: Linux 2.6.16.21-0.13-default ehci_hcd
> - Product: EHCI Host Controller
> - Serial Number: 0000:00:0b.1
> - Bus: 002
> Trying to match device
> Device does not match - skipping
> Checking device (0D9F/0001) (001/005)
> - VendorID: 0d9f
> - ProductID: 0001
> - Manufacturer: unknown
> - Product: unknown
> - Serial Number: unknown
> - Bus: 001
> Trying to match device
> Device matches
> failed to claim USB device, trying 2 more time(s)...
> detaching kernel driver from USB device...
> trying again to claim USB device...
> HID descriptor retrieved (Reportlen = 175)
> Report descriptor retrieved (Reportlen = 175)
> Found HID device
> Report Descriptor size = 175
> Detected a UPS: unknown/unknown
> Using subdriver: GENERIC HID 0.1
> Path: 00020004.00020086, Type: Feature, Value: 130.000000
> Path: 00020004.00020087, Type: Feature, Value: 169.000000
> Can't find object 00020004.00020083
> Path: 00020004.00020083, Type: Input
> Can't find object 00020004.00020085
> Path: 00020004.00020085, Type: Input
> Can't find object 00020004.00020010.00020036
> Path: 00020004.00020010.00020036, Type: Input
> Can't find object 00020004.00020010.00020030
> Path: 00020004.00020010.00020030, Type: Input
> Can't find object 00020004.00020010.00020084
> Path: 00020004.00020010.00020084, Type: Input
> Can't find object 00020004.00020016.0002001a.00020032
> Path: 00020004.00020016.0002001a.00020032, Type: Input
> Can't find object 00020004.00020016.0002001a.00020030
> Path: 00020004.00020016.0002001a.00020030, Type: Input
> Can't find object 00020004.00020016.0002001c.00020030
> Path: 00020004.00020016.0002001c.00020030, Type: Input
> Can't find object 00020004.00020016.0002001c.00020035
> Path: 00020004.00020016.0002001c.00020035, Type: Input
> Can't find object 00020004.00020016.0002001c.00020081
> Path: 00020004.00020016.0002001c.00020081, Type: Input
> Can't find object 00020004.00020016.0002001c.00020082
> Path: 00020004.00020016.0002001c.00020082, Type: Input
> Can't find object 00020004.00020016.0002001c.00020032
> Path: 00020004.00020016.0002001c.00020032, Type: Input
> Path: 00020004.00020016.00020058, Type: Feature, Value: 1.000000
> Path: 00020004.00020016.00020068, Type: Feature, Value: 2.000000
> Path: 00020004.00020016.00020057, Type: Feature, Value: 0.000000
> Path: 00020004.00020016.00020056, Type: Feature, Value: 0.000000
> upsdrv_updateinfo...
> dstate_init: sock /var/state/ups/newhidups-auto open on fd 6
> upsdrv_updateinfo...
> Waiting for notifications...
> upsdrv_updateinfo...
> Waiting for notifications...
> upsdrv_updateinfo...
> Waiting for notifications...
> upsdrv_updateinfo...
> Waiting for notifications...
> upsdrv_updateinfo...
> Waiting for notifications...
> upsdrv_updateinfo...
> Waiting for notifications...
> upsdrv_updateinfo...
> Waiting for notifications...
> upsdrv_updateinfo...
> Waiting for notifications...
> 
> and seem to loop on this last two sentence...
> 
> 
> thanks

-------------- next part --------------
A non-text attachment was scrubbed...
Name: powercom.patch.gz
Type: application/octet-stream
Size: 3985 bytes
Desc: gzip compressed data - deflate method , original file name
Url : http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20060825/39b15df7/powercom.patch.obj


More information about the Nut-upsuser mailing list