First, CP's wired (USB) connectivity scheme requires on-board devices to support at least USB2.0 Hi-Speed, capable of handling both bulk IN and bulk OUT transmission. The scheme also requires that the on-board device must support the USB Host Mode, and this mode requires that the on-board device should be able to work in the USB device mode, because the target device is used as a USB Host in the car play. Usually, the on-board device USB is operating in USB Host mode, while the external USB device is working in USB Device mode, so the USB mode switching is required in the car play wired (USB) connection scheme. The following figure is the logical block diagram of the USB mode switching processing of the car play:
When the role switch is completed, the following points are noted according to the protocol:
1. The onboard device (USB device) needs to wait at least 1000ms for the target device (USB host) to be enumerated.
2. If there is no traffic after 1000ms, the vehicle device (USB device) has to switch back to USB Host mode.
3. When the target device detects a bus failure (the loss of VBUS), the target device switches back to USB Device mode.
4. If the onboard device (USB device) detects that at least 200ms of the USB bus is in an inactive (inactivity) state, the onboard device (USB device) will switch back to USB Host mode.
Next, we will introduce the interface descriptor (Interface Descriptor) and i data transfer (Data Transfers) for iap 2 in the car play wired (USB) connection scheme:
1. The iap 2 interface descriptor (Interface Descriptor)
The vehicle device (USB Device) establishes an iap 2 connection to the target device (USB Host) requiring a vendor specified (vendor-specific) interface with a bulk IN endpoint (endpoint) and a bulk OUT endpoint (endpoint).
2. Data transfer of iap 2 (Data Transfers)
The target device (USB Host) sends iap 2 data to the vehicle device (USB Device) via the bulk OUT endpoint. Under the USB protocol, if the on-board device (USB Device) successfully receives the iap 2 data sent by the target device, it will reply to a USB ACK package, and not to a USB NAK package. If the onboard device (USB Device) repeatedly replies to the USB NAK package for more than 1 second, a reception timeout is considered.
The on-board device successfully establishes an iap 2 connection on the iap 2 transmission channel, certified through the iap 2, with the following 7 iap 2 control session messages:
1. RequestAuthenticationCertificate
2. AuthenticationCertificate
3. RequestAuthenticationChallengeResponse
4. AuthenticationResponse
5. AuthenticationFailed
6. AuthenticationSucceeded
7. AccessoryAuthenticationSerialNumber
Next, introduce two interfaces to USB's NCM (Network Control Model).
1. USB NCM Control Interface (Control Interface) descriptor (Descriptor)
2. USB NCM Data Interface (Data Interface) descriptor (Descriptor)
The onboard device needs to complete the USB Hi-Speed NCM on this interface. This interface requires support for transmission to a 64 KB packet (that is, to 401514-byte Ethernet frames (Ethernet Frame)) and a 16-bit NCM transmission block.
On-board devices using the car play USB NCM interface need to support a bandwidth of at least 100Mbps, the delay of TCP and UDP is less than 5ms, and the packet loss rate of UDP (under iperf test) is less than 1%.
When the target device is connected or disconnected, the on-board device needs to change the NCM interface status accordingly. When the target device is connected, the labeled NCM interface is available on the header of the network protocol stack.
Finally, introduce the build / terminate car play session (session).
To establish a car play session (session), the on-board device first needs to establish an IP network connection with the target device, so it requires a virtual network interface and assigns a MAC address and ip address. The ip connection must be IPv6. Onboard devices need to support a apple Bonjour zero-configuration network connection (zero-configuration networking) on this interface. Once the network connection is successfully established, the on-board device will start setting up (setup) and content transfer (content transfer) on the car play interface after completing the authentication. It should be noted that, according to the protocol requirements, the on-board device needs to establish an car play session within 3 seconds after establishing the network connection with the target device. If the physical connection to the target device is disconnected, the on-board device also needs to detect the disconnection and terminate the car play session within 1 second. The following figure is the car play session building block diagram for wired (USB):
Tel:13417442373 (Skype)
E-mail:finny.zhou@zhongletest.com