Gent; I'm apologize for repeating a question that appeared to be answered in thread11137. It seems Doug and Tsuneo were trouble shooting a USB interrupt out problem. I'm having the same problem. No USB_EVT_OUT. I'm at the exact same point where Doug was on Feb 20. I do not see a resolution to Doug's effort on this or later threads. I am able to send 64 byte InReports with no problems.
This is a copy of my URB from the HHD snooper software.
000173: Bulk or Interrupt Transfer (DOWN), 28.03.2008 18:06:13.625 +0.0 Pipe Handle: 0x8924ed4c (Endpoint Address: 0x81) Get 0x40 bytes from the device 000174: Bulk or Interrupt Transfer (UP), 28.03.2008 18:06:13.656 +0.031. Status: 0x00000000 Pipe Handle: 0x8924ed4c (Endpoint Address: 0x81) Get 0x40 bytes from the device 01 55 AA FF 00 00 00 00 00 00 00 00 00 00 00 00 .Uªÿ............ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 AF ..............ð¯
This is repeated at the specified 32 milliseconds. At the same time in my Host App, I have a forever loop calling WriteFile to write 8 bytes. I do not see any out packets other than the control packets to request an InReport. Using the original Keil example, I can see Up/Down packets but the Down packets appear to be Control Transfers.
This code is a stripped version from John Hyde's BALVC code from his book.
unsigned long BytesWritten, BytesRead; UCHAR OutReport[8] = {2,3,5,4};
case 'l': printf("\nValue to be written to Dig_Out: "); while(1){ // For test only - Remove!!!!!!! for(i=0; i<10000; i++); // just a delay Result = (WriteFile(Handle, OutReport, sizeof(OutReport),&BytesWritten, NULL)); if (Result == FALSE) printf("\nError writing to I/O device\n"); } break; case 'e':
I'm using VS 2005. Setting a breakpoint at the line if(Results..... I can look at OutReport buffer and the hard coded values appear correct. BytesWritten is 0. The Handle value is the same as the Handle value for the ReadFile operation which works fine. Results == FALSE. The descriptor configs look correct to me but I include them also. They were captured via USBView. I edited the VendorID and ProductID. NDA and all that stuff.
I guess I'm asking how to proceed from this point to determine if the problem is in the Host app which is stripped to a bare minimum or in the device program which works fine with InReports in interrupt transfers and OutReports in Control transfers but not interrupt transfers.
Yes, one other thing. My manufacterID, etc., strings appear in the String buffer transmitted as Unicode. Is this the defalut for USB? Is there a software switch to enable/disable? Can this be part of my problem?
My Keil Software is MDK full Version 3.20. My JTAG is Ulink2.
Device Descriptor: bcdUSB: 0x0110 bDeviceClass: 0x00 bDeviceSubClass: 0x00 bDeviceProtocol: 0x00 bMaxPacketSize0: 0x40 (64) idVendor: 0xXXXX idProduct: 0xXXXX bcdDevice: 0x0100 iManufacturer: 0x04 iProduct: 0x20 iSerialNumber: 0x42 bNumConfigurations: 0x01 ConnectionStatus: DeviceConnected Current Config Value: 0x01 Device Bus Speed: Full Device Address: 0x02 Open Pipes: 2 Endpoint Descriptor: bEndpointAddress: 0x81 IN Transfer Type: Interrupt wMaxPacketSize: 0x0040 (64) bInterval: 0x00 Endpoint Descriptor: bEndpointAddress: 0x01 OUT Transfer Type: Interrupt wMaxPacketSize: 0x0040 (64) bInterval: 0x20