to get data in, you have to provide a buffer. You're talking to devices at the raw USB level, and nothing is done for you. Adding a listener does not do anything, the listener is just sees data transfers, but you have to perform the data transfer.
For an in-direction bulk pipe, you should create at least one UsbIrp (or use plain byte[]). Do an asyncSubmit() to the in-direction pipe with a "empty" buffer (the size should be whatever size of data you want back, at least the wMaxPacketSize of the pipe). You should probably create multiple buffers, and asyncSubmit() all of them. Then as the devices sends data back, you will get each submitted buffer back. When there are no more buffers pending on the in-direction pipe, it will stop communicating. No more data will transfer until you provide more buffer(s). On Mon, 27 Sep 2004 [EMAIL PROTECTED] wrote: > >Hi, > > > >I am trying to communicate with a USB A/D converter card using "UsbPipe asynchronous >submission" as described in chapter 12 >(JSR80 API Specification). > > > >My device has 1 interface and two endpoints (One for each direction, both are "bulk": >pipeOut, pipeIn). > >I have problems in receiving data from my device because I am not sure how to set up >the Listener correctly. So far this has >been done: > > > >1) I claim the Interface > >2) I open both pipes using method open(); > >3) I create a UsbIrp using pipeIn.create... & pipeOut.create... > >4) I insert my byte[] into OutUsbIrp using setData(); > >5) I add the Listener: pipeIn.addUsbPipeListerner(); > >6) I transmit the data using pipeOut.asyncSubmit(OutUsbIrp) > > > >I'd appreciate if anyone could give me an example of how to program the >UsbPipeListener and UsbPipeEvent. > > > >Thanks a lot; Jens. > > > > > > >2,90 EUR geschenkt: kostenloser Probemonat bei Lycos Premium Mail: 250 MB, Super >Antispam, Pop3, SSL uvm - jetzt kostenlos >testen! > > -- 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: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php _______________________________________________ javax-usb-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/javax-usb-devel