Please copy the mailing list. On Feb 18, 2008 10:29 AM, <[EMAIL PROTECTED]> wrote: > 1) Make threads for the Interrupt-Bulk & In-Bulk where I can check the > whole time if I get an answer and if not to resubmit the command > 2) Make a method where I check if the answer is correct and if not to > resubmit it
if these are questions, i don't understand them. > It's strange the things work perfectly but sometimes I have to resubmit > the commands (it's a thing of testing ....) > > Here is a example: > > if I send {0,0,0,0,5,0,0,0,0,0} BulkOut > I get an answer of the Interrupt {0,0,0,0,6,0,0,0,4,...} > than I can send the real command - Product_Request > {20,0,0,0,254,0,0,0,0} BulkOut > and I get at the Interrupt {0,0,0,2,0,0,0,0,0} --> ready to read from > the Bulk-In{20,0,0,0,255,0,0,0,110,.....} > > I have to send the commands for the BulkOut twice - what do you thing is > the best method for me ;) I don't know your device's protocol, so I cannot help you with what specific bytes you need to send to it. That is ENTIRELY up to the device and its protocol. > Thx for everything ;) - you was a big Help for me ;) > > > > > Sorry, I don't understand what you are talking about. Can anyone else > > on the mailing list help? Or can you restate the problem more > > clearly? > > > > On Feb 17, 2008 11:35 AM, FRESNEL Franck <[EMAIL PROTECTED]> wrote: > >> > >> I'm french so my english is not very good, sorry ! > >> my program wait, and I don't understand why. if I use the method > >> asyncSubmit, the response is only 0..0 > >> > >> //my program > >> UsbDevice orphyEnCours = (UsbDevice) usbOrphy.get(0); > >> UsbInterface interfaceEnCours = > >> orphyEnCours.getActiveUsbConfiguration().getUsbInterface((byte) 0); > >> interfaceEnCours.claim(new UsbInterfacePolicy() { > >> public boolean forceClaim(UsbInterface usbInterface) { > >> return true; > >> } > >> }); > >> > >> [...] > >> UsbEndpoint endpointIN = > >> (UsbEndpoint)interfaceEnCours.getUsbEndpoints().get(2); > >> UsbPipe pipeIN = endpointIN.getUsbPipe(); > >> pipeIN.open(); > >> byte[] dataIN = new byte[64]; > >> > >> UsbEndpoint endpointOUT = > >> (UsbEndpoint)interfaceEnCours.getUsbEndpoints().get(0); > >> UsbPipe pipeOUT = endpointOUT.getUsbPipe(); > >> pipeOUT.open(); > >> String version = (new String("WVERSION\r")); > >> UsbIrp irpOUT_VER = pipeOUT.createUsbIrp(); > >> byte[] bversion = version.getBytes(); > >> irpOUT_VER.setData(bversion); > >> pipeOUT.syncSubmit(irpOUT_VER); > >> UsbIrp irpIN = pipeIN.createUsbIrp();nd my english is very bad > >> irpIN.setData(dataIN); > >> pipeIN.syncSubmit(irpIN); > >> //******************************************************** > >> the result: > >> systeme ORPHY GTS II found > >> descripteur (byte):1 > >> descripteur (String):bLength : 18 > >> bDescriptorType : 0x01 > >> bcdUSB : 0200 > >> bDeviceClass : 0x00 > >> bDeviceSubClass : 0x00 > >> bDeviceProtocol : 0x00 > >> bMaxPacketSize0 : 64 > >> idVendor : 0x10fc > >> idProduct : 0x0170 > >> bcdDevice : 0000 > >> iManufacturer : 1 > >> iProduct : 2 > >> iSerialNumber : 3 > >> bNumConfigurations : 1 > >> > >> interface active > >> usbEndpoint DIRECTION n°0:OUT:TYPE BULK:0x2 > >> usbEndpoint DIRECTION n°1:OUT:TYPE BULK:0x4 > >> usbEndpoint DIRECTION n°2:IN:TYPE BULK:0x-122 > >> usbEndpoint DIRECTION n°3:IN:TYPE BULK:0x-120 > >> usbEndpoint DIRECTION n°4:OUT:TYPE BULK:0x1 > >> usbEndpoint DIRECTION n°5:IN:TYPE BULK:0x-127 > >> > >> and wait, > >> > >> thanks > >> > >> > >> > >> > >> > >> ________________________________ > >> Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! > >> Mail > >> ------------------------------------------------------------------------- > >> This SF.net email is sponsored by: Microsoft > >> Defy all challenges. Microsoft(R) Visual Studio 2008. > >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > >> _______________________________________________ > >> javax-usb-devel mailing list > >> javax-usb-devel@lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/javax-usb-devel > >> > >> > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Microsoft > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > _______________________________________________ > > javax-usb-devel mailing list > > javax-usb-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/javax-usb-devel > > > > > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ javax-usb-devel mailing list javax-usb-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/javax-usb-devel