[libhid-discuss] NetBSD and reports

Adrian adrian650 at yahoo.com
Mon Mar 10 12:42:26 UTC 2008


Hello,

I'm trying to interface the minibox USB LCD 20x2 to a small PC (it was a WinCE thin client). I'm doing my development on a McBook with Parallels running NetBSD 3.1. I know the LCD unit works as I've tried the WinXP utility and it does what it should. 

The LCD manual gives the report codes for both input and outputs and most of these are just 1 or 2 bytes (I'll leave the long ones until later!). I tried using the NetBSD uhid drivers and ioctl calls to set reports but always got fail messages. I could read just via file handles but I really need to control the LCD too. Anyway I decided to try libhid to set the reports. It compiled fine and when I disabled the kernel uhid drivers so that my LCD appeared under a ugen kernel driver  the test_libhid example located the display with its manufacturer/product ID and dumped the addresses.

I suppose I have 2 issues about "hid_set_output_report()". First, I'm not really sure how to use the path values. I don't understand the comments in the test_libhid.c file! Also by messing with these it seems to alter the report code being sent. That's good, as I need a dozen or so reports to control the LCD. How does the path relate to report codes?

The second question regards the report message. The UHID documentation seems to suggest that a report message starts with the report id byte and then the desired length of bytes. Should I be including the report code in my message to send or does the libhid stuff it in? 

Incidentally lsusb doesn't seem to exist in NetBSD so I have to use the trace-dump.

Thanks,

Adrian
 
-
*********************************************


      ___________________________________________________________ 
Rise to the challenge for Sport Relief with Yahoo! For Good  

http://uk.promotions.yahoo.com/forgood/



More information about the libhid-discuss mailing list