using the USB framework with a linux host
I have managed to program the low pin count USB development kit (PIC18F14K560) with various demo code from the USB Framework (Microchip solutions) such as the mouse and keyboard demos and they work fine when plugged into a Windows PC.
The reason for me getting this board is that I need to build a keypad that will interface with an embedded device which is running Linux. The only I/O I have available is USB, so I figured I would use the PIC18F14K560 as a HID device and emulate a keyboard that way. I only need 12 keys so I am going to use a 74C922 keypad decode chip in conjunction with the PIC - Simples!
The problem I am having is although everything works fine with Windows, it does not work with Linux (I am testing this using a Ubuntu desktop PC) . When I plug in the development kit running the keyboard demo software I get the following errors in the system log. [ 6278.693795] usb 4-1: new full speed USB device using uhci_hcd and address 3
[ 6278.880036] usb 4-1: device descriptor read/64, error -71
[ 6279.111305] usb 4-1: device descriptor read/64, error -71
[ 6279.340489] usb 4-1: new full speed USB device using uhci_hcd and address 4
[ 6279.473777] usb 4-1: device descriptor read/64, error -71
[ 6279.712526] usb 4-1: device descriptor read/64, error -71
[ 6279.940039] usb 4-1: new full speed USB device using uhci_hcd and address 5
[ 6280.360023] usb 4-1: device not accepting address 5, error -71
[ 6280.483777] usb 4-1: new full speed USB device using uhci_hcd and address 6
[ 6280.900037] usb 4-1: device not accepting address 6, error -71
[ 6280.900051] hub 4-0:1.0: unable to enumerate USB device on port 1
I am guessing that the kernel does not recognise the device although I am no expert on Linux USB or its messages.
Has anyone got any tips on what I need to do to get this working. Do I need to create a special Linux driver or is it just a case of getting the descriptors right? If the latter is the case, any pointer would be much appreciated.
I am very new to USB so please keep it as simple as possible to start with, If you assume I know nothing you will not be far off the mark ;-)
post edited by gbkjs - 2009/12/15 09:34:13