Thanks, Sanjay Gupta<p> </p><p> </p>
------- Original Message ------- Sender : Dan Streetman<ddstr...@ieee.org> Date : Oct 15, 2013 01:30 (GMT+09:00) Title : Re: [javax-usb-devel] Packet Data Format On Mon, Oct 14, 2013 at 2:53 AM, SANJAY GUPTA <gupta.san...@samsung.com> wrote: > > Hi All, > I have a USB flash drive with below specification: First, for any usb flash drive, it's almost guaranteed the device is a mass storage device, so its protocol will be based on that spec, which you'll need to understand. => What I have understood till now is [Reference: http://www.beyondlogic.org/usbnutshell/usb3.shtml#USBProtocols] 1. Each USB transaction consists of a (i) Token Packet (Header defining what it expects to follow), an (ii) Optional Data Packet, (Containing the payload) and a (iii) Status Packet (Used to acknowledge transactions and to provide a means of error correction) 2. Token Packet Format - | Sync | PID | ADDR | ENDP | CRC5 | EOP | Data Packet Format - | Sync | PID | Data | CRC16 | EOP | Handshake Packet Format - | Sync | PID | EOP | Question:- Does the javax.usb APIs take care these low level details of preparing these packets for the given data to transfer ? Or if the programmer is expected to form the packets in desired format before actually starting the transmission? If yes, how to calculate fields CRC, Sync etc.? As per my understanding, the javax.usb APIs do the task for provided data buffer for transmission. Also, the Usb specification does not impose any structural constraints on the actual data being transmitted. Let me know, if I am wrong Second, Linux will be driving this device by default, and allowing you to access it as a normal storage device. Why don't you want to let Linux do the mass storage work for you? Just mount the device's filesystem(s) and access them directly using normal file i/o. => My purpose is to create a test application using javax.usb APIs for testing the performance of USB on different printer models. ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk _______________________________________________ javax-usb-devel mailing list javax-usb-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/javax-usb-devel