On Thu, May 7, 2009 at 6:02 AM, Hsieh Dinow <dino...@gmail.com> wrote: > Q1 : What you mean is you are confused at the set or get data by ways of > the Report_ID via USB. Java and Linux have nothing to do with it. > A1 : Because I never succesfully get the response(data) so i confused a lot.
Yes, I think you are confused a lot ;-) > Q2 : Did you claim the interface? And specifically what endpoint are you > tring to get? > A2 : Yes, I have claimed that interface and it only has only one endpoint > (In-Endpoint) Good. FYI, you know it's possible the claim can fail...I'll assume for now that the claim succeeded... > =================================================================================== > 1. I could get the data(115) by the ReportID(29) in Windows. > 2. In fact, i am so dubitable about the parameter to that 4 parameters > (UsbControlIrp) > 3. Please give me any advise, direction, or correct if you have any doubts. I'm sorry, but I have repeatedly told you to read the HID spec and I don't believe that you have even downloaded it. You seem to just want me to tell you exactly what to do. So I will state ONE MORE TIME: you need to download and read the HID spec. Until you do, I am not going to answer any more of your questions. To make it really easy on you; here is the link to get the spec: http://www.usb.org/developers/devclass_docs/HID1_11.pdf Once you download and read the spec, reply with the specific section number that describes a "Get Report" request. Then I'll know you have at least downloaded and browsed it, and I'll be glad to clarify the spec for you. Again, sorry, but I won't do your work for you. > 4. Below are my code and Thank your reading > =================================================================================== > > class PacketAPP extends Thread{ > public static UsbEndpoint endpoint = null; > public PacketAPP(UsbEndpoint endpoint){ > this.endpoint = endpoint; > } > public void run(){ > try{ > UsbPipe pipe = endpoint.getUsbPipe(); > byte bmRequestType = (byte)0xA1; > byte bRequest = UsbConst.REQUEST_SET_FEATURE; > short wValue = 0x1D03; > short wIndex = 0; > UsbControlIrp irp = pipe.createUsbControlIrp(bmRequestType, > bRequest, wValue, wIndex); > byte data[] = new byte[3]; > irp.setData(data); > pipe.open(); > while(true){ > pipe.syncSubmit(irp); > irp.waitUntilComplete(); > for(int i=0; i<data.length; i++){ > System.out.print(data[i]+" "); > } > irp.setComplete(false); > sleep(1000); > } > } > catch(UsbException e1){ > System.err.println("Exception : Class ReceivePacketAPP : run() : e1 : " + > e1); > } > catch(Exception e3){ > System.err.println("Exception : Class ReceivePacketAPP : run() : e3 : " > + e3); > } > }} > ------------------------------------------------------------------------------ > The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your > production scanning environment may not be a perfect world - but thanks to > Kodak, there's a perfect scanner to get the job done! With the NEW KODAK > i700 > Series Scanner you'll get full speed at 300 dpi even with all image > processing features enabled. http://p.sf.net/sfu/kodak-com > _______________________________________________ > javax-usb-devel mailing list > javax-usb-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/javax-usb-devel > > ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ javax-usb-devel mailing list javax-usb-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/javax-usb-devel