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
Charles Lepple
2007-Mar-15 04:19 UTC
[Nut-upsdev] Re: status of tripplite_usb and FreeBSD 6.2
On 3/6/07, Charles Lepple <clepple@gmail.com> wrote:> 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.In case anyone is following the FreeBSD/HID saga, I just had a small breakthrough. Even when using the built-in uhid driver to talk HID to the UPS, I had to reopen the /dev/uhid0 node every time I wanted to send a new command. Otherwise, the kernel would return stale data. I'm not sure why this is happening, but it might just be a workaround for people itching to get their Tripp Lite systems working with FreeBSD. The code is in branches/tl_usb_fbsd, but keep it away from small dogs and children - it's scary. -- - Charles Lepple
Maybe Matching Threads
- Problem OMNIVS1000 USB uses tripplite_usb or usbhid-ups
- Cannot get Tripplite su2200xla working on freebsd 7.1 nut 2.4.1
- Re: [nut-commits] svn commit r848 - branches/tl_usb_fbsd/drivers
- Tripp Lite G1000U (0x2007)
- Tripplite SMART2200VS with tripplite_usb: UPS doesn't shut down