Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Stalled ReadPipe and WritePipe
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Stalled ReadPipe and WritePipe




  Hi

  I am having issues with reading and writing to a pipe after closing the pipes and the interfaces and reopening again.

  This is on 10.7.2 using a Garmin ANT+ USB stick. I am able to open up the device, read, write to it without problems at first. When finished, I do the following:

      readData(aPipe.intf, aPipe.inPipeRef,inBuf);
    (*intf)->AbortPipe(intf, aPipe.inPipeRef);
    (*intf)->AbortPipe(intf, aPipe.outPipeRef);
    (*intf)->ClearPipeStallBothEnds(aPipe.intf, aPipe.inPipeRef);
    (*intf)->ClearPipeStallBothEnds(aPipe.intf, aPipe.outPipeRef);
    (*intf)->USBInterfaceClose(aPipe.intf);
    (*intf)->Release(aPipe.intf);
    (*aPipe.dev)->USBDeviceClose(aPipe.dev);
    (*aPipe.dev)->Release(aPipe.dev);

(I have tried all various forms of this).

I then shutdown my application. When I reopen, I am able to find and open up the device. I can sometimes write the first set of bytes and read them but usually a few calls later either WritePipe or ReadPipe stalls and never returns. No error codes are issued. The call simply never returns.

The only way to resolve this, is to pull out the USB stick in question and restart.

Any ideas what could be going on and how I could debug this ?

Thanks

J
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.