<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Jan 8, 2010, at 7:29 AM, Tim Nicholson wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"> <div bgcolor="#ffffff" text="#000000"> Charles Lepple wrote: <blockquote cite="mid:14C64C17-A8DE-433D-862B-437C80E89C0F@ghz.cc" type="cite">On Jan 8, 2010, at 6:16 AM, Tim Nicholson wrote:  <br>  <br>  <blockquote type="cite">I am trying to write an interface in C so I can communicate with a PIC chip via USB using libhid, but I do not understand how to use the path information I am seeing to send and receive massages.    <br>  </blockquote>  <br> Your device's HID report descriptor does not specify any report IDs, so the paths don't matter.  <br>  <br> However, there is a chance that the device is only expecting you to read and write to the interrupt endpoints (not the control endpoint). Is the source code for this device available online?  <br>  <br> </blockquote> Charles, <br> <br> Thanks so much for replying so quickly.<br> <br> <font face="sans-serif">The code is part of the Microchip USB framework which can be downloaded from the microchip website. It is the generic HID example code for the low pin count development board which uses the PIC18F14K50.<br> Is there anything I can post that will help? I could email you the source I used to compile the .hex if you wouldn't mind taking a look?<br></font></div></blockquote></div><br><div>I could take a look after work. For the benefit of others searching the list in the future, can you post a direct link to the page on Microchip's site?</div><div><br></div><div>If you have made any significant changes to the source code, that would be useful to know - but if you are just reading and writing the 64-byte buffers being sent in and out, then the exact data probably doesn't matter. That also means that libhid is probably overkill for what you are doing. There are a few key libusb functions which you might be interested in, and you can save yourself some trouble by just incorporating that into your code.</div><div><br></div><div>libhid is really for devices like uninterruptible power supplies, which provide a "tree" of values (hence the "path" for specifying a value of interest). In the case of an UPS, you would want to poll a few key values to determine whether to shut down the system, and the rest are just statistics which are harvested less frequently.</div><div><br></div><div>Also, if your target application is more like a specialized mouse or keyboard, you can adjust the HID descriptor to mimic a standard input device. Microchip used to provide virtual mouse firmware which basically moved the mouse cursor around when you plugged the device in. This use case also doesn't require libhid, since the OS input subsystem would handle the events the same way it would read from your primary mouse and keyboard.</div></body></html>