Trying to use a USB HID device (APC RS-500) without success
riccardo at torrini.org
Sat Jun 7 13:41:36 PDT 2003
I already sent this message without reply. I need only a pointer to
the right direction, please, I think I'm near the solution...
PS: please Cc: me, I follow only current@
----- Forwarded message from myself <riccardo at torrini.org> -----
I'm trying to interface my new APC (RS 500) with FreeBSD 4.8-STABLE but
I found some (a lot of?) problems:
# usbdevs -v -d
addr 1: self powered, config 1, UHCI root hub(0x0000), VIA(0x0000), rev 1.00
port 1 powered
port 2 addr 2: low speed, self powered, config 1, \
Back-UPS RS 500 FW:30.j2.I USB FW:j2(0x0002), \
American Power Conversion(0x051d), rev 0.06
Looking into source I found that prototyping:
-----8<-----[ /usr/src/lib/libusbhid/libusbhid.h ]-----8<-----
int hid_report_size(report_desc_t d, unsigned int id, enum hid_kind k);
is different from man page (2nd/3rd parameter swapped):
-----8<-----[ man hid_report_size ]-----8<-----
hid_report_size(report_desc_t d, unsigned int id, hid_kind_t k);
I think man page is wrong, but this is not a problem.
After playing with usbhidctl I found that my APC use 0xff84, 0xff85 and
0xff86 instead of 0x84, 0x85 and 0x86 as it would so I created a custom
file with the contents of /usr/share/misc/usb_hid_usage and with a copy
of pages 132/133 to 0xff84/0xff85 and now it decode pages/usages.
Now I'm at a dead end, usbhidctl say:
device does not support immediate mode, only changes reported.
but interrogating device with -a and/or -l show me only zeros.
If you need my config/boot.log feel free to download them from:
What else can I do (apart from changing UPS)?
I hope you can point me to the right direction (docs or ML)...
PS: can we change .../usb_hid_usage and use hex notation, instead of
decimal one, also for pages because usbhidctl report them as hex?
Riccardo. ( http://www.GUFI.org/~vic/ )
More information about the freebsd-hackers