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 transfer rate



The device defines the maxPacketSize of an endpoint. This is the maxPacketSize of the endpoint descripter described in Chapter 9 of the USB spec.

When you issue a ReadPipeAsync, your request size should be a multiple of the maxPacketSize of the endpoint, or you have the potential to loose data if the device returns a maxPacketSize packet.

In USB bus terms -- the host controller issues an IN request, the device responds with at most maxPacketSized bytes. The host controller acknowledges the receipt of the data, and puts in the buffer you provided when calling ReadPipe. If the data received is less that MaxPacketSize (called a short packet), then the ReadPipe request is returned with what data did arrive. If the request is for more bytes, then another IN request will be issued by the host controller.

Good Luck,

David Ferguson
USB Software Team
Apple Computer

At 2:29 PM +0000 1/17/05, b johnny wrote:
thks david! that help alot! sorry for bothering you again but i don;t realli understand the part where u said
- Assuming your device is actually running at hi-speed, and still
returning short 64 byte packets, you could re-code your driver to expect this. Issue multiple reads of 512 bytes, but deal with the fact that they only return 64 bytes. You will need to use asynch requests so that you can have multiple transactions outstanding at one time. You probably need as many requests as the number of 64 byte packets your device can supply in 1ms.

i looked up at the ReadPipeAsync function documentation but i dun think this function allows me to declare the MaxDataPacket read. Thus, which method am i supposed to use if i am to define the maxPacket Size on a bulk pipe???


thks!! cheers

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

_______________________________________________ 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: 
 >Re: slow transfer rate (From: "b johnny" <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.