I am running a 2.4.21 kernel with the hid module and hiddev enabled. I can see the board is recognized when I plug in the USB cable because I get the following message:
hub.c: new USB device 00:1d.3-1, assigned address 5
hiddev0: USB HID v1.00 Pointer [Microchip Technology Inc. PICkit(TM) 1 FLASH Starter Kit]
on usb4:5.0
I have tried accessing it with the hiddev driver, but have not had much luck beyond extracting a few strings from the USB controller. The documentation for the USB communications protcol says, "The USB protocol used by the PICkit 1 FLASH Starter Kit is very simple command/response type protocol. Multiple commands can be put together to fill the 8 bytes of a USB packet. If a command cannot fill the 8 bytes and it is not desired to use a second command to fill the packe, the packet should be padded with 'Z' to indicate no operation." It then goes on to list the specific commands that can be sent and the expected responses. There is not much more information about the device in the documentation . (I'm waiting for a reply to my email to Microchip's tech. support).
I admit I am not very familiar with USB details. I did look through the USB spec. and saw that low speed devices use 8 byte packets, so I am guessing this is a low speed device. The USB HID specification and the Linux HID documentation I found talked a lot about reports and endpoints, none of which are mentioned at all in the PIC documentation. It is not clear to me how the 8 byte packets in the PIC documentation map onto reports in hiddev API. Do I need to write my own kernel level driver that works at a lower USB layer than hiddev?
Also I came across a small problem when trying the HIDIOCAPPLICATION ioctl example. The example code calls the ioctl and tests the return value like this:
appl = ioctl(fd, HIDIOCAPPLICATION, yalv);
if (appl > 0) {
printf("Application %i is 0x%x ", yalv, appl);
/* The magic values come from various usage table specs */
switch ( appl >> 16)
[...]My development board returns 0xFF000001 for the appl, which makes the appl > 0 test fail. If I change the test to appl == -1, it works ok, except that the ">>" sign extends appl, so you have to mask off the high bits. According to the HID Usage Tables, 0xFF00 is a "Vendor Defined" application type. I ended up changing the example to:
appl = ioctl(fd, HIDIOCAPPLICATION, yalv);
if (appl == -1) {
printf("Application %i is 0x%x ", yalv, appl);
/* The magic values come from various usage table specs */
switch ( (appl >> 16) & 0xff00 )
[...]I also added a case for 0xff00 to the case statement.
Any help you can provide will be greatly appreciated.
Thanks, Bill Dieter.
------------------------------------------------------- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users
