I use usb controller in Lpc2148. I get example code from keil website in HID class. I need adapt InReport up to 64 byte( InReport[0],InReport[1]....,InReport[64]) for send more data but I donn't good enough in C programming. How can I do? pleas give code. How can I develop application software in the host side. I need Visual Basic 6 thanks you
I've downloaded usbview. Doug
This is what I get on the USBView
Device Descriptor: bcdUSB: 0x0110 bDeviceClass: 0x00 bDeviceSubClass: 0x00 bDeviceProtocol: 0x00 bMaxPacketSize0: 0x40 (64) idVendor: 0x0000 idProduct: 0x0000 bcdDevice: 0x0100 iManufacturer: 0x04 0x0409: "Keil Software" iProduct: 0x20 0x0409: "Keil MCB2140 HID" iSerialNumber: 0x42 0x0409: "DEMO00000000" bNumConfigurations: 0x01 ConnectionStatus: DeviceConnected Current Config Value: 0x01 Device Bus Speed: Full Device Address: 0x01 Open Pipes: 1 Endpoint Descriptor: bEndpointAddress: 0x81 Transfer Type: Interrupt wMaxPacketSize: 0x0040 (64) bInterval: 0x20 Configuration Descriptor: wTotalLength: 0x0029 bNumInterfaces: 0x01 bConfigurationValue: 0x01 iConfiguration: 0x00 bmAttributes: 0x80 (Bus Powered ) MaxPower: 0x32 (100 Ma) Interface Descriptor: bInterfaceNumber: 0x00 bAlternateSetting: 0x00 bNumEndpoints: 0x01 bInterfaceClass: 0x03 (HID) bInterfaceSubClass: 0x00 bInterfaceProtocol: 0x00 iInterface: 0x5C 0x0409: "HID" HID Descriptor: bcdHID: 0x0100 bCountryCode: 0x00 bNumDescriptors: 0x01 bDescriptorType: 0x22 wDescriptorLength: 0x001B Endpoint Descriptor: bEndpointAddress: 0x81 Transfer Type: Interrupt wMaxPacketSize: 0x0040 (64) bInterval: 0x20 Endpoint Descriptor: bEndpointAddress: 0x01 Transfer Type: Interrupt wMaxPacketSize: 0x0040 (64) bInterval: 0x20
Doug
I've got the InReport working, the flag I put finally was set ! :D It was a problem with my application.
Now to the OutReport the kit doesn't even get a USB_EVT_OUT. I suppose the problem is also on the win application but I haven't found out what it is. Doug
The output of USBView on your post is fine. It is confirmed that the enumeration finishes successfully.
"I've downloaded the win DDK and also the VC++ 9.0. I tried to compile with VC++ and had no luck."
WinDDK is distributed with its own C compiler.
To compile USBView on WinDDK, 1) Select one of environment which fits to your OS version (Win XP/2k/2k3) - Start button > Development Kits > Windows DDK 3790.1830 > Build Environments > WinXP [/ Win Server 2k3 / Win2k] > Free build - DOS window pops up.
2) Move to usbview directory and build it > cd src\wdm\usb\usbview > build -cZg
It is documented in "Building a Sample Driver" section of WinDDK help.
"As to the third thest, I don't have a high speed hub so that won't work."
I think you have. "USB2.0 hub" is a High-Speed hub :-)
"Now to the OutReport the kit doesn't even get a USB_EVT_OUT. I suppose the problem is also on the win application but I haven't found out what it is."
When you aren't sure which side the problem lies on, the firmware or the host app, look at the USB traffic.
In this case, - Step execute your host app around WriteFile - If you see nothing on the sniffer (or hardware bus analyzer), the host app is the culprit. - If you see expected URB (USB Request Block), but it doesn't finish, the firmware is the culprit.
For this purpose, any software sniffer will do.
I recommend you SourceUSB in my above post, because this (and BusHound) is the only software sniffer which can catch erroneous enumeration process. Other software sniffers fail to show the enumeration process when it doesn't complete. However, once the enumeration finishes, you can use any software sniffer for debug.
Free, open-source: SnoopyPro sourceforge.net/.../
Commercial, 1-month eval: HHD USB Monitor www.hhdsoftware.com/.../usb-monitor.html etc.
Tsuneo
Tsuneo the problem is on the win application. To fix that wouldnt In the case I need to write a driver, does anybody have code for an application written in C++ that compiles with Builder C++? It woold save me a lot of time plus I dont know how to write a driver... Thanks for all the help Doug
This HID component is written in Delphi, but also compatible to BCB (Borland C++ Builder).
"Human Interface Device controller suite" by Robert Marquardt www.soft-gems.net/index.php - Compatible with Delphi 4 to 6 and BCB (tested with BCB 6 Trial).
Tsuneo, you wouldn't have another source for an HID driver for windows would you? Cause I've downloaded the source from where you mentioned but had no luck on putting it to work... the website doesn't provide any support, just a forum where Mike Lischke(the owner) posted a how to make it work but that wasn't of any help Regards, Doug
It's not for BCB but VC6, On "The HID Page" by J.Axelson, http://www.lvr.com/hidpage.htm "Usbhidio_vc6" www.lvr.com/.../usbhidio_vc6.zip
As written in the page, you need HID header files (hid.h, hidsdi.h and hid.lib) for above example. It is included in WinDDK.
"DDK - Windows Driver Development Kit" from MS WHDC www.microsoft.com/.../default.mspx Find "Download the Windows Server 2003 SP1 DDK [236 MB ISO file]" link
You'll also find the HID header files from Win2k DDK in this site for the book, "USB Design by Example, 2nd Edition" (Intel press) www.intel.com/.../FromDDK.htm