cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

Anonymous
Not applicable

I am able to get 100MBps in a bulk transfer with your bulk performance example program in the Mac sdk written in c. That program fills a buffer using memset with 4MB buffers. My goal is to select a file with the host software and send that file via bulk transfer. I have written the c code to select a file using 'fread' to an unsigned char for the bulk transfers. When I send the unsigned char via the bulk transfer I'm getting about 400kBps which is much slower than sending the unsigned char generated by memset in the example code. 

   

I also tried breaking the data up in 16kB, 32kB, and 64kB buffers and sending them synchronously and asynchronously which gave me the same results 

   

I tested the same using usb4java and getting the exact same results by filling a byte array with arbitrary data and getting 100+MBps using the arrays.fill method and then only getting 400kBps when filling a byte array with a file and sending it via the same bulk transfer call as the arbitrary data method.

   

Could it be a hard drive read time limitation. I have a solid state drive so I wouldn't think it's that slow. i am running a 2012 MacBook Pro with an SSD hard drive and USB 3.0 capability. 

   

 

   

Link to an example of my method for reading a file to unsigned char

   

http://stackoverflow.com/questions/22129349/reading-binary-file-to-unsigned-char-array-and-write-it-...

0 Likes
Reply
2 Replies
Anonymous
Not applicable

You may try using 2 different threads, one for parsing the file and another for fetching the data

0 Likes
Reply
Anonymous
Not applicable

The asynchronous transfer uses a separate thread. When I read in the data to the byte array it seems to do so very fast. 

0 Likes
Reply