I know what you said. One endpoint with one pipe. I just want to know how to open two pipes of two endpoints in the same time. So I can receive and send data synchronously. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Saturday, December 15, 2007 2:43 AM To: javax-usb-devel@lists.sourceforge.net Subject: Re: [javax-usb-devel] how to read while writing with the usbPipe!
You can only open one pipe on a given endpoint. That pipe has to be either an IN or an OUT, depending on how that endpoint is defined. To do IN and OUT, you need to separate endpoints. ---- "Xie wrote: > > > Dan, > > I have been trapped in a problem recently. That is, when I use an USBPipe of > BULK-OUT type to write something to the device, how can I read some reply > from the device? > > I tried to open an usbpipe of BULK-IN type, but I got an exception said that > it cannot open two usbpipes. > > However, if I close the out usbpipe, the data transferring will be > interrupted, which will cause an error. > > So what's your opinion? And is there a way to read from and write to the > device in the same time? > > Or, how to tell the device that the data transferring is not over when the > usbpipe is closed? > > > > In additional, another question: when I use "UsbPipe.syncSubmit(buffer);", > how can I know that the all the submissions are over and the UsbPipe can be > closed? (Sometimes when close the pipe, I get an exception that cannot close > the pipe because there are some pending submissions) > > > > Thanks. > > Yours, > > Sincerely, > > Ric > > > > Best Regards! > ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ javax-usb-devel mailing list javax-usb-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/javax-usb-devel ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ javax-usb-devel mailing list javax-usb-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/javax-usb-devel