Embedded device carries the device and method that carplay agreement connects vehicle device by USBTechnical field
It is strong more particularly, to a kind of suitability, application function is unrestricted the present invention relates to vehicle device field of communication technology, it is realThe device and method that carplay agreement connects vehicle device is carried by USB with scene unrestricted embedded device.
Background technique
Mobile terminal needs mobile device that specific agreement is supported just to may be implemented when throwing screen using third-party application,For example the carplay of apple, the carlife or mirrorlink of Baidu, these agreements largely limit screen projection functionUse, mobile phone suitability is poor in use by user, and application function using limited, apply and there is punching by vehicle-mounted function and mobile phoneProminent: such as phone and navigation cannot use simultaneously, cause user's usage scenario limited.
Summary of the invention
The present invention is poor in order to overcome mobile phone suitability existing in the prior art, and application function uses limited, vehicle-mounted functionIt is applied with mobile phone and there is the deficiency that conflicts, provide that a kind of suitability is strong, application function is unrestricted, practical scene is unrestrictedEmbedded device pass through USB carry carplay agreement connect vehicle device device and method.
To achieve the goals above, the invention adopts the following technical scheme:
A kind of embedded device carries the device of carplay agreement connection vehicle device, including embedded device, vehicle by USBMachine, usb communication module, protocol interaction module, Bonjour communication module and vehicle device event manager module;Usb communication module, associationView interactive module, Bonjour communication module and vehicle device event manager module are electrically connected with embedded device and vehicle device respectively.
The present invention establishes connection by embedded device and vehicle device, by the Application share to vehicle device on embedded device,The limitation for making user not have mobile phone is connected to any vehicle system, enhances the suitability of mobile phone.
Preferably, the system that embedded device uses includes Android system and Linux system.
A kind of embedded device carries the method that carplay agreement connects the device of vehicle device by USB, including walks as followsIt is rapid:
(3-1) carries out USB role transforming by usb communication module;
(3-2) is interacted with vehicle device by protocol interaction module, and the information of vehicle device and the ability of Alert Facilities are obtained;
(3-3) obtains the IP address and port numbers of service by Bonjour communication module from vehicle device, to establish with vehicle deviceThe communication connection in each channel;
(3-4) receives the knob information of vehicle device, touch screen information and button information, completion pair by vehicle device event manager moduleAnswer the assistance of function.
Preferably, specific step is as follows for step (3-1):
(4-1) is connect by USB with vehicle device with DEVICE mode, and USB enumeration is carried out after the completion of connection;
(4-2) after vehicle device completes enumerations information, doing role transforming is HOST mode, and USB mode is finally converted to netCard.
Preferably, the channel in step (3-3) includes service routine channel, voice-grade channel, video channel and event are logicalRoad.
Preferably, protocol interaction module is IAP agreement.
Therefore, the invention has the following beneficial effects: the present invention is connect by embedded device with vehicle device, and mobile phone is enhancedSuitability so that application function using unrestricted, vehicle-mounted function and mobile phone application can use simultaneously, so that userUsage scenario is unrestricted.
Detailed description of the invention
Fig. 1 is a kind of system block diagram of the invention;
Fig. 2 is a kind of flow chart of the invention.
In figure: embedded device 1, vehicle device 2, usb communication module 3, protocol interaction module 4, Bonjour communication module 5, vehicleMachine event manager module 6.
Specific embodiment
The present invention is described further with specific embodiment with reference to the accompanying drawing:
Embodiment as shown in Figure 1 is a kind of dress that embedded device passes through USB carrying carplay agreement connection vehicle deviceIt sets, including embedded device 1, vehicle device 2, usb communication module 3, protocol interaction module 4, Bonjour communication module 5 and vehicle device thingPart management module 6;Usb communication module, protocol interaction module, Bonjour communication module and vehicle device event manager module are distinguishedIt is electrically connected with embedded device and vehicle device;The system that embedded device uses is Android system;Protocol interaction module is IAPAgreement.
As shown in Fig. 2, a kind of embedded device carries the method that carplay agreement connects the device of vehicle device, packet by USBInclude following steps:
Step 100, USB role transforming is carried out by usb communication module;
Step 101, it is connect by USB with vehicle device with DEVICE mode, USB enumeration is carried out after the completion of connection;
Step 102, after vehicle device completes enumerations information, doing role transforming is HOST mode, and finally USB mode is converted toNetwork interface card;
Step 200, it is interacted with vehicle device by protocol interaction module, obtains the information of vehicle device and the energy of Alert FacilitiesPower;
Vehicle device initiates IAP identifying procedure, by protocol interaction module transfer to embedded device, embedded device responseIAP information obtains the information of vehicle device;
Step 300, the IP address and port numbers for obtaining service from vehicle device by Bonjour communication module, thus and vehicle deviceEstablish the communication connection in each channel;
Embedded device and vehicle device establish service routine channel, and voice-grade channel, video channel and event channel pass through audioChannel and video channel share audio and video information, will be in the audio and video information sharing to vehicle device on mobile phone.
Step 400, the knob information of vehicle device, touch screen information and button information are received by vehicle device event manager module, it is completeAt the assistance of corresponding function;
Mobile terminal can be operated by knob, touch screen and the button in operation vehicle device, mobile terminal realizes corresponding functionEnergy.
It should be understood that this embodiment is only used to illustrate the invention but not to limit the scope of the invention.In addition, it should also be understood that,After having read the content of the invention lectured, those skilled in the art can make various modifications or changes to the present invention, these etc.Valence form is also fallen within the scope of the appended claims of the present application.