2009/5/6 Hsieh Dinow <dino...@gmail.com>:
> Yes, I studied the HID and have a success experience on Windows.
> But this time i confused at the set or get data by ways of the Report_ID via
> Java on the Linux

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.

> Below are the ideas i tried in java. If anything wrong or mistake, please
> don't hesitate to correct me.
>
> 1. By ways of the UsbControlIRP, I could set or get the data "from host to
> usb" or "from usb to host", respectively. right ?

Yes.

> 2. I have no idea that which parameter should i set the
> "Report_ID" (bmRequestType, bRequest, wValue, wIndex)

It is very clear about this in the HID spec.  Have you read the HID
spec?  Send the URL link so I can make sure you are looking at the
right document.

> 3. Or could someone give your successful experience or advise to let me
> adject the direction.
> 4. Anyway so thanks to your reading ^^
>
>
> =============My Concise Code======================
>
> UsbEndpoint endpoint = (UsbEndpoint) theInterface.getUsbEndpoints().get(0);

Did you claim the interface?  And specifically what endpoint are you
tring to get?

> UsbPipe pipe = endpoint.getUsbPipe();
>
> UsbControlIrp irp = pipe.createUsbControlIrp(bmRequestType, bRequest,
> wValue, wIndex);

Looks fine, assuming your device really does have a non-default
control pipe.  I kinda doubt that.

> byte data[] = new byte[];
>
> irp.setData(data);

Really, you have no data to send/receive?

> pipe.open;
>
> pipe.syncSubmit(irp);
>
> waitUntilComplete();

There is no global waitUntilComplete() method.  And you don't seem to
have read the javadoc for the syncSubmit() and waitUntilComplete()
methods.  Read that javadoc so you understand what the contract for
each method is.


>
> ------------------------------------------------------------------------------
> 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

Reply via email to