In Windows you are using HID!  javax.usb isn't HID.  You need to read
and understand the HID spec.  Have you done that?

On Fri, Apr 24, 2009 at 5:04 AM, Hsieh Dinow <dino...@gmail.com> wrote:
> 1. I want to get the data by the certain one USB Report ID via Java in Linux
> Environment.
> 2. Everything is okay in Windows with the API: HidD_getfeature(Device,
> buffer[], int length);
> 3. But the result is incorrect in Java.
> 4. i am in a dilemna and have no ideal how to progress?
> 5. Please give me any advises, correct, or suggestion to my below code.
> 6. Or i was totally in the wrong direction?
>
> UsbPipe pipe = endpoint.getUsbPipe();
> byte bmRequestType =
> ?                                                              //I have no
> idea to set up this byte.
> byte bRequest = UsbConst.REQUEST_SET_FEATURE;                 //3
> short wValue =
> 29;                                                                       //Report_ID
> short wIndex = 0;
> UsbControlIrp irp = pipe.createUsbControlIrp(bmRequestType, bRequest,
> wValue, wIndex);
> byte data[] = new byte[3];
> irp.setData(data);
> pipe.open();
> try{
>  while(true){
>   pipe.syncSubmit(irp);
>   byte data1[] = irp.getData();
>   for(int i=0 ; i<data1.length ; i++){
>    System.out.print(data1[i] + " ");
>   }
>   irp.setComplete(false);
>  }
> }
> catch(Exception e){
>  System.err.println("Exception : Class ReceivePacketAPP : run() : e : " +
> e);
> }
>
> 7. Below is the scripts I code but it always repond the strange result
> ==> 14, 100, -1
> ==> 20, 1, -1
> ==> 21, 1, 1
> 8. Thanks your reading
> ------------------------------------------------------------------------------
> Crystal Reports &#45; New Free Runtime and 30 Day Trial
> Check out the new simplified licensign option that enables unlimited
> royalty&#45;free distribution of the report engine for externally facing
> server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> javax-usb-devel mailing list
> javax-usb-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/javax-usb-devel
>
>

------------------------------------------------------------------------------
Crystal Reports &#45; New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty&#45;free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
javax-usb-devel mailing list
javax-usb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/javax-usb-devel

Reply via email to