[Nut-upsdev] status of tripplite_usb and FreeBSD 6.2

Charles Lepple clepple at gmail.com
Wed Mar 7 04:49:44 CET 2007


I got FreeBSD up and running last night (many thanks to Charles
Sprickman for a ton of useful suggestions along the way), and took a
look at tripplite_usb on an OMNIVS1000.

The tripplite_usb driver basically sends old-school Tripp Lite serial
commands to the UPS via HID SetReport packets, and receives responses
over the first Interrupt IN pipe.

Later UPSes seem to be more deterministic in this regard, but the
OMNIVS1000 requires that you send a command, and poll the interrupt
endpoint to see if the buffer changes to match what you sent. The USB
chip seems to return data all the time, but if things don't work out
somewhere between the USB interface and the UPS' internal serial port,
it just returns the same data as the last time. (I work around this by
trying not to send the same command back-to-back.)

On FreeBSD 6.2, this only works once or twice, then it just stops
returning new data. Since I'm not getting any error codes, I can't
tell where the problem lies. It would seem like I should get an error
code on the send side, but as far as I can tell, the right number of
bytes are returned from libusb.

And there it stands. I'll try to look into USB debugging, but if
anyone knows any *BSD USB gurus, can you have them take a look at
tripplite_usb.c to see if we might be running up against partially
implemented code or something?

-- 
- Charles Lepple



More information about the Nut-upsdev mailing list