Ok, I think I'll have to look over the trace...

On Thu, 12 Jun 2003, Benjamin Milde wrote:

>00000097       1.36101920        Interface[0]: NumberOfPipes     = 0x00000004

ok, we have four pipes (besides the DCP):

>00000099       1.36195040        Interface[0]: Pipes[0] : EndpointAddress   = 0x82 
>(Pipe #2, INPUT)
>00000101       1.36201120        Interface[0]: Pipes[0] : PipeType          = 0x02 
>(UsbdPipeTypeBulk)
>00000102       1.36293280        Interface[0]: Pipes[0] : PipeHandle        = 
>0xc157d3a8       

>00000106       1.36481360        Interface[0]: Pipes[1] : EndpointAddress   = 0x02    
> (Pipe #2, OUTPUT)
>00000108       1.36487040        Interface[0]: Pipes[1] : PipeType          = 0x02 
>(UsbdPipeTypeBulk)  
>00000109       1.36576880        Interface[0]: Pipes[1] : PipeHandle        = 
>0xc157d3bc

>00000113       1.36674880        Interface[0]: Pipes[2] : EndpointAddress   = 0x81 
>(Pipe #1, INPUT)
>00000115       1.36767680        Interface[0]: Pipes[2] : PipeType          = 0x03 
>(UsbdPipeTypeInterrupt)
>00000116       1.36770480        Interface[0]: Pipes[2] : PipeHandle        = 
>0xc157d3d0       

>00000120       1.36958560        Interface[0]: Pipes[3] : EndpointAddress   = 0x01    
> (Pipe #1, OUTPUT)
>00000122       1.36964240        Interface[0]: Pipes[3] : PipeType          = 0x02 
>(UsbdPipeTypeBulk)  
>00000123       1.37054000        Interface[0]: Pipes[3] : PipeHandle        = 
>0xc157d3e4

Here is a buffer going to input pipe #1.

>00000130       66.65338320     >>>>>>> URB 4 going down...     
>00000132       66.65343360       PipeHandle           = c157d3d0       
>00000134       66.65349200       TransferBufferLength = 00000010       

Here is a Default Control Pipe "vendor" request.  You probably need to do this!
In ControlUsbIrp terms, this has no data (use an empty byte[]), and the 
control-specific
data is
bmRequestType = 0xc0 (dir=input, type=vendor, recip=device)
bRequest = 0x22
wValue = 0x0101
wIndex = 0x0000

>00000140       66.66244480     >>>>>>> URB 5 going down...     
>00000143       66.66252080       TransferBufferLength = 00000000
>00000148       66.66260640       RequestTypeReservedBits = 00  
>00000149       66.66262560       Request                 = 22
>00000150       66.66264480       Value                   = 0101        
>00000151       66.66266400       Index                   = 0000

Here is your data getting sent to output pipe #2.

>00000154       66.66297760     >>>>>>> URB 6 going down...     
>00000156       66.66302320       PipeHandle           = c157d3bc       
>00000158       66.66307520       TransferBufferLength = 0000000d       
>00000163       66.66320000      10 02 31 03 00 00 00 10 03 c6 a7 05 00

here is something coming back on input pipe #1!

>00000166       66.66681120     <<<<<<< URB 4 coming back...    
>00000168       66.66773840       PipeHandle           = c157d3d0       
>00000170       66.66822080       TransferBufferLength = 0000000c       
>00000175       66.67058240      c1 20 00 00 00 00 04 00 01 00 03 0b

here we go, this is a buffer going to input pipe #2.  Note that
this is a big buffer!  It's 0x800 bytes, which is 2048 bytes!

>00000179       66.67251440     >>>>>>> URB 7 going down...
>00000181       66.67299280       PipeHandle           = c157d3a8
>00000183       66.67350560       TransferBufferLength = 00000800

and here is another buffer going to input pipe #1.

>00000189       66.67634800     >>>>>>> URB 8 going down...
>00000191       66.67729520       PipeHandle           = c157d3d0
>00000193       66.67825840       TransferBufferLength = 00000010

Here is the output to pipe #2 finishing.

>00000198       66.68204000     <<<<<<< URB 6 coming back...    
>00000200       66.68208400       PipeHandle           = c157d3bc       
>00000202       66.68304560       TransferBufferLength = 0000000d       

And here is the 2 bytes you were waiting for coming back
from input pipe #2.

>00000207       66.68588960     <<<<<<< URB 7 coming back...
>00000209       66.68683680       PipeHandle           = c157d3a8
>00000211       66.68779760       TransferBufferLength = 00000002
>00000216       66.68877040      10 06  


Here's what I suggest:
-subit a buffer to both input pipes.  Use the the sizes
 that the trace shows; for pipe #1, use 0x10 bytes,
 for pipe #2, use 0x800 bytes.
-in whatever you use to manage each pipe's input buffer,
 when you get that buffer back, make sure to submit
 another buffer.  You always want to have a buffer available
 to all input pipes.
-after submitting the input buffers, send the vendor-type
 request.
-finally, send the data to output pipe #2.

after all that, hopefully you should get the 2 bytes back you're
expecting.  Let me know how it goes...



-- 
Dan Streetman
[EMAIL PROTECTED]
---------------------
186,272 miles per second:
It isn't just a good idea, it's the law!


-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
javax-usb-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/javax-usb-devel

Reply via email to