Dan Streetman wrote: > I'm still not sure if you really understand what is going on, since > 10000000 does NOT convert to 128, since 10000000 is decimal, not > binary. But anyway since I have pointed out that ((byte)10000000) > just happens to convert to 0x80, it "works" and I'll drop it (although > it is definitely completely incorrect code).
I was trying to say that in the actual program, the '10000000' is handled as a bit set, never as the decimal 1000000. The code I showed in the earlier email did not properly reflect this, as I left out a few lines. I just wrote (hasty as I was) '(byte)10000000)', which, as you point out, is completely wrong of course. From the documentation I referred to earlier, I understood that for a status report the value of bmRequestType should correspond to '10000000' (again -not- the decimal, but the byte consisting of the listed bits, each bit has a particular meaning, as documented in the USB standard). I am sure my incorrect wording (e.g. 'convert') is causing all the confusion, for which I apologize. I am not experienced at all with this type of 'low-level' programming and terminology so this all is really a steep learning curve. > I don't understand what you are trying to say or do. I refer to http://www.beyondlogic.org/usbnutshell/usb6.htm (first yellow table) According to my interpretation, it says that a request (represented as byte[] array) should begin with 8 byte long Setup Packet, followed by the actual data. In the code I showed, I did -not- include the 8 byte setup packet. I simply create a byte array containing just the single byte (the command byte), use the setData(...) of UbIrp, and get it sent to the device. I incorrectly assumed that the required 8 byte long Setup Packet would be inserted by the javax-usb implementation. I understand from your response that this is NOT the case. Is my conclusion correct? Again, I appreciate very much your feedback and your patience. Thanks, Andre ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ javax-usb-devel mailing list javax-usb-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/javax-usb-devel