Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: slow transfers to a full-speed device



Hey... that is easy! You'd think a physics PhD would've been smart enough to try that.. sweet! Thanks!

Eric

On Jun 15, 2005, at 8:31 AM, David Ferguson wrote:

Eric,

This is easy.

WritePipe() can take any size buffer -- we will set up the USB controller to send it in MaxPacketSize packets.

Regards,

David Ferguson
USB Software Team
Apple Computer



At 7:32 AM -0700 6/15/05, Eric Smith wrote:

Yes, it does seem a really bad way to send large amounts of data. Unfortunately, I don't know how to get around it. Bulk packet size is 64 bytes, and I've got about 6M bits all in a single byte buffer. The only function I see for reading/writing the bulk endpoint is ReadPipe()/WritePipe()... so I use that while incrementing the pointer to the buffer by 64. How do I remove the overhead? (I'm reading and writing to bulk endpoints on this device, where large amounts of data are involved).

Thanks,
Eric Smith

On Jun 14, 2005, at 11:03 PM, David Ferguson wrote:


This is a really inefficient way to send bytes to a device. Try using a much larger buffer to reduce the overhead per transfer. I would think you'll see a significant improvement if you use even 32k, but you should try transfers from 4k (the pagesize of MacOS X) to 128k. You may also want to make sure your data is aligned on a 64-byte boundary to put the maximum number of bytes per transfer descriptor (a USB controller data structure used inside the IOUSBFamily).

David Ferguson
Apple Computer




At 8:52 PM -0700 6/14/05, Eric Smith wrote:


I've got a full speed USB device, and am writing data in 64 byte packets to a bulk endpoint. This is just sitting in a for loop, doing a bunch of WritePipe() calls. My download speed over several megabits is only about 500Kbps. I'm using Tiger, and a dual 1.8 G5. I get about the same performance on a G4 iBook running Tiger. The same USB device gets about 6Mbps download on a windows-based machine. I did not write the windows code, so I don't know any of the details of that implementation.

Any ideas or suggestions?

Thanks,
Eric Smith

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden

This email sent to email@hidden



_______________________________________________ Do not post admin requests to the list. They will be ignored. Usb mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/usb/email@hidden

This email sent to email@hidden




_______________________________________________ Do not post admin requests to the list. They will be ignored. Usb mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/usb/email@hidden

This email sent to email@hidden
References: 
 >slow transfers to a full-speed device (From: Eric Smith <email@hidden>)
 >Re: slow transfers to a full-speed device (From: David Ferguson <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.