[Nut-upsdev] hald-addon-usbhid-ups

Alfred Ganz alfred-ganz+nut at agci.com
Tue Aug 19 12:53:02 UTC 2008


Ladies and Gentlemen,

I have been playing around with Arnaud's new HAL stuff a bit, and have
some questions and observations. First my configuration: 
	my UPS (Peter may remember):
		ups.mfr: APC
		ups.model: Back-UPS ES 650
		ups.productid: 0002
		ups.firmware: 818.w1.D
		ups.firmware.aux: w1
	kernel: 2.6.18-92.1.6.el5
	hal-0.5.8.1-35.el5, 
	nut based on nut-2.2.2.tar.gz, small changes to make build work

I am currently running with this configuration, and everything seems
to be working, except some of the hal interface stuff, which I know
is still a work in progress, and so I enable the hal part only when 
playing around with it.

I see a lot of kernel warnings because there are two processes that
access the device like this:
  usbfs: process 19727 (usbhid-ups) did not claim interface 0 before use
  usbfs: process 19862 (hald-addon-usbh) did not claim interface 0 before use
My question: is this due to my kernel version, the version of my libusb
(libusb-0.1.12-5.1), or do I need a more up-to-date version of
drivers/libusb.c?

When I make a change to a HID variable that is marked as 
HU_FLAG_SEMI_STATIC using upsrw (e.g. battery.charge.low), the value 
is changed in the device (and shows changed with e.g. upsc), but the 
hal side never knows about the change (e.g. when looking at the hal 
data with hal-device-manager). I believe this is because the variable 
"data_has_changed" in the hald-addon version of the driver is never set, 
and so the value is never read from the device.

Also, when I make a change on the hal side to such a variable (using 
/usr/bin/hal-set-property) the change happens on the hal side (as
seen with hal-device-manager), but the change seems to be never
propagated to the device. Here I presume the absence of any calls
to "upsh.setvar()" in main-hal.c or dstate-hal.c means that things 
are just not done yet.

Any suggestions would be appreciated. Thanks, AG

-- 
 ----------------------------------------------------------------------
   Alfred Ganz					alfred-ganz:at:agci.com
   AG Consulting, Inc.				(203) 624-9667
   440 Prospect Street # 11
   New Haven, CT 06511
 ----------------------------------------------------------------------



More information about the Nut-upsdev mailing list