[Nut-upsdev] Sweex 1000VA UPS (Lakeview Research)
Peter van Valderen
dosperios at gmail.com
Sat Dec 20 12:54:33 UTC 2008
On Wed, Dec 17, 2008 at 9:22 PM, Arjen de Korte <nut+devel at de-korte.org> wrote:
> Well, r1648 in branches/Experimental should fix almost all of them. There is
> one thing that needs to be done however. I would like you to check whether
> it is possible to swap the usb_set_configuration() and usb_claim_interface()
> calls around. In that case we could use the existing USB device matching
> code from the libusb.c interface, which is more robust than what we have
> now. You probably want to run the driver with debugging enabled (add -DDD on
> the startup command line) to see where it fails (if it fails).
Well, I had a look, this is with usb_set_configuration() before
usb_claim_interface(), as it was before:
linux drivers # ./lakeview_usb -a deskups -DDDDD -u root
Network UPS Tools - Lakeview Research compatible USB UPS driver 0.03
(2.3.0-1661M)
Warning: This is an experimental driver.
Some features may not function correctly.
debug level is '5'
send: (4 bytes) => 01 00 00 30
read: (6 bytes) => 01 04 02 fe fd ff
send: (4 bytes) => 01 00 00 30
read: (6 bytes) => 01 04 02 fe fc ff
send: (4 bytes) => 01 00 00 30
read: (6 bytes) => 01 04 02 fe f5 ff
send: (4 bytes) => 01 00 00 30
read: (6 bytes) => 01 04 02 fe f4 ff
send: (4 bytes) => 01 00 00 30
read: (6 bytes) => 01 04 02 fe f5 ff
send_to_all: SETINFO driver.version.internal "0.03"
send_to_all: SETINFO ups.mfr "Lakeview Research compatible"
send_to_all: SETINFO ups.model "Unknown"
send: (4 bytes) => 01 00 00 30
read: (6 bytes) => 01 04 02 fe f4 ff
send_to_all: DATAOK
send_to_all: SETINFO ups.status "OL"
dstate_init: sock /var/state/ups/lakeview_usb-deskups open on fd 5
send_to_all: SETINFO driver.version "2.3.0-1661M"
send_to_all: SETINFO driver.name "lakeview_usb"
send_to_all: SETINFO driver.parameter.pollinterval "2"
send: (4 bytes) => 01 00 00 30
read: (6 bytes) => 01 04 02 fe fc ff
send: (4 bytes) => 01 00 00 30
read: (6 bytes) => 01 04 02 fe fc ff
send: (4 bytes) => 01 00 00 30
read: (6 bytes) => 01 04 02 fe f4 ff
send: (4 bytes) => 01 00 00 30
read: (6 bytes) => 01 04 02 fe f4 ff
^CSignal 2: exiting
This is with the two swapped:
linux drivers # ./lakeview_usb -a deskups -DDDDD -u root
Network UPS Tools - Lakeview Research compatible USB UPS
driver 0.03 (2.3.0-1661M)
Warning: This is an experimental driver.
Some features may not function correctly.
debug level is '5'
Can't set Lakeview USB configuration, trying 3 more time(s)...
detached kernel driver from USB device...
send: (4 bytes) => 01 00 00 30
read: (6 bytes) => 01 04 02 fe fd ff
send: (4 bytes) => 01 00 00 30
read: (6 bytes) => 01 04 02 fe f4 ff
send: (4 bytes) => 01 00 00 30
read: (6 bytes) => 01 04 02 fe fd ff
send: (4 bytes) => 01 00 00 30
read: (6 bytes) => 01 04 02 fe fc ff
send: (4 bytes) => 01 00 00 30
read: (6 bytes) => 01 04 02 fe f5 ff
send_to_all: SETINFO driver.version.internal "0.03"
send_to_all: SETINFO ups.mfr "Lakeview Research compatible"
send_to_all: SETINFO ups.model "Unknown"
send: (4 bytes) => 01 00 00 30
read: (6 bytes) => 01 04 02 fe f4 ff
send_to_all: DATAOK
send_to_all: SETINFO ups.status "OL"
dstate_init: sock /var/state/ups/lakeview_usb-deskups open on fd 5
send_to_all: SETINFO driver.version "2.3.0-1661M"
send_to_all: SETINFO driver.name "lakeview_usb"
send_to_all: SETINFO driver.parameter.pollinterval "2"
send: (4 bytes) => 01 00 00 30
read: (6 bytes) => 01 04 02 fe fc ff
^CSignal 2: exiting
Still seems to work, apart from usb_set_configuration() failing once.
The second attempt invariably gets it. Is this satisfactory?
Best regards,
Peter van Valderen
More information about the Nut-upsdev
mailing list