I participated in the development iPhone5 can use the USB port on the storage device. We have studied for a long time, finally achieved iPhone5 as USB Host, and through the development of our Lighting Interface communication between storage devices (storage devices we do USB Device), and the use of ExternalAccessory Native transmission mode, so that real-time data transfer speeds of up to 10MB / s or so.
I first explain:
In ExternalAccessory Native transmission mode, the device-side implementation requires an additional Interface settings require the Interface setting has a Bulk-In endpoint a Bulk-Out endpoint. Communication begins, that is, when iPhone5 client application invokes OpenSession interface, iPhone5's USB_HOST control endpoint sends SetInterface through standard commands, the command device side from the default IAP2 EA Session Transfer Mode Interface settings switch to this extra Interface settings. After the adoption of the Interface to the Bulk-In and Bulk-Out Data breakpoints communicate freely, without IAP2 Agreement.
The default IAP2 EA Session transmission mode, the device's default Interface requirements include an Interrupt-In endpoint, a Bulk-In breakpoints and a Bulk-Out endpoint. In this transmission mode, if you want to use Bulk endpoint transfer large amounts of data, the data must be wrapped in IAP2 agreement, and in the Interrupt-In endpoint data in real-time notifications Host current device is in the Ready state. This seriously affects the transmission speed transmission, does not meet the requirements of our products.
Now the question is, when we use ExternalAccessory Native transmission mode, when the Host is SetInterface command to set the device to switch over after Interface, Host will in Bulk-In endpoint uninterrupted Hair In-Token package, even if the application does not InputStream and OutputStream call as well. This behavior is likely to disturb BOT BOT protocol state machine, the reception, the state disorder; but also makes the bus does not stay long in the Idle state (when no data is being transmitted) to enter Suspend, the power consumption of the device side can not be reduced. If we adopt IAP2 EA Session mode does not have this phenomenon, there is no data to send and receive, Bulk-In endpoint no token, only in Interrup-In endpoint will have timed token issued.
I would like to ask the above phenomenon is not iPhone5 as USB Host side to the inherent behavior? Is there any way you can prevent it in the absence of data transmission time to the Bulk-In endpoint to send In-Token do?
No comments:
Post a Comment