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: [OS X] Is ResetPipe() asyncronous...?



Hi,

Am Donnerstag, 23.01.03 um 17:58 Uhr schrieb Fernando Urbina:

On 1/23/03 3:49 AM, MacInsight wrote:

- the device is doing something very odd (technician: "...with
MS-Windows, we have seen no similiar problems."  but, well, as far as
I've heard in different OSs the USB specs are interpreted in different
manners)

If you can point us to where in the spec we are misinterpreting something,
we will make sure to fix it.

I ment it the other way: my feeling is that OS X is nearer to the specs than MS-Windows;
MS-Windows maybe is more graceful with non-1.1-compliant devices...



What I think might have happened is that the
device worked under another OS and thus the manufacturer thought it was USB
1.1 compliant; those are not the same thing.


- the ResetPipe() method is asyncronous which isn't said in the docs

You should use ClearPipeStallBothEnds(true) instead of ResetPipe(). It is a
synchronous call so once you it returns, the device has received the
DeviceRequest to clear the endpoint halt.

Ok, but as I wrote, I tried that already  I suppose the device answers something like "yes, I'm ready with resetting my pipes" to the host, but indeed it has to perform some additional actions so it gets confused when it should receive the following bulk transfers.


I'm more ensured as before now that the device is to blame and has to change something in its timing parameters to get back to work properly under OS X.

-----

Am Donnerstag, 23.01.03 um 20:13 Uhr schrieb Barry Twycross:

At 11:49 AM +0100 1/23/03, MacInsight wrote:

Before any bulk endpoints are used, the userland-driver does USBDeviceOpen(), GetNumberOfConfigurations(), GetConfigurationDescriptorPtr(), SetConfiguration(), CreateInterfaceInterface(), USBInterfaceOpen() and ResetPipes() with a subsequent DeviceRequest() (with bRequest = kUSBRqClearFeature and wValue = kUSBFeatureEndpointStall) to synchronize the data-toggle.

Do you need to do the ResetPipe?

I've heard on some OSs you need to do this for reasons which are not clear to me, as far as I know its not necessary on Mac OS.

I wrote this code for a system-independant code base (although the design obviously derives from the kind in which devices are dealt with on MS-Windows).
The server process which deals with my company's devices and uses my userland code, presumes a system-independant resetPipes() function to be implemented.
Maybe also the device expects a regularly performed clean-up by getting it's pipes resetted, that I do not know  at least I could try out what will happen if my resetPipes() implementation is empty B-)


Thanks for your input,
Dirk Stegemann
_______________________________________________
usb mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/usb
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: [OS X] Is ResetPipe() asyncronous...? (From: Fernando Urbina <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.