Considering you are sending a CLASS request but have not mentioned what your
device is nor what its class is nor what the protocol may be, why would you
expect me to be able to help?

If I had to take a completely wild guess, obviously without knowing anything
about your device, its class or protocol, or what the specific response you
are looking for or getting back is, I would *assume* you have a HID device
and you don't realize that HID reports have the report ID number as the
first byte, with the actual report data following.  But again that is
*completely* a guess made with *no* actual information about your situation.

On Tue, Sep 15, 2009 at 2:14 AM, Ruperto Durano <rupertsoft...@yahoo.com>wrote:

> Hello Dan,
>
> This is with regards to Java USB API --- javax.
>
> I had a hard time figuring out why there is an extra data acquired during
> the usbPipe.syncSubmit(byte[]).  The first byte of the array shouldn't be
> there. Do you have any idea what happened?
>
> I opened a the pipe then send a command through
> device.asyncSubmit(usbControlIrp);
> with these settings for the usbControlIrp:
>     byte bmRequestType = UsbConst.REQUESTTYPE_TYPE_CLASS | UsbConst.
> REQUESTTYPE_RECIPIENT_INTERFACE;
>     byte bRequest = 0x09;
>     short wValue = 2 << 8;
>     short wIndex = UsbUtil.unsignedShort(usbInterface.
> getUsbInterfaceDescriptor().bInterfaceNumber());
>
> Then get the reply from the device through usbPipe.syncSubmit(byte[]).
>
> I am not getting the exact data since the first byte is unexpected the
> rest are ok except that the last, expected, byte of the array is missing
> due to the occurrence of the unexpected first byte.
>
> I can tell that it is unexpected because I know what the device should have
> replied.
>
> Please help. I know I'm missing something like sending a controlled IRP
> instead during getting of the reply, if so, settings for the controlled IRP
> is another problem for me. Or could it be the settings of the usbControlIrp
> during the sending of the command?
>
> Please Help.
>
> Thanks,
> Ruperts
>
>
------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
javax-usb-devel mailing list
javax-usb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/javax-usb-devel

Reply via email to