WO2018120493A1 - Communication connection establishing method and system, mobile terminal, vehicle-mounted equipment, corresponding equipment and computer storage medium - Google Patents

Communication connection establishing method and system, mobile terminal, vehicle-mounted equipment, corresponding equipment and computer storage medium Download PDF

Info

Publication number
WO2018120493A1
WO2018120493A1 PCT/CN2017/079945 CN2017079945W WO2018120493A1 WO 2018120493 A1 WO2018120493 A1 WO 2018120493A1 CN 2017079945 W CN2017079945 W CN 2017079945W WO 2018120493 A1 WO2018120493 A1 WO 2018120493A1
Authority
WO
WIPO (PCT)
Prior art keywords
mobile terminal
vehicle device
port
preset type
authentication
Prior art date
Application number
PCT/CN2017/079945
Other languages
French (fr)
Chinese (zh)
Inventor
方胜
罗序斌
陈聪
张丙林
Original Assignee
百度在线网络技术(北京)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 百度在线网络技术(北京)有限公司 filed Critical 百度在线网络技术(北京)有限公司
Publication of WO2018120493A1 publication Critical patent/WO2018120493A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72409User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72409User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
    • H04M1/724098Interfacing with an on-board device of a vehicle
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0869Network architectures or network communication protocols for network security for authentication of entities for achieving mutual authentication

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a communication connection establishing method and system, a mobile terminal, an in-vehicle device, and a corresponding device and a computer storage medium.
  • the mobile terminal and the in-vehicle device can be connected by wireless or wired.
  • the wireless connection can be implemented by using wifi or Bluetooth.
  • the wired connection can be implemented by using the ia session and EA Native Transport based on the iap2 protocol.
  • the wireless connection scheme using the wifi connection is unstable in the vehicle environment and is susceptible to interference.
  • a mobile terminal such as an iPhone is used as a wireless connection established by a hotspot, and the stability of the connection is also affected by the data network signal of the mobile terminal.
  • the connection is very easy to disconnect.
  • the data transmission bandwidth is also small; used in the prior art
  • the in-vehicle wifi built by the hardware of the in-vehicle device is also unstable in signal, and the hardware cost of the in-vehicle wifi device needs to be increased; if the wireless Bluetooth connection scheme is adopted in the prior art, the connection is unstable and the connection is unstable, and the Bluetooth transmission is The rate is very low, and in many cases the bandwidth cannot meet the needs of the application scenario.
  • the connection data bandwidth of the EA session is relatively low, and it is not suitable for transmitting a large amount of data.
  • the EA Native Transport mode has sufficient data bandwidth, but does not support multiple data channels, and has poor scalability. In short, the stability of the wireless communication connection between the mobile terminal and the in-vehicle device such as the existing iPhone is very poor, and the bandwidth of the wired communication connection is low or the expansion is poor.
  • the present invention provides a communication connection establishing method and system, a mobile terminal and an in-vehicle device, which are used for improving connection stability between a mobile terminal and an in-vehicle device, expanding bandwidth of communication between the mobile terminal and the in-vehicle device, and improving mobility The scalability of the bandwidth of communication between the terminal and the in-vehicle device.
  • the present invention provides a communication connection establishment method, the method comprising:
  • the in-vehicle device When the mobile terminal accesses the in-vehicle device through the universal serial bus and switches to the main mode, the in-vehicle device reports information of the first preset type port for performing data transmission and the second for performing authentication information transmission to the mobile terminal. Presetting the information of the port for the mobile terminal to load the driver corresponding to each port;
  • the in-vehicle device loads the driving of the first preset type port, the driving of the second preset type port, and the driving of the authentication chip;
  • the in-vehicle device performs authentication interaction with the mobile terminal by using the second preset type of port according to the authentication information generated by the authentication chip, to authenticate the authentication information;
  • the in-vehicle device acquires an IP address allocated by the mobile terminal to the in-vehicle device according to the network segment ID;
  • the in-vehicle device establishes a communication connection for data transmission with the mobile terminal through the first preset type port according to the IP address.
  • the method before the mobile terminal accesses the in-vehicle device through the universal serial bus and switches to the main mode, the method further includes:
  • the in-vehicle device When the mobile terminal accesses the in-vehicle device through the universal serial bus, the in-vehicle device performs port enumeration on the mobile terminal to detect whether the mobile terminal supports the first preset type port Mobile terminal for communication;
  • the in-vehicle device sends a master-slave switching command to the mobile terminal, so that the mobile terminal switches from a mode to a master mode;
  • the in-vehicle device switches the main mode to the slave mode.
  • the in-vehicle device performs authentication interaction with the mobile terminal by using the second preset type of port according to the authentication information generated by the authentication chip; Before the authentication, the method further includes:
  • the in-vehicle device starts authentication of the authentication chip, and acquires the authentication information generated by the authentication chip.
  • the first preset type port is an NCM port
  • the second preset type port is an IAP2 port
  • the authentication chip is an MFI chip.
  • the invention also provides a communication connection establishing method, the method comprising:
  • the mobile terminal accesses the in-vehicle device through the universal serial bus and switches to the main mode, Receiving, by the mobile terminal, information of a first preset type port for performing data transmission and information of a second preset type of port for performing authentication information transmission by the in-vehicle device;
  • the mobile terminal loads the driving of the first preset type port and the driving of the second preset type port according to the information of the first preset type port and the information of the second preset type port, respectively;
  • the mobile terminal performs authentication interaction with the in-vehicle device through the second preset type of port to authenticate the authentication information generated by the authentication chip; the in-vehicle device is loaded with the driver of the first preset type port Driving of the second preset type port and driving of the authentication chip;
  • the mobile terminal allocates an IP address to the in-vehicle device according to the network segment ID;
  • the mobile terminal establishes a communication connection for data transmission with the in-vehicle device through the first preset type port according to the IP address.
  • the mobile terminal receives the information of the first preset type port for data transmission reported by the in-vehicle device and the information of the second preset type port for performing the authentication information transmission,
  • the method further includes:
  • the mobile terminal accesses the in-vehicle device through the universal serial bus, and determines, by the port enumeration of the in-vehicle device, that the mobile terminal is currently a mobile terminal supporting the first preset type port communication
  • the mobile terminal receives a master-slave switching command sent by the in-vehicle device;
  • the mobile terminal switches the current mode to a master mode according to the master-slave switching command
  • the mobile terminal performs port enumeration on the in-vehicle device.
  • the mobile terminal after the authentication is passed, the mobile terminal is configured according to Before the network segment ID is assigned to the in-vehicle device, the method further includes:
  • the method further includes:
  • the mobile terminal transmits the IP address to the in-vehicle device.
  • the first preset type port is an NCM port
  • the second preset type port is an IAP2 port
  • the authentication chip is an MFI chip.
  • the invention also provides an in-vehicle device, the in-vehicle device comprising:
  • a sending module configured to report, to the mobile terminal, information of a first preset type of port for performing data transmission and perform authentication information transmission when the mobile terminal accesses the in-vehicle device through a universal serial bus and switches to a master mode The information of the second preset type port, so that the mobile terminal loads the driver corresponding to each port;
  • a loading module configured to load the driving of the first preset type port, the driving of the second preset type port, and the driving of the authentication chip
  • An authentication module configured to perform authentication interaction with the mobile terminal by using the second preset type of port according to the authentication information generated by the authentication chip, to authenticate the authentication information
  • a establishing module configured to establish, according to the IP address, a communication connection for performing data transmission with the mobile terminal by using the first preset type port.
  • the in-vehicle device further includes an enumeration module Block and switching module;
  • the enumeration module is configured to: when the mobile terminal accesses the in-vehicle device through the universal serial bus, perform port enumeration on the mobile terminal to detect whether the mobile terminal supports the first a mobile terminal of a preset type port communication;
  • the sending module is further configured to: if the mobile terminal is a mobile terminal that supports the first preset type port communication, send a master-slave switching command to the mobile terminal, so that the mobile terminal switches from a mode to a mode Main mode
  • the switching module is configured to switch the main mode to the slave mode.
  • the in-vehicle device further includes a startup module
  • the startup module is configured to initiate authentication of the authentication chip
  • the obtaining module is further configured to acquire the authentication information generated by the authentication chip.
  • the first preset type port is an NCM port
  • the second preset type port is an IAP2 port.
  • the authentication chip is an MFI chip.
  • the present invention also provides a mobile terminal, where the mobile terminal includes:
  • a receiving module configured to: when the mobile terminal accesses the in-vehicle device through the universal serial bus and switch to the main mode, receive information about the first preset type of port reported by the in-vehicle device for data transmission, and perform authentication information transmission. Information of the second preset type port;
  • a loading module configured to respectively load the driving of the first preset type port and the driving of the second preset type port according to the information of the first preset type port and the information of the second preset type port ;
  • An authentication module configured to perform, by using the port of the second preset type, with the in-vehicle device Authenticating the authentication to authenticate the authentication information generated by the authentication chip; the in-vehicle device is loaded with the driving of the first preset type port, the driving of the second preset type port, and the driving of the authentication chip;
  • An allocation module configured to allocate an IP address to the in-vehicle device according to the network segment ID after the authentication is passed;
  • a establishing module configured to establish, according to the IP address, a communication connection for performing data transmission with the in-vehicle device through the first preset type port.
  • the mobile terminal further includes an enumeration module and a switching module:
  • the receiving module is further configured to: when the mobile terminal accesses the in-vehicle device through the universal serial bus, and determine, by using port enumeration of the in-vehicle device, that the current mobile terminal supports the first pre- When a mobile terminal of type port communication is set, receiving a master-slave switching command sent by the in-vehicle device;
  • the switching module is configured to switch the current mode to a master mode according to the master-slave switching command
  • the enumeration module is configured to perform port enumeration on the in-vehicle device.
  • the mobile terminal further includes a sending module
  • the receiving module is further configured to receive an IP request sent by the in-vehicle device
  • the sending module is configured to send the IP address to the in-vehicle device.
  • the first preset type port is an NCM port
  • the second preset type port is an IAP2 port.
  • the authentication chip is an MFI chip.
  • the present invention also provides a communication connection establishing system, the system comprising an in-vehicle device and a mobile terminal for establishing a communication connection; the in-vehicle device adopting the in-vehicle device as described above; the mobile terminal adopting any of the above The mobile terminal described.
  • the communication connection establishing method and system, the mobile terminal and the in-vehicle device of the present invention when the mobile terminal accesses the in-vehicle device through the USB and switches to the main mode, the mobile terminal receives the first preset type port for data transmission reported by the in-vehicle device.
  • the in-vehicle device of the present invention communicates with the mobile terminal by using a USB wired connection, which can overcome the defect that the in-vehicle device and the mobile terminal communicate wirelessly in the prior art, and the connection stability is very poor; and the present invention
  • the wired connection between the in-vehicle device and the mobile terminal adopts USB and uses NCM port for data transmission.
  • the NCM is a network port for transmitting network data, and has a high-speed transmission mechanism, and the data bandwidth that can be supported is large enough, and the efficiency of data transmission is high.
  • the in-vehicle device and the mobile terminal are connected by USB; the USB port is virtualized into a network card at both ends of the in-vehicle device and the mobile terminal, and applications on both sides, such as Carlife, can be performed through the network card and the peer end.
  • Communication, virtual network card can perform network programming and establish multiple network channels. Therefore, the technical solution of the present invention can support multiple data channels, and the scalability is very good.
  • FIG. 1 is a flowchart of Embodiment 1 of a method for establishing a communication connection according to the present invention.
  • FIG. 2 is a flowchart of Embodiment 2 of a method for establishing a communication connection according to the present invention.
  • FIG. 3 is a signaling diagram of Embodiment 3 of a method for establishing a communication connection according to the present invention.
  • FIG. 4 is a schematic structural diagram of an iPhone, an in-vehicle device, and an MFi authentication chip according to an embodiment of the present invention.
  • Fig. 5 is a structural diagram showing a first embodiment of the in-vehicle device of the present invention.
  • Fig. 6 is a structural diagram of a second embodiment of the in-vehicle device of the present invention.
  • FIG. 7 is a structural diagram of Embodiment 1 of a mobile terminal according to the present invention.
  • FIG. 8 is a structural diagram of Embodiment 2 of a mobile terminal according to the present invention.
  • FIG. 9 is a structural diagram of an embodiment of a communication connection establishment system of the present invention.
  • Figure 10 is a block diagram of an embodiment of an electronic device of the present invention.
  • the communication connection establishment method of the embodiment of the present invention is applied between a mobile terminal and an in-vehicle device.
  • the in-vehicle device of the present embodiment can be understood as a device that is disposed on the vehicle and integrated with the vehicle.
  • the mobile terminal and the in-vehicle device can be transmitted in a wired manner.
  • the EA session and the EA Native Transport can be used for communication based on the IAP2 protocol.
  • the universal serial bus (USB) can be used for wired connection between the mobile terminal and the in-vehicle device according to the embodiment of the present invention.
  • the wired connection between the transmitting end device and the receiving end device in the embodiment of the present invention uses a vehicle interconnection communication protocol for message transmission.
  • the sending end is set
  • the device and the receiving device can also implement the message transmission by using the vehicle interconnection communication protocol.
  • the specific wireless connection mode is not limited in this embodiment.
  • a name of a vehicle interconnection communication protocol may be defined as CarLife, and it may be understood that CarLife is a communication protocol defined in the application for transmitting a message between a mobile terminal and an in-vehicle device, and the protocol supports the mobile terminal. USB communication is carried out with the in-vehicle device.
  • the application of CarLife can be installed on both sides of the mobile terminal and the in-vehicle device, so that the mobile terminal and the in-vehicle device support the vehicle interconnection communication on both sides, so that when the mobile terminal and the in-vehicle device are connected
  • the mobile terminal and the in-vehicle device transmit the message through CarLife, so that the mobile terminal transmits the page to the in-vehicle device and displays it on the in-vehicle device side.
  • the types of content that can be transmitted include control messages and multimedia messages.
  • the control message in the embodiment of the present invention may be further divided into two types: a control message and an anti-control message.
  • the control message of the embodiment of the present invention may be that the mobile terminal controls the air conditioner of the vehicle device to turn on/off the air conditioner of the vehicle, or opens/closes the control message of the sunroof of the vehicle; and may also control the mobile terminal to make a call or read for the vehicle. The information of the mobile terminal, etc., controls the message.
  • the control message of the embodiment of the present invention may further include at least one of in-vehicle data, a Bluetooth automatic pairing message, a video initialization message, and the like.
  • the anti-control message of the embodiment of the present invention may include an anti-control message such as a touch event or a button event of the vehicle-side device that is sent by the in-vehicle device to the mobile terminal.
  • the multimedia message in the embodiment of the present invention may be divided into a video message, an audio message, and a voice message.
  • the video message in the embodiment of the present invention may be video encoded data transmitted by the mobile terminal to the in-vehicle device, and passed between the mobile terminal and the in-vehicle device.
  • the mobile terminal needs to project the information displayed on the screen in real time on the in-vehicle device in the form of video. That is, the video message includes video encoded data of the screen of the mobile terminal.
  • the audio information of the embodiment of the present invention may be a Media audio stream such as music data, or may also be an audio stream for transmitting Text to Sound (TTS) such as navigation voice broadcast data.
  • TTS Text to Sound
  • it can be used for a mobile terminal to transmit a Pulse Code Modulation (PCM) stream of music and navigation voice announcements to the in-vehicle device, respectively.
  • PCM Pulse Code Modulation
  • the voice message of the embodiment of the present invention may be that the in-vehicle device transmits the user voice data recorded by the vehicle microphone (mic) to the mobile terminal.
  • the message content in the embodiment of the present invention may include five types of control messages, video messages, audio messages, voice messages, and anti-control messages, each of which has its own corresponding data structure and corresponding to the message transmission.
  • Data channel That is, there are five types of data channels in the CarLife vehicle interconnection communication protocol: control message data channel, video message data channel, audio message data channel, voice message data channel, and anti-control message data channel.
  • the communication connection establishment method of the embodiment of the present invention can establish communication between the mobile terminal and the in-vehicle device based on the CarLife vehicle interconnection communication protocol described above, and the detailed process of establishing the communication connection can refer to the description of the following embodiments.
  • FIG. 1 is a flowchart of Embodiment 1 of a method for establishing a communication connection according to the present invention. As shown in FIG. 1 , the method for establishing a communication connection in this embodiment may specifically include the following steps:
  • the in-vehicle device When the mobile terminal accesses the in-vehicle device through the universal serial bus (USB) and switches to the main mode, the in-vehicle device reports the information of the first preset type port for performing data transmission to the mobile terminal and performs authentication. Second preset type end of information transmission Information for the mobile terminal to load the driver corresponding to each port;
  • USB universal serial bus
  • the in-vehicle device loads a driver of a first preset type port, a driver of a second preset type port, and a driver of an authentication chip;
  • the in-vehicle device performs authentication and interaction with the mobile terminal through the second preset type of port according to the authentication information generated by the authentication chip, and performs authentication on the authentication information;
  • the in-vehicle device obtains an IP address allocated by the mobile terminal to the in-vehicle device according to the network segment ID;
  • the in-vehicle device establishes a communication connection for data transmission with the mobile terminal according to the IP address and through the first preset type port.
  • the execution body of the communication connection establishment method of the present embodiment is an in-vehicle device, and the communication connection establishment method of the present invention is described in detail on the vehicle-mounted device side.
  • the in-vehicle device and the mobile terminal are connected by a universal serial bus to perform communication.
  • the mobile terminal and the in-vehicle device are connected through USB.
  • the in-vehicle device works in the main (HOST) mode
  • the mobile terminal works in the slave mode, that is, the DEVICE mode. Since the mobile terminal and the in-vehicle device are to establish communication, the in-vehicle device and the mobile terminal need to perform mode switching to switch the mobile terminal to the HOST mode.
  • the in-vehicle device needs to report the information of the first preset type port and the information of the second preset type to the mobile terminal, where the first preset type of port is used for subsequent data transmission;
  • the two preset types of ports are suitable for subsequent transmission of authentication information.
  • the data transmission between the mobile terminal and the in-vehicle device of the embodiment and the authentication information transmission before the connection is established use different ports.
  • the mobile terminal receives the information of the first preset type port and the information of the second preset type of port, loading the driver of the first preset type port and the driving of the second preset type port; wherein the first preset type Port driver and second preset type port driver It is preset in the mobile terminal so as to be loaded in time when loading is required.
  • the in-vehicle device also loads the driving of the first preset type port and the driving of the second preset type port; in addition, the mobile terminal of the embodiment has an authentication module capable of performing authentication interaction with the in-vehicle device.
  • the authentication chip is pre-configured inside the vehicle-mounted device side, and when the driver is loaded, the driver of the authentication chip needs to be loaded on the vehicle-mounted device side at the same time. Then, the authentication chip on the vehicle-mounted device side can generate authentication information, and then the in-vehicle device transmits the authentication information to the mobile terminal side through the second preset type port, and the authentication module in the mobile terminal performs authentication processing on the authentication information, if the authentication process is performed, The mobile terminal side further generates a certain verification message according to the authentication message, and further needs to be authenticated by the authentication chip, and then the mobile terminal transmits the verification information required to be processed by the authentication chip to the in-vehicle device through the second preset type port, according to the The method repeatedly performs interaction to authenticate the authentication message, that is, the mobile terminal authenticates the in-vehicle device.
  • the in-vehicle device After the authentication is passed, it is determined that the in-vehicle device can communicate with the mobile terminal, and the in-vehicle device can obtain the IP address assigned by the mobile terminal to the in-vehicle device according to the network segment ID. Specifically, the in-vehicle device may request an IP address from the in-vehicle device, and then the in-vehicle device allocates an IP address of the in-vehicle device in the same network segment as the mobile terminal according to the network segment ID of the mobile terminal according to the request of the mobile terminal, so as to ensure the mobile terminal. Communication with in-vehicle devices.
  • the mobile terminal sends the assigned IP address to the in-vehicle device, and the in-vehicle device establishes a communication connection with the mobile terminal according to the first preset type port according to the IP address.
  • the CarLife vehicle interconnection communication protocol described in the above embodiment can be used for communication between the mobile terminal and the in-vehicle device of the embodiment, and after the communication connection is established by using the method of the embodiment, the data of the CarLife vehicle interconnection communication protocol is adopted.
  • the channel performs data transmission.
  • the in-vehicle device reports the first pre-data transmission to the mobile terminal.
  • the information of the type port and the information of the second preset type port for performing the authentication information transmission so that the mobile terminal loads the driver corresponding to each port; the vehicle device loads the driver of the first preset type port, and the port of the second preset type Driving and authenticating the chip; according to the authentication information generated by the authentication chip, performing authentication interaction with the mobile terminal through the second preset type of port; authenticating the authentication information; after the authentication is passed, the in-vehicle device acquires the mobile terminal according to the network segment ID An IP address assigned to the in-vehicle device; and a communication connection for data transmission is established with the mobile terminal through the first preset type port according to the IP address.
  • the in-vehicle device and the mobile terminal of the embodiment use the wired connection of the USB to communicate, which can overcome the defect that the in-vehicle device and the mobile terminal communicate in a wireless manner in the prior art, and the connection stability is very poor;
  • the example of the in-vehicle device and the mobile terminal adopts a USB wired connection and uses NCM port for data transmission.
  • the NCM is a network port for transmitting network data, has a high-speed transmission mechanism, and can support a data bandwidth large enough for data transmission.
  • the efficiency of the embodiment is relatively high; and in the technical solution of the embodiment, the USB port is virtualized into a network card at both ends of the vehicle device and the mobile terminal, and applications on both sides, such as Carlife, can communicate with the peer through the network card, and the virtual network card can perform network. Programming, establishing a plurality of network channels, therefore, the technical solution of the embodiment can support multiple data channels, and the scalability is very good.
  • the communication connection establishing method in this embodiment may further include the following steps:
  • the vehicle The device sends a master-slave switching command to the mobile terminal, so that the mobile terminal switches from the mode to the master mode;
  • the in-vehicle device When the mobile terminal accesses the in-vehicle device through the USB device, the in-vehicle device is in the HOST mode, and the mobile terminal is in the DEVICE mode. At this time, the in-vehicle device performs port enumeration on the USB port of the mobile terminal, and detects whether the mobile terminal supports the first preset type port communication. . If supported, the in-vehicle device transmits a master-slave switching command to the mobile terminal for the mobile terminal to switch from the mode, ie, the DEVICE mode, to the master mode, that is, the HOST mode.
  • the in-vehicle device switches the main mode, that is, the HOST mode to the slave mode, that is, the DEVICE mode. Since the mode is switched, the mobile terminal needs to re-enume the USB port of the in-vehicle device, and both of them determine that the other party supports the first preset type port communication. If the in-vehicle device performs port enumeration on the USB port of the mobile terminal, and detects that the mobile terminal does not support the first preset type of port communication, the mobile terminal at this time cannot establish the communication connection according to the method of this embodiment.
  • the operating system of the mobile terminal is an IOS.
  • the corresponding mobile terminal may be an iPhone, and the corresponding first preset type port is a Network Control Model (NCM) port, and the second preset type port is IAP2 port, the authentication chip is MFI chip, MFI chip is a kind of "Made for iPod, Made for iPhone, and Made for iPad" developed by Apple. It is specially designed to connect to iPod, iPhone and iPad. Electronic accessories.
  • NCM driver corresponding to the NCM port and the IAP2 driver corresponding to the IAP2 port need to be loaded on the mobile terminal side. In addition to loading the NCM driver and the IAP2 driver on the vehicle-mounted device side, the MFi chip driver needs to be loaded.
  • NCM driver Specifically, the HOST driver of the NCM is loaded on the mobile terminal side (Apple has been developed), and the driver side loads the driver of the NCM slave device. After the driver is loaded, the car The device side can view the corresponding network device node through netcfg.
  • iAP2 driver Specifically, the HOST driver of iAP2 is loaded on the mobile terminal side (Apple has already developed), and the car terminal loads the driver of the iAP2 slave device. After the driver is loaded, you can map the corresponding device file in the dev directory (for example: /dev/MFI_IAP2).
  • MFi chip driver Specifically, the MFi chip is loaded on the vehicle-mounted device side (mainly through the Inter-Integrated Circuit (I2C) to interact with the vehicle), and the corresponding device file is mapped in the dev directory after completion (eg / Dev/MFi).
  • I2C Inter-Integrated Circuit
  • the in-vehicle device performs authentication and interaction with the mobile terminal through the second preset type of port according to the authentication information generated by the authentication chip; Before the certification, it may also include: the in-vehicle device starts the authentication of the authentication chip, and obtains the authentication information generated by the authentication chip.
  • the authentication program is developed according to Apple's iAP2 authentication protocol.
  • the authentication program can be set in the MFi chip.
  • the program can interact with the iPhone via /dev/MFi_iAP2, and pass /dev/MFI and authentication.
  • the chip performs data interaction and completes the authentication.
  • the mobile terminal and the in-vehicle device successfully load the NCM driver, the mobile terminal and the in-vehicle device are successfully connected through the NCM port.
  • the mobile terminal and the in-vehicle device are mapped into network device nodes, and the mobile terminal allocates an IP address to the in-vehicle device according to its own network segment ID and allocates a corresponding IP address.
  • the in-vehicle device can receive the assigned IP address through the NCM port and establish a data path with the mobile terminal, such as various User Datagram Protocol (UDP) and Transmission Control Protocol (TCP). Data path to realize the communication connection between the mobile terminal and the in-vehicle device for data transmission.
  • UDP User Datagram Protocol
  • TCP Transmission Control Protocol
  • the communication between the in-vehicle device and the mobile terminal is performed by using a USB wired connection, which can overcome the defect that the in-vehicle device and the mobile terminal communicate in a wireless manner in the prior art, and the connection stability is very poor.
  • the in-vehicle device and the mobile terminal of the embodiment adopt a wired connection of USB and use NCM port for data transmission, and the NCM is a network port for transmitting network data, and has a high-speed transmission mechanism and can support data bandwidth.
  • the USB port is virtualized into a network card at both ends of the vehicle device and the mobile terminal, and applications on both sides, such as Carlife, can communicate through the network card and the peer end, and virtual
  • the network card can be network programmed to establish a plurality of network channels. Therefore, the technical solution of the embodiment can support multiple data channels, and the scalability is very good.
  • FIG. 2 is a flowchart of Embodiment 2 of a method for establishing a communication connection according to the present invention. As shown in FIG. 2, the method for establishing a communication connection in this embodiment may specifically include the following steps:
  • the mobile terminal accesses the in-vehicle device through the USB and switches to the main mode, the mobile terminal receives the information of the first preset type port for data transmission reported by the in-vehicle device and the second preset type port for performing the authentication information transmission.
  • Information
  • the mobile terminal loads, according to the information of the first preset type port and the information of the second preset type port, the driving of the first preset type port and the driving of the second preset type port respectively;
  • the mobile terminal performs authentication and interaction with the in-vehicle device through the second preset type of port to authenticate the authentication information generated by the authentication chip.
  • the in-vehicle device is loaded with the driver of the first preset type port and the port of the second preset type. Drive and certify the driver of the chip;
  • the mobile terminal allocates an IP address to the in-vehicle device according to the network segment ID.
  • the mobile terminal establishes a communication connection for performing data transmission with the in-vehicle device according to the IP address and through the first preset type port.
  • the execution body of the communication connection establishment method of this embodiment is a mobile terminal.
  • the communication connection establishment method of the present embodiment is different from the embodiment shown in FIG. 1 only in that the embodiment shown in FIG. 1 describes the technical solution of the present invention on the vehicle-mounted device side, and the present embodiment describes the present invention on the mobile terminal side.
  • the implementation principle is the same.
  • refer to the description of the embodiment shown in FIG. 1 and details are not described herein again.
  • the mobile terminal when the mobile terminal accesses the in-vehicle device through the USB and switches to the main mode, the mobile terminal receives the information of the first preset type port for transmitting the data reported by the in-vehicle device and performs the authentication information transmission.
  • the information of the second preset type port is loaded by the mobile terminal according to the information of the first preset type port and the information of the second preset type port, respectively;
  • the mobile terminal performs authentication interaction with the in-vehicle device through the second preset type of port to authenticate the authentication information generated by the authentication chip;
  • the in-vehicle device is loaded with the driver of the first preset type port, and the driving of the second preset type port
  • the mobile terminal allocates an IP address to the in-vehicle device according to the network segment ID;
  • the mobile terminal establishes a communication connection for data transmission with the in-vehicle device according to the IP address and through the first preset type port.
  • the in-vehicle device and the mobile terminal of the embodiment use the wired connection of the USB to communicate, which can overcome the defect that the in-vehicle device and the mobile terminal communicate in a wireless manner in the prior art, and the connection stability is very poor;
  • the example of the in-vehicle device and the mobile terminal adopts a USB wired connection and uses NCM port for data transmission.
  • the NCM is a network port for transmitting network data, has a high-speed transmission mechanism, and can support a data bandwidth large enough for data transmission.
  • the efficiency of the embodiment is relatively high; and in the technical solution of the embodiment, the USB port is virtualized into a network card at both ends of the vehicle device and the mobile terminal, and applications on both sides, such as Carlife, can communicate with the peer through the network card, and the virtual network card can perform network. Programming, establishing a plurality of network channels, and thus, the embodiment The technical solution can support multiple data channels and the scalability is very good. Further, based on the technical solution of the foregoing embodiment, in step 200, the mobile terminal receives the information of the first preset type port for performing data transmission reported by the in-vehicle device and the second preset type for performing the authentication information transmission. Before the information of the port, the following steps can also be included:
  • the mobile terminal performs port enumeration on the in-vehicle device.
  • the mobile terminal allocates an IP address to the in-vehicle device according to the network segment ID, the method further includes the following steps:
  • the method further includes:
  • the mobile terminal transmits an IP address to the in-vehicle device.
  • the mobile terminal allocates an IP address to the mobile terminal according to the request of the in-vehicle device; and after allocating the IP address, the IP address is transmitted to the in-vehicle device.
  • the first preset type port is an NCM port
  • the second preset type port is an IAP2 port
  • the authentication chip is an MFI. chip.
  • the communication between the in-vehicle device and the mobile terminal is performed by using a USB wired connection, which can overcome the defect that the in-vehicle device and the mobile terminal communicate in a wireless manner in the prior art, and the connection stability is very poor.
  • the in-vehicle device and the mobile terminal of the embodiment adopt a wired connection of USB and use NCM port for data transmission, and the NCM is a network port for transmitting network data, and has a high-speed transmission mechanism and can support data bandwidth.
  • the USB port is virtualized into a network card at both ends of the vehicle device and the mobile terminal, and applications on both sides, such as Carlife, can communicate through the network card and the peer end, and virtual
  • the network card can be network programmed to establish a plurality of network channels. Therefore, the technical solution of the embodiment can support multiple data channels, and the scalability is very good.
  • FIG. 3 is a signaling diagram of Embodiment 3 of a method for establishing a communication connection according to the present invention. As shown in FIG. 1 , the method for establishing a communication connection in this embodiment may specifically include the following steps:
  • the car device When the iPhone is just plugged into the car device via USB, the car device performs USB port enumeration on the accessed mobile phone to detect whether the mobile phone is an iPhone mobile phone;
  • the car device when the iPhone is just plugged into the car device via USB, the car device works in the HOST mode of the USB, and the USB port is enumerated for the iPhone. Because the iPhone has its own features, such as support for NCM ports and IAP2 ports. Therefore, when the in-vehicle device finds that the iPhone is connected, it is determined that the phone supports NCM port transmission.
  • the in-vehicle device sends a USB master-slave mode switching command to the iPhone.
  • the in-vehicle device sends a USB master-slave mode switching command to the iPhone via ep0.
  • the in-vehicle device switches from the HOST mode to the slave mode;
  • the iPhone After receiving the USB master-slave mode switching command, the iPhone resets to the HOST mode after the USB reset;
  • the in-vehicle device uses the USB slave mode to report the information of the standard NCM port to the iPhone and the information of the IAP2 port conforming to the Apple authentication protocol;
  • the NCM port is used to transmit data.
  • the information of the NCM port may specifically include the information shown in Table 1 below.
  • the IAP2 port is used to transmit authentication information.
  • the information of the IAP2 port may specifically include the information shown in Table 2 below.
  • Port class Port subclass Port protocol code Data port 0 ⁇ 2 0 ⁇ 0d 0 ⁇ 00 Communication port 0 ⁇ 0a 0 ⁇ 00 0 ⁇ 01
  • the vehicle device loads the driver of the NCM driver, the iAP2 driver, and the MFi authentication chip;
  • FIG. 4 is a schematic structural diagram of an iPhone mobile phone, an in-vehicle device, and an MFi authentication chip according to an embodiment of the present invention.
  • the MFi authentication chip is connected to the motherboard of the in-vehicle device through I2C in advance, and is installed inside the in-vehicle device.
  • the NCM driver After loading the driver, it is equivalent to activating the NCM port, IAP2 port, and MFi authentication program. After the iPhone and the car device successfully load the NCM driver, they are mapped to network device nodes.
  • the in-vehicle device and the iPhone are authenticated according to the IAP2 port;
  • the authentication program is developed according to Apple's iAP2 authentication protocol. After the program is loaded by the iAP2 driver, the corresponding device file /dev/MFi_iAP2 is mapped to the iPhone in the dev directory, and the /dev/MFI and MFi are passed.
  • the authentication chip performs data interaction and implements authentication. For example, MFi first generates authentication information, and is sent to the iPhone via /dev/MFI. The authentication message is processed by an authentication module in the iPhone. If it needs to be further returned to the MFi chip on the vehicle terminal side for authentication, the iPhone can also be used.
  • the verification message generated by the mobile phone is returned to the MFi chip on the in-vehicle device side through /dev/MFI, and the authentication is realized through multiple interactions.
  • the in-vehicle device requests an IP address from the iPhone.
  • the iPhone assigns an IP address to the in-vehicle device according to its own network segment ID;
  • the iPhone sends an IP address to the in-vehicle device
  • the in-vehicle device establishes a communication connection for data transmission with the iPhone through the NCM port according to the IP address.
  • a communication connection can be established between the in-vehicle device and the iPhone, so that the in-vehicle device and the iPhone can transmit data through the NCM port.
  • the in-vehicle device and the mobile terminal use the USB wired connection to communicate, which can overcome the wireless communication between the in-vehicle device and the mobile terminal in the prior art, and the connection is stable.
  • the defect is very poor; moreover, the in-vehicle device and the mobile terminal of the embodiment adopt a USB wired connection, and the NCM port is used for data transmission, and the NCM is a network port for transmitting network data, and has a high-speed transmission mechanism.
  • the data bandwidth that can be supported is large enough, and the efficiency of data transmission is relatively high.
  • the USB port is virtualized into a network card at both ends of the vehicle device and the mobile terminal, and applications on both sides, such as Carlife, can pass the network card and the pair.
  • the communication is performed on the network, and the virtual network card can perform network programming and establish multiple network channels. Therefore, the technical solution of this embodiment can support multiple data channels, and the scalability is very good.
  • Fig. 5 is a structural diagram showing a first embodiment of the in-vehicle device of the present invention.
  • the in-vehicle device of this embodiment may specifically include: a sending module 10, a loading module 11, an authentication module 12, an obtaining module 13, and an establishing module 14.
  • the sending module 10 is configured to: when the mobile terminal accesses the in-vehicle device through the USB and switch to the main mode, report the information of the first preset type port for performing data transmission and the second preset type for performing the authentication information transmission to the mobile terminal.
  • the information of the port is used by the mobile terminal to load the driver corresponding to each port; the sending module 10 is further configured to trigger the loading of the loading module 11 , and the loading module 11 is configured to load the driving of the first preset type port and the driving of the second preset type port And the driver of the authentication chip; the authentication module 12 is configured to start according to the loading of the loading module 11, according to the authentication The authentication information generated by the chip is authenticated and interacted with the mobile terminal through the second preset type of port; the authentication information is authenticated; the obtaining module 13 is configured to obtain the mobile terminal according to the network segment ID as the vehicle after the authentication module 12 passes the authentication.
  • the IP address assigned by the device; the establishing module 14 is configured to establish, according to the IP address acquired by the obtaining module 13, a communication connection for data transmission with the mobile terminal through the first preset type port.
  • the establishment of the communication connection by using the above-mentioned module is the same as the implementation principle and the technical effect of the related method embodiment.
  • the description of the related method embodiments and details are not described herein again.
  • Fig. 6 is a structural diagram of a second embodiment of the in-vehicle device of the present invention. As shown in FIG. 6, the in-vehicle device of the present embodiment further includes the following technical solutions based on the technical solution of the embodiment shown in FIG.
  • the in-vehicle device of this embodiment may further include an enumeration module 15 and a switching module 16.
  • the enumeration module 15 is configured to: when the mobile terminal accesses the in-vehicle device through the USB, perform port enumeration on the mobile terminal to detect whether the mobile terminal is a mobile terminal that supports the first preset type port communication;
  • the sending module 10 is further configured to: if the enumerating module 15 determines that the mobile terminal is a mobile terminal that supports the first preset type port communication, send a master-slave switching command to the mobile terminal, so that the mobile terminal switches from the mode to the master mode;
  • the switching module 16 is configured to switch the main mode to the slave mode if the enumeration module 15 determines that the mobile terminal is a mobile terminal supporting the first preset type port communication.
  • the in-vehicle device of the embodiment may further include a startup module 17 .
  • the startup module 17 is configured to initiate authentication of the authentication chip.
  • the acquisition module 13 is further configured to acquire authentication information generated by the authentication chip activated by the startup module 17.
  • the first preset type port is an NCM port
  • the second preset type port is an IAP2 port
  • the authentication chip is an MFI chip
  • the establishment of the communication connection by using the above-mentioned module is the same as the implementation principle and the technical effect of the related method embodiment.
  • the description of the related method embodiments and details are not described herein again.
  • FIG. 7 is a structural diagram of Embodiment 1 of a mobile terminal according to the present invention.
  • the mobile terminal of this embodiment may specifically include: a receiving module 20, a loading module 21, an authentication module 22, an allocating module 23, and an establishing module 24.
  • the receiving module 20 is configured to: when the mobile terminal accesses the in-vehicle device through the USB and switch to the main mode, receive the information of the first preset type port for performing data transmission reported by the in-vehicle device, and the second preset for performing the authentication information transmission.
  • the loading module 21 is configured to load the driving of the first preset type port and the second preset type port according to the information of the first preset type port and the information of the second preset type port respectively received by the receiving module 20
  • the authentication module 22 is configured to perform authentication interaction with the in-vehicle device by using the second preset type port loaded by the loading module 21 to authenticate the authentication information generated by the authentication chip; the in-vehicle device is loaded with the first preset type.
  • the mobile terminal of this embodiment realizes the establishment and the communication connection by adopting the above module.
  • the implementation principles and technical effects of the related method embodiments are the same. For details, refer to the description of the foregoing related method embodiments, and details are not described herein again.
  • FIG. 8 is a structural diagram of Embodiment 2 of a mobile terminal according to the present invention. As shown in FIG. 8, the mobile terminal of this embodiment further includes the following technical solutions based on the technical solution of the embodiment shown in FIG.
  • the mobile terminal of this embodiment may further include an enumeration module 25 and a switching module 26.
  • the receiving module 20 is further configured to: when the mobile terminal accesses the in-vehicle device through the USB, and determine, by the port enumeration of the in-vehicle device, that the current mobile terminal is a mobile terminal that supports the first preset type of port communication, receiving the master-slave switch sent by the in-vehicle device command;
  • the switching module 26 is configured to switch the current mode to the master mode according to the master-slave switching command received by the receiving module 20;
  • the enumeration module 25 is configured to perform port enumeration on the in-vehicle device after the switching module 26 switches the current mode.
  • the mobile terminal in this embodiment may further include a sending module 27 .
  • the receiving module 20 is further configured to receive an IP request sent by the in-vehicle device
  • the allocating module 23 is configured to allocate an IP address to the in-vehicle device according to the network segment ID according to the IP request received by the receiving module 20;
  • the sending module 27 is configured to send the IP address assigned by the allocating module 23 to the in-vehicle device.
  • the first preset type port is an NCM port
  • the second preset type port is an IAP2 port
  • the authentication chip is an MFI chip.
  • the implementation of the communication connection by using the above-mentioned modules is the same as the implementation principle and the technical effect of the foregoing related method embodiments.
  • the description of the related method embodiments, and details are not described herein again.
  • the communication connection establishing system of the present embodiment includes an in-vehicle device 30 and a mobile terminal 40 for establishing a communication connection; the in-vehicle device 30 adopts the in-vehicle device shown in FIG. 5 or FIG. 6; the mobile terminal 40 adopts the above.
  • the mobile terminal shown in FIG. 7 or FIG. the establishment of the communication connection establishment system can be implemented by using the communication connection establishment method as described in any of the above FIG. 1 to FIG. 3.
  • the electronic device may include one or more processors 800, and further includes a memory 801 and one or more programs.
  • the embodiment shown in FIG. 10 includes a processor 800 as an example to describe the present invention.
  • the one or more programs are stored in the memory 801 and executed by the one or more processors 800 to implement the method flow and/or device operations illustrated in the above-described embodiments of the present invention.
  • the method flow executed by the one or more processors 800 may include:
  • the in-vehicle device When the mobile terminal accesses the in-vehicle device through the universal serial bus and switches to the main mode, the in-vehicle device reports information of the first preset type port for performing data transmission and the second for performing authentication information transmission to the mobile terminal. Presetting the information of the port for the mobile terminal to load the driver corresponding to each port;
  • the in-vehicle device loads the driving of the first preset type port, the driving of the second preset type port, and the driving of the authentication chip;
  • the in-vehicle device performs authentication interaction with the mobile terminal by using the second preset type of port according to the authentication information generated by the authentication chip, to identify the authentication information. certificate;
  • the in-vehicle device acquires an IP address allocated by the mobile terminal to the in-vehicle device according to the network segment ID;
  • the in-vehicle device establishes a communication connection for data transmission with the mobile terminal through the first preset type port according to the IP address.
  • the method flow executed by the one or more processors 800 may include:
  • the mobile terminal accesses the in-vehicle device through the universal serial bus and switches to the master mode, the mobile terminal receives the information of the first preset type port for transmitting data reported by the in-vehicle device and transmits the authentication information.
  • Two preset type port information Two preset type port information
  • the mobile terminal loads the driving of the first preset type port and the driving of the second preset type port according to the information of the first preset type port and the information of the second preset type port, respectively;
  • the mobile terminal performs authentication interaction with the in-vehicle device through the second preset type of port to authenticate the authentication information generated by the authentication chip; the in-vehicle device is loaded with the driver of the first preset type port Driving of the second preset type port and driving of the authentication chip;
  • the mobile terminal allocates an IP address to the in-vehicle device according to the network segment ID;
  • the mobile terminal establishes a communication connection for data transmission with the in-vehicle device through the first preset type port according to the IP address.
  • the electronic device described in this embodiment may be a mobile terminal or an in-vehicle device.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
  • the above-described integrated unit implemented in the form of a software functional unit can be stored in a computer readable storage medium.
  • the above software functional unit is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to perform the methods of the various embodiments of the present invention. Part of the steps.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

Provided by the present invention are a communication connection establishing method and system, mobile terminal, vehicle-mounted equipment, corresponding equipment and computer storage medium. The method comprises: when a mobile terminal accesses a vehicle-mounted equipment by means of a universal serial bus (USB) and switches to a main mode, the vehicle-mounted equipment reports information of a first preset type port for data transmission and information of a second preset type port for authentication information transmission to the mobile terminal so as to load corresponding drive of each port for the mobile terminal; the vehicle-mounted equipment also loads the corresponding drive and the drive of an authentication chip; authentication interaction with the mobile terminal is carried out by means of the second preset type port according to authentication information generated by the authentication chip; an IP address assigned by the mobile terminal to the vehicle-mounted equipment according to a network segment ID is acquired after authentication is successful; and data communication connection with the mobile terminal is established by means of the first preset type port according to the IP address. By means of the technical solution of the present invention, a connection between the vehicle-mounted equipment and the mobile terminal is stable, a data bandwidth which is large enough may be supported, multiple data channels may be supported, and expandability is good.

Description

通信连接建立方法、系统、移动终端、车载设备及对应设备和计算机存储介质Communication connection establishment method, system, mobile terminal, vehicle-mounted device, and corresponding device and computer storage medium
本申请要求了申请日为2016年12月30日,申请号为201611256186.2发明名称为“通信连接建立方法及系统、移动终端与车载设备”的中国专利申请的优先权。The present application claims priority to Chinese Patent Application No. 201611256186.2, entitled "Communication Connection Establishment Method and System, Mobile Terminal and Vehicle-mounted Equipment", on the application date of December 30, 2016.
技术领域Technical field
本发明涉及通信技术领域,尤其涉及一种通信连接建立方法、系统、移动终端、车载设备及对应设备和计算机存储介质。The present invention relates to the field of communications technologies, and in particular, to a communication connection establishing method and system, a mobile terminal, an in-vehicle device, and a corresponding device and a computer storage medium.
背景技术Background technique
随着科技的发展,各地汽车保有量的快速增加,车辆已经成为人们出行最基本的代步工具。With the development of science and technology, the number of cars in various places has increased rapidly, and vehicles have become the most basic means of transportation for people to travel.
随着移动终端的使用普及,为了便于用户在驾驶车辆出行时使用移动终端。现有技术中提供了将移动终端与车载设备连接起来的技术方案,便于用户通过车载设备拨打或者接听移动终端的电话;另外,还可以通过车载设备播放移动终端的音乐。目前移动终端与车载设备之间可以通过无线或者有线来连接,例如无线连接时可以采用wifi或者蓝牙来实现。有线连接时可以采用基于iap2协议的EA session和EA Native Transport两种方式来实现。With the widespread use of mobile terminals, in order to facilitate the user to use the mobile terminal while driving the vehicle. In the prior art, a technical solution for connecting a mobile terminal to an in-vehicle device is provided, which facilitates a user to make or receive a call of the mobile terminal through the in-vehicle device; in addition, the music of the mobile terminal can also be played through the in-vehicle device. At present, the mobile terminal and the in-vehicle device can be connected by wireless or wired. For example, the wireless connection can be implemented by using wifi or Bluetooth. The wired connection can be implemented by using the ia session and EA Native Transport based on the iap2 protocol.
但是现有的如iPhone之类的移动终端与车载系统的连接方案中,采用wifi连接的无线连接方案在车载环境中连接不稳定,容易受到干扰。现有技术的将iPhone之类的移动终端做热点建立的无线连接,连接的稳定性还要收到移动终端的数据网络信号的影响,当手机移动数据网络信号很差时连接非常容易断开,且数据传输带宽也较小;现有技术中使用 车载设备的硬件搭建的车内wifi,同样信号不稳定,还需要增加车载的wifi设备的硬件成本;现有技术中若采用无线蓝牙连接的方案,也容易受到干扰导致连接不稳定,而且蓝牙传输速率很低,很多时候带宽满足不了应用场景的需求。另外对于现有的有线连接方案,EA session的连接数据带宽比较低,不适合传输大量数据的场景,而EA Native Transport的方式数据带宽足够,但是不支持多数据通道,扩展性较差。总之现有的iPhone之类的移动终端与车载设备之间的无线通信连接稳定性非常差,有线通信连接的带宽较低或者扩展性较差。However, in the existing connection schemes of mobile terminals such as the iPhone and the in-vehicle system, the wireless connection scheme using the wifi connection is unstable in the vehicle environment and is susceptible to interference. In the prior art, a mobile terminal such as an iPhone is used as a wireless connection established by a hotspot, and the stability of the connection is also affected by the data network signal of the mobile terminal. When the mobile phone data network signal is poor, the connection is very easy to disconnect. And the data transmission bandwidth is also small; used in the prior art The in-vehicle wifi built by the hardware of the in-vehicle device is also unstable in signal, and the hardware cost of the in-vehicle wifi device needs to be increased; if the wireless Bluetooth connection scheme is adopted in the prior art, the connection is unstable and the connection is unstable, and the Bluetooth transmission is The rate is very low, and in many cases the bandwidth cannot meet the needs of the application scenario. In addition, for the existing wired connection scheme, the connection data bandwidth of the EA session is relatively low, and it is not suitable for transmitting a large amount of data. However, the EA Native Transport mode has sufficient data bandwidth, but does not support multiple data channels, and has poor scalability. In short, the stability of the wireless communication connection between the mobile terminal and the in-vehicle device such as the existing iPhone is very poor, and the bandwidth of the wired communication connection is low or the expansion is poor.
发明内容Summary of the invention
本发明提供了一种通信连接建立方法及系统、移动终端与车载设备,用于提高移动终端与车载设备之间的连接稳定性、扩展移动终端与车载设备之间通信的带宽,且能够提高移动终端与车载设备之间通信的带宽的可扩展性。The present invention provides a communication connection establishing method and system, a mobile terminal and an in-vehicle device, which are used for improving connection stability between a mobile terminal and an in-vehicle device, expanding bandwidth of communication between the mobile terminal and the in-vehicle device, and improving mobility The scalability of the bandwidth of communication between the terminal and the in-vehicle device.
本发明提供一种通信连接建立方法,所述方法包括:The present invention provides a communication connection establishment method, the method comprising:
当移动终端通过通用串行总线接入车载设备后并切换为主模式时,所述车载设备向所述移动终端上报进行数据传输的第一预设类型端口的信息和进行认证信息传输的第二预设类型端口的信息,以供所述移动终端加载各端口对应的驱动;When the mobile terminal accesses the in-vehicle device through the universal serial bus and switches to the main mode, the in-vehicle device reports information of the first preset type port for performing data transmission and the second for performing authentication information transmission to the mobile terminal. Presetting the information of the port for the mobile terminal to load the driver corresponding to each port;
所述车载设备加载所述第一预设类型端口的驱动、所述第二预设类型端口的驱动和认证芯片的驱动;The in-vehicle device loads the driving of the first preset type port, the driving of the second preset type port, and the driving of the authentication chip;
所述车载设备根据所述认证芯片产生的认证信息,通过所述第二预设类型的端口与所述移动终端进行认证交互;以对所述认证信息进行认证; The in-vehicle device performs authentication interaction with the mobile terminal by using the second preset type of port according to the authentication information generated by the authentication chip, to authenticate the authentication information;
认证通过后,所述车载设备获取所述移动终端根据网段ID为所述车载设备分配的IP地址;After the authentication is passed, the in-vehicle device acquires an IP address allocated by the mobile terminal to the in-vehicle device according to the network segment ID;
所述车载设备根据所述IP地址、通过所述第一预设类型端口与所述移动终端建立进行数据传输的通信连接。The in-vehicle device establishes a communication connection for data transmission with the mobile terminal through the first preset type port according to the IP address.
进一步可选地,如上所述方法中,当移动终端通过通用串行总线接入车载设备后并切换为主模式之前,所述方法还包括:Further, optionally, in the method as described above, before the mobile terminal accesses the in-vehicle device through the universal serial bus and switches to the main mode, the method further includes:
当所述移动终端通过所述通用串行总线接入所述车载设备,所述车载设备对所述移动终端进行端口枚举,以检测所述移动终端是否为支持所述第一预设类型端口通信的移动终端;When the mobile terminal accesses the in-vehicle device through the universal serial bus, the in-vehicle device performs port enumeration on the mobile terminal to detect whether the mobile terminal supports the first preset type port Mobile terminal for communication;
若所述移动终端为支持所述第一预设类型端口通信的移动终端,所述车载设备向所述移动终端发送主从切换命令,以供所述移动终端将从模式切换为主模式;If the mobile terminal is a mobile terminal that supports the first preset type port communication, the in-vehicle device sends a master-slave switching command to the mobile terminal, so that the mobile terminal switches from a mode to a master mode;
所述车载设备将主模式切换为从模式。The in-vehicle device switches the main mode to the slave mode.
进一步可选地,如上所述方法中,所述车载设备根据所述认证芯片产生的认证信息,通过所述第二预设类型的端口与所述移动终端进行认证交互;以对所述认证信息进行认证之前,所述方法还包括:Further optionally, in the method as described above, the in-vehicle device performs authentication interaction with the mobile terminal by using the second preset type of port according to the authentication information generated by the authentication chip; Before the authentication, the method further includes:
所述车载设备启动所述认证芯片的认证,并获取所述认证芯片产生的所述认证信息。The in-vehicle device starts authentication of the authentication chip, and acquires the authentication information generated by the authentication chip.
进一步可选地,如上所述方法中,当所述移动终端为IOS操作系统的移动终端,所述第一预设类型端口为NCM端口,所述第二预设类型端口为IAP2端口,所述认证芯片为MFI芯片。Further, optionally, in the method as described above, when the mobile terminal is a mobile terminal of an IOS operating system, the first preset type port is an NCM port, and the second preset type port is an IAP2 port, The authentication chip is an MFI chip.
本发明还提供一种通信连接建立方法,所述方法包括:The invention also provides a communication connection establishing method, the method comprising:
当移动终端通过通用串行总线接入车载设备后并切换为主模式时, 所述移动终端接收所述车载设备上报的进行数据传输的第一预设类型端口的信息和进行认证信息传输的第二预设类型端口的信息;When the mobile terminal accesses the in-vehicle device through the universal serial bus and switches to the main mode, Receiving, by the mobile terminal, information of a first preset type port for performing data transmission and information of a second preset type of port for performing authentication information transmission by the in-vehicle device;
所述移动终端根据所述第一预设类型端口的信息和所述第二预设类型端口的信息分别加载所述第一预设类型端口的驱动和所述第二预设类型端口的驱动;The mobile terminal loads the driving of the first preset type port and the driving of the second preset type port according to the information of the first preset type port and the information of the second preset type port, respectively;
所述移动终端通过所述第二预设类型的端口与所述车载设备进行认证交互,以对认证芯片产生的认证信息进行认证;所述车载设备加载有所述第一预设类型端口的驱动、所述第二预设类型端口的驱动和认证芯片的驱动;The mobile terminal performs authentication interaction with the in-vehicle device through the second preset type of port to authenticate the authentication information generated by the authentication chip; the in-vehicle device is loaded with the driver of the first preset type port Driving of the second preset type port and driving of the authentication chip;
认证通过后,所述移动终端根据网段ID为所述车载设备分配IP地址;After the authentication is passed, the mobile terminal allocates an IP address to the in-vehicle device according to the network segment ID;
所述移动终端根据所述IP地址、通过所述第一预设类型端口与所述车载设备建立进行数据传输的通信连接。The mobile terminal establishes a communication connection for data transmission with the in-vehicle device through the first preset type port according to the IP address.
进一步可选地,如上所述方法中,所述移动终端接收所述车载设备上报的进行数据传输的第一预设类型端口的信息和进行认证信息传输的第二预设类型端口的信息之前,所述方法还包括:Further, optionally, in the method as described above, the mobile terminal receives the information of the first preset type port for data transmission reported by the in-vehicle device and the information of the second preset type port for performing the authentication information transmission, The method further includes:
当所述移动终端通过所述通用串行总线接入所述车载设备,且通过所述车载设备的端口枚举确定当前所述移动终端为支持所述第一预设类型端口通信的移动终端时,所述移动终端接收所述车载设备发送的主从切换命令;When the mobile terminal accesses the in-vehicle device through the universal serial bus, and determines, by the port enumeration of the in-vehicle device, that the mobile terminal is currently a mobile terminal supporting the first preset type port communication The mobile terminal receives a master-slave switching command sent by the in-vehicle device;
所述移动终端根据所述主从切换命令,将当前模式切换为主模式;The mobile terminal switches the current mode to a master mode according to the master-slave switching command;
所述移动终端对所述车载设备进行端口枚举。The mobile terminal performs port enumeration on the in-vehicle device.
进一步可选地,如上所述方法中,认证通过后,所述移动终端根据 网段ID为所述车载设备分配IP地址之前,所述方法还包括:Further optionally, in the method as described above, after the authentication is passed, the mobile terminal is configured according to Before the network segment ID is assigned to the in-vehicle device, the method further includes:
所述移动终端接收所述车载设备发送的IP请求;Receiving, by the mobile terminal, an IP request sent by the in-vehicle device;
所述移动终端根据网段ID为所述车载设备分配IP地址之后,所述方法还包括:After the mobile terminal allocates an IP address to the in-vehicle device according to the network segment ID, the method further includes:
所述移动终端向所述车载设备发送所述IP地址。The mobile terminal transmits the IP address to the in-vehicle device.
进一步可选地,如上所述方法中,当所述移动终端为IOS操作系统的移动终端,所述第一预设类型端口为NCM端口,所述第二预设类型端口为IAP2端口,所述认证芯片为MFI芯片。Further, optionally, in the method as described above, when the mobile terminal is a mobile terminal of an IOS operating system, the first preset type port is an NCM port, and the second preset type port is an IAP2 port, The authentication chip is an MFI chip.
本发明还提供一种车载设备,所述车载设备包括:The invention also provides an in-vehicle device, the in-vehicle device comprising:
发送模块,用于当移动终端通过通用串行总线接入所述车载设备后并切换为主模式时,向所述移动终端上报进行数据传输的第一预设类型端口的信息和进行认证信息传输的第二预设类型端口的信息,以供所述移动终端加载各端口对应的驱动;a sending module, configured to report, to the mobile terminal, information of a first preset type of port for performing data transmission and perform authentication information transmission when the mobile terminal accesses the in-vehicle device through a universal serial bus and switches to a master mode The information of the second preset type port, so that the mobile terminal loads the driver corresponding to each port;
加载模块,用于加载所述第一预设类型端口的驱动、所述第二预设类型端口的驱动和认证芯片的驱动;a loading module, configured to load the driving of the first preset type port, the driving of the second preset type port, and the driving of the authentication chip;
认证模块,用于根据所述认证芯片产生的认证信息,通过所述第二预设类型的端口与所述移动终端进行认证交互;以对所述认证信息进行认证;An authentication module, configured to perform authentication interaction with the mobile terminal by using the second preset type of port according to the authentication information generated by the authentication chip, to authenticate the authentication information;
获取模块,用于认证通过后,获取所述移动终端根据网段ID为所述车载设备分配的IP地址;Obtaining, after the authentication is passed, obtaining an IP address allocated by the mobile terminal to the in-vehicle device according to the network segment ID;
建立模块,用于根据所述IP地址、通过所述第一预设类型端口与所述移动终端建立进行数据传输的通信连接。And a establishing module, configured to establish, according to the IP address, a communication connection for performing data transmission with the mobile terminal by using the first preset type port.
进一步可选地,如上所述车载设备中,所述车载设备还包括枚举模 块和切换模块;Further optionally, in the in-vehicle device as described above, the in-vehicle device further includes an enumeration module Block and switching module;
所述枚举模块,用于当所述移动终端通过所述通用串行总线接入所述车载设备,对所述移动终端进行端口枚举,以检测所述移动终端是否为支持所述第一预设类型端口通信的移动终端;The enumeration module is configured to: when the mobile terminal accesses the in-vehicle device through the universal serial bus, perform port enumeration on the mobile terminal to detect whether the mobile terminal supports the first a mobile terminal of a preset type port communication;
所述发送模块,还用于若所述移动终端为支持所述第一预设类型端口通信的移动终端,向所述移动终端发送主从切换命令,以供所述移动终端将从模式切换为主模式;The sending module is further configured to: if the mobile terminal is a mobile terminal that supports the first preset type port communication, send a master-slave switching command to the mobile terminal, so that the mobile terminal switches from a mode to a mode Main mode
所述切换模块,用于将主模式切换为从模式。The switching module is configured to switch the main mode to the slave mode.
进一步可选地,如上所述车载设备中,所述车载设备还包括启动模块;Further optionally, in the in-vehicle device as described above, the in-vehicle device further includes a startup module;
所述启动模块,用于启动所述认证芯片的认证;The startup module is configured to initiate authentication of the authentication chip;
所述获取模块,还用于获取所述认证芯片产生的所述认证信息。The obtaining module is further configured to acquire the authentication information generated by the authentication chip.
进一步可选地,如上所述车载设备中,当所述移动终端为IOS操作系统的移动终端,所述第一预设类型端口为NCM端口,所述第二预设类型端口为IAP2端口,所述认证芯片为MFI芯片。Further optionally, in the in-vehicle device as described above, when the mobile terminal is a mobile terminal of an IOS operating system, the first preset type port is an NCM port, and the second preset type port is an IAP2 port. The authentication chip is an MFI chip.
本发明还提供一种移动终端,所述移动终端包括:The present invention also provides a mobile terminal, where the mobile terminal includes:
接收模块,用于当移动终端通过通用串行总线接入车载设备后并切换为主模式时,接收所述车载设备上报的进行数据传输的第一预设类型端口的信息和进行认证信息传输的第二预设类型端口的信息;a receiving module, configured to: when the mobile terminal accesses the in-vehicle device through the universal serial bus and switch to the main mode, receive information about the first preset type of port reported by the in-vehicle device for data transmission, and perform authentication information transmission. Information of the second preset type port;
加载模块,用于根据所述第一预设类型端口的信息和所述第二预设类型端口的信息分别加载所述第一预设类型端口的驱动和所述第二预设类型端口的驱动;a loading module, configured to respectively load the driving of the first preset type port and the driving of the second preset type port according to the information of the first preset type port and the information of the second preset type port ;
认证模块,用于通过所述第二预设类型的端口与所述车载设备进行 认证交互,以对认证芯片产生的认证信息进行认证;所述车载设备加载有所述第一预设类型端口的驱动、所述第二预设类型端口的驱动和认证芯片的驱动;An authentication module, configured to perform, by using the port of the second preset type, with the in-vehicle device Authenticating the authentication to authenticate the authentication information generated by the authentication chip; the in-vehicle device is loaded with the driving of the first preset type port, the driving of the second preset type port, and the driving of the authentication chip;
分配模块,用于认证通过后,根据网段ID为所述车载设备分配IP地址;An allocation module, configured to allocate an IP address to the in-vehicle device according to the network segment ID after the authentication is passed;
建立模块,用于根据所述IP地址、通过所述第一预设类型端口与所述车载设备建立进行数据传输的通信连接。And a establishing module, configured to establish, according to the IP address, a communication connection for performing data transmission with the in-vehicle device through the first preset type port.
进一步可选地,如上所述移动终端中,所述移动终端还包括枚举模块和切换模块:Further optionally, in the mobile terminal as described above, the mobile terminal further includes an enumeration module and a switching module:
所述接收模块,还用于当所述移动终端通过所述通用串行总线接入所述车载设备,且通过所述车载设备的端口枚举确定当前所述移动终端为支持所述第一预设类型端口通信的移动终端时,接收所述车载设备发送的主从切换命令;The receiving module is further configured to: when the mobile terminal accesses the in-vehicle device through the universal serial bus, and determine, by using port enumeration of the in-vehicle device, that the current mobile terminal supports the first pre- When a mobile terminal of type port communication is set, receiving a master-slave switching command sent by the in-vehicle device;
所述切换模块,用于根据所述主从切换命令,将当前模式切换为主模式;The switching module is configured to switch the current mode to a master mode according to the master-slave switching command;
所述枚举模块,用于对所述车载设备进行端口枚举。The enumeration module is configured to perform port enumeration on the in-vehicle device.
进一步可选地,如上所述移动终端中,所述移动终端还包括发送模块;Further optionally, in the mobile terminal as described above, the mobile terminal further includes a sending module;
所述接收模块,还用于接收所述车载设备发送的IP请求;The receiving module is further configured to receive an IP request sent by the in-vehicle device;
所述发送模块,用于向所述车载设备发送所述IP地址。The sending module is configured to send the IP address to the in-vehicle device.
进一步可选地,如上所述移动终端中,当所述移动终端为IOS操作系统的移动终端,所述第一预设类型端口为NCM端口,所述第二预设类型端口为IAP2端口,所述认证芯片为MFI芯片。 Further optionally, in the mobile terminal as described above, when the mobile terminal is a mobile terminal of an IOS operating system, the first preset type port is an NCM port, and the second preset type port is an IAP2 port. The authentication chip is an MFI chip.
本发明还提供一种通信连接建立系统,所述系统包括用于建立通信连接的车载设备和移动终端;所述车载设备采用如上任一所述的车载设备;所述移动终端采用如上任一所述的移动终端。The present invention also provides a communication connection establishing system, the system comprising an in-vehicle device and a mobile terminal for establishing a communication connection; the in-vehicle device adopting the in-vehicle device as described above; the mobile terminal adopting any of the above The mobile terminal described.
本发明的通信连接建立方法及系统、移动终端与车载设备,当移动终端通过USB接入车载设备后并切换为主模式时,移动终端接收车载设备上报的进行数据传输的第一预设类型端口的信息和进行认证信息传输的第二预设类型端口的信息;移动终端根据第一预设类型端口的信息和第二预设类型端口的信息分别加载第一预设类型端口的驱动和第二预设类型端口的驱动;移动终端通过第二预设类型的端口与车载设备进行认证交互,以对认证芯片产生的认证信息进行认证;车载设备加载有第一预设类型端口的驱动、第二预设类型端口的驱动和认证芯片的驱动;认证通过后,移动终端根据网段ID为车载设备分配IP地址;移动终端根据IP地址、通过第一预设类型端口与车载设备建立进行数据传输的通信连接。本发明的车载设备与移动终端之间采用USB的有线连接进行通信,可以克服现有技术中车载设备与移动终端之间采用无线方式进行通信,连接稳定性非常差的缺陷;而且,本发明的车载设备与移动终端之间采用USB的有线连接,且采用NCM端口进行数据传输,该NCM是一种传输网络数据的网络端口,具有高速传输机制,可以支持的数据带宽足够大,数据传输的效率比较高;而且本发明的技术方案中,车载设备与移动终端之间通过USB连接;车载设备与移动终端两端都会把USB端口虚拟成网卡,两侧的应用如Carlife可以通过网卡和对端进行通讯,虚拟的网卡可以进行网络编程,建立多个网络通道,因此,本发明的技术方案能够支持多数据通道,可扩展性非常好。 The communication connection establishing method and system, the mobile terminal and the in-vehicle device of the present invention, when the mobile terminal accesses the in-vehicle device through the USB and switches to the main mode, the mobile terminal receives the first preset type port for data transmission reported by the in-vehicle device. The information and the information of the second preset type port for performing the authentication information transmission; the mobile terminal respectively loads the driver of the first preset type port and the second according to the information of the first preset type port and the information of the second preset type port The driving of the preset type port; the mobile terminal performs authentication interaction with the in-vehicle device through the second preset type of port to authenticate the authentication information generated by the authentication chip; the in-vehicle device is loaded with the driver of the first preset type port, and the second The driving of the preset type port and the driving of the authentication chip; after the authentication is passed, the mobile terminal allocates an IP address to the in-vehicle device according to the network segment ID; the mobile terminal establishes data transmission with the in-vehicle device according to the IP address and through the first preset type port. Communication connection. The in-vehicle device of the present invention communicates with the mobile terminal by using a USB wired connection, which can overcome the defect that the in-vehicle device and the mobile terminal communicate wirelessly in the prior art, and the connection stability is very poor; and the present invention The wired connection between the in-vehicle device and the mobile terminal adopts USB and uses NCM port for data transmission. The NCM is a network port for transmitting network data, and has a high-speed transmission mechanism, and the data bandwidth that can be supported is large enough, and the efficiency of data transmission is high. In the technical solution of the present invention, the in-vehicle device and the mobile terminal are connected by USB; the USB port is virtualized into a network card at both ends of the in-vehicle device and the mobile terminal, and applications on both sides, such as Carlife, can be performed through the network card and the peer end. Communication, virtual network card can perform network programming and establish multiple network channels. Therefore, the technical solution of the present invention can support multiple data channels, and the scalability is very good.
附图说明DRAWINGS
图1为本发明的通信连接建立方法实施例一的流程图。FIG. 1 is a flowchart of Embodiment 1 of a method for establishing a communication connection according to the present invention.
图2为本发明的通信连接建立方法实施例二的流程图。FIG. 2 is a flowchart of Embodiment 2 of a method for establishing a communication connection according to the present invention.
图3为本发明的通信连接建立方法实施例三的信令图。FIG. 3 is a signaling diagram of Embodiment 3 of a method for establishing a communication connection according to the present invention.
图4为本发明实施例中iPhone手机、车载设备以及MFi认证芯片的结构示意图。4 is a schematic structural diagram of an iPhone, an in-vehicle device, and an MFi authentication chip according to an embodiment of the present invention.
图5为本发明的车载设备实施例一的结构图。Fig. 5 is a structural diagram showing a first embodiment of the in-vehicle device of the present invention.
图6为本发明的车载设备实施例二的结构图。Fig. 6 is a structural diagram of a second embodiment of the in-vehicle device of the present invention.
图7为本发明的移动终端实施例一的结构图。FIG. 7 is a structural diagram of Embodiment 1 of a mobile terminal according to the present invention.
图8为本发明的移动终端实施例二的结构图。FIG. 8 is a structural diagram of Embodiment 2 of a mobile terminal according to the present invention.
图9为本发明的通信连接建立系统实施例的结构图。9 is a structural diagram of an embodiment of a communication connection establishment system of the present invention.
图10为本发明的电子设备实施例的结构图。Figure 10 is a block diagram of an embodiment of an electronic device of the present invention.
具体实施方式detailed description
为了使本发明的目的、技术方案和优点更加清楚,下面结合附图和具体实施例对本发明进行详细描述。The present invention will be described in detail below with reference to the drawings and specific embodiments.
本发明实施例的通信连接建立方法应用在移动终端和车载设备之间。本实施例的车载设备可以理解为设置在车机上,与车机为一体的设备。本发明实施例的通信连接建立方法所应用的场景中,移动终端与车载设备之间可以通过有线的方式进行传输,例如可以基于iap2协议的EA session和EA Native Transport两种方式进行通讯。或者本发明实施例的移动终端与车载设备之间也可以采用通用串行总线(Universal Serial Bus;USB)进行有线连接。本发明实施例的发送端设备与接收端设备之间的有线连接采用车机互联通信协议进行消息传输。本实施例中,发送端设 备与接收端设备之间也可以通过无线连接的方式实现采用车机互联通信协议进行消息传输,具体的无线连接方式在本实施例中不做限定。本发明实施例中可以定义一种车机互联通信协议的名称为CarLife,可以理解CarLife为本申请中定义的一种在移动终端与车载设备之间进行消息传输的通信协议,该协议支持移动终端和车载设备之间采用USB进行通信。本发明实施例的技术方案在使用时,可以在移动终端和车载设备两侧均安装CarLife的应用,使得移动终端和车载设备两侧都支持车机互联通讯,以在移动终端和车载设备连接时,移动终端和车载设备通过CarLife进行消息传输,以实现移动终端将页面传输至车载设备,并在车载设备侧显示。The communication connection establishment method of the embodiment of the present invention is applied between a mobile terminal and an in-vehicle device. The in-vehicle device of the present embodiment can be understood as a device that is disposed on the vehicle and integrated with the vehicle. In the scenario in which the communication connection establishment method of the embodiment of the present invention is applied, the mobile terminal and the in-vehicle device can be transmitted in a wired manner. For example, the EA session and the EA Native Transport can be used for communication based on the IAP2 protocol. Alternatively, the universal serial bus (USB) can be used for wired connection between the mobile terminal and the in-vehicle device according to the embodiment of the present invention. The wired connection between the transmitting end device and the receiving end device in the embodiment of the present invention uses a vehicle interconnection communication protocol for message transmission. In this embodiment, the sending end is set The device and the receiving device can also implement the message transmission by using the vehicle interconnection communication protocol. The specific wireless connection mode is not limited in this embodiment. In the embodiment of the present invention, a name of a vehicle interconnection communication protocol may be defined as CarLife, and it may be understood that CarLife is a communication protocol defined in the application for transmitting a message between a mobile terminal and an in-vehicle device, and the protocol supports the mobile terminal. USB communication is carried out with the in-vehicle device. When the technical solution of the embodiment of the present invention is used, the application of CarLife can be installed on both sides of the mobile terminal and the in-vehicle device, so that the mobile terminal and the in-vehicle device support the vehicle interconnection communication on both sides, so that when the mobile terminal and the in-vehicle device are connected The mobile terminal and the in-vehicle device transmit the message through CarLife, so that the mobile terminal transmits the page to the in-vehicle device and displays it on the in-vehicle device side.
本发明实施例中采用CarLife车机互联通信协议进行消息传输时,可以传输的消息的内容的类型包括控制消息和多媒体消息。为了进一步增加根据消息内容传输消息的准确性,本发明实施例中的控制消息还可以分为控制消息和反控制消息两种类型。例如,本发明实施例的控制消息,可以为移动终端控制车载设备打开/关闭车机的空调、或者打开/关闭车机的天窗的控制消息;还可以为车载设备控制移动终端拨打电话或者读取移动终端的信息等等控制消息。本发明实施例的控制消息还可以包括车载数据、蓝牙自动配对消息以及视频初始化消息等等中的至少一种。本发明实施例的反控制消息可以包括车载设备向移动终端发送的车机侧的触摸事件或者按键事件等反控制消息。为了进一步增加根据消息内容传输消息的准确性,本发明实施例的多媒体消息可以分为视频消息、音频消息以及语音消息。例如,本发明实施例的视频消息可以为移动终端向车载设备传输的视频编码数据,在移动终端与车载设备之间通过 USB通信之后,移动终端需要将屏幕上显示的信息以视频的形式实时地投射到车载设备上。即该视频消息包括移动终端的屏幕的视频编码数据。本发明实施例的音频信息可以为Media音频流如音乐数据,或者还可以为用于传输从文本到语言(Text To Sound;TTS)的音频流如导航语音播报数据。例如,可以分别用于移动终端向车载设备传输音乐和导航语音播报的脉冲编码调制(Pulse Code Modulation;PCM)流。本发明实施例的语音消息可以为车载设备向移动终端传输车机麦克(mic)录制的用户语音数据。In the embodiment of the present invention, when the CarLife vehicle interconnection communication protocol is used for message transmission, the types of content that can be transmitted include control messages and multimedia messages. In order to further increase the accuracy of the message according to the content of the message, the control message in the embodiment of the present invention may be further divided into two types: a control message and an anti-control message. For example, the control message of the embodiment of the present invention may be that the mobile terminal controls the air conditioner of the vehicle device to turn on/off the air conditioner of the vehicle, or opens/closes the control message of the sunroof of the vehicle; and may also control the mobile terminal to make a call or read for the vehicle. The information of the mobile terminal, etc., controls the message. The control message of the embodiment of the present invention may further include at least one of in-vehicle data, a Bluetooth automatic pairing message, a video initialization message, and the like. The anti-control message of the embodiment of the present invention may include an anti-control message such as a touch event or a button event of the vehicle-side device that is sent by the in-vehicle device to the mobile terminal. In order to further increase the accuracy of the message transmission according to the message content, the multimedia message in the embodiment of the present invention may be divided into a video message, an audio message, and a voice message. For example, the video message in the embodiment of the present invention may be video encoded data transmitted by the mobile terminal to the in-vehicle device, and passed between the mobile terminal and the in-vehicle device. After the USB communication, the mobile terminal needs to project the information displayed on the screen in real time on the in-vehicle device in the form of video. That is, the video message includes video encoded data of the screen of the mobile terminal. The audio information of the embodiment of the present invention may be a Media audio stream such as music data, or may also be an audio stream for transmitting Text to Sound (TTS) such as navigation voice broadcast data. For example, it can be used for a mobile terminal to transmit a Pulse Code Modulation (PCM) stream of music and navigation voice announcements to the in-vehicle device, respectively. The voice message of the embodiment of the present invention may be that the in-vehicle device transmits the user voice data recorded by the vehicle microphone (mic) to the mobile terminal.
对于每种消息内容的类型,对应的消息结构不同,在消息传输时所采用的数据通道不相同。由上所述,本发明实施例中的消息内容可以包括控制消息、视频消息、音频消息、语音消息以及反控制消息五种类型,每种消息均有自己对应的数据结构和消息传输时对应的数据通道。即在CarLife车机互联通信协议中对应有五种类型的数据通道:控制消息数据通道、视频消息数据通道、音频消息数据通道、语音消息数据通道以及反控消息数据通道。For each type of message content, the corresponding message structure is different, and the data channels used in the message transmission are different. As described above, the message content in the embodiment of the present invention may include five types of control messages, video messages, audio messages, voice messages, and anti-control messages, each of which has its own corresponding data structure and corresponding to the message transmission. Data channel. That is, there are five types of data channels in the CarLife vehicle interconnection communication protocol: control message data channel, video message data channel, audio message data channel, voice message data channel, and anti-control message data channel.
本发明实施例的通信连接建立方法可以基于上述的CarLife车机互联通信协议来建立移动终端与车载设备之间的通信,通信连接建立的详细过程可以参考下述实施例的记载。The communication connection establishment method of the embodiment of the present invention can establish communication between the mobile terminal and the in-vehicle device based on the CarLife vehicle interconnection communication protocol described above, and the detailed process of establishing the communication connection can refer to the description of the following embodiments.
图1为本发明的通信连接建立方法实施例一的流程图。如图1所述,本实施例的通信连接建立方法,具体可以包括如下步骤:FIG. 1 is a flowchart of Embodiment 1 of a method for establishing a communication connection according to the present invention. As shown in FIG. 1 , the method for establishing a communication connection in this embodiment may specifically include the following steps:
100、当移动终端通过通用串行总线(Universal Serial Bus;USB)接入车载设备后并切换为主模式时,车载设备向移动终端上报进行数据传输的第一预设类型端口的信息和进行认证信息传输的第二预设类型端 口的信息,以供移动终端加载各端口对应的驱动;100. When the mobile terminal accesses the in-vehicle device through the universal serial bus (USB) and switches to the main mode, the in-vehicle device reports the information of the first preset type port for performing data transmission to the mobile terminal and performs authentication. Second preset type end of information transmission Information for the mobile terminal to load the driver corresponding to each port;
101、车载设备加载第一预设类型端口的驱动、第二预设类型端口的驱动和认证芯片的驱动;101. The in-vehicle device loads a driver of a first preset type port, a driver of a second preset type port, and a driver of an authentication chip;
102、车载设备根据认证芯片产生的认证信息,通过第二预设类型的端口与移动终端进行认证交互;以对认证信息进行认证;102. The in-vehicle device performs authentication and interaction with the mobile terminal through the second preset type of port according to the authentication information generated by the authentication chip, and performs authentication on the authentication information;
103、认证通过后,车载设备获取移动终端根据网段ID为车载设备分配的IP地址;103. After the authentication is passed, the in-vehicle device obtains an IP address allocated by the mobile terminal to the in-vehicle device according to the network segment ID;
104、车载设备根据IP地址、通过第一预设类型端口与移动终端建立进行数据传输的通信连接。104. The in-vehicle device establishes a communication connection for data transmission with the mobile terminal according to the IP address and through the first preset type port.
本实施例的通信连接建立方法的执行主体为车载设备,在车载设备一侧对本发明的通信连接建立方法进行详细介绍。本实施例中,车载设备与移动终端之间通过通用串行总线进行连接,以进行通信。The execution body of the communication connection establishment method of the present embodiment is an in-vehicle device, and the communication connection establishment method of the present invention is described in detail on the vehicle-mounted device side. In this embodiment, the in-vehicle device and the mobile terminal are connected by a universal serial bus to perform communication.
实际使用中,将移动终端与车载设备通过USB连接起来,此时车载设备工作在主(HOST)模式,移动终端工作在从模式即DEVICE模式。由于移动终端与车载设备要建立通信,需要将车载设备和移动终端进行模式切换,以将移动终端切换为HOST模式。移动终端切换至HOST模式之后,车载设备需要向移动终端上报第一预设类型端口的信息和第二预设类型的端口的信息,第一预设类型的端口是用于后续进行数据传输;第二预设类型的端口适用于后续出进行认证信息传输。也就是说本实施例的移动终端和车载设备之间数据传输和建立连接之前的认证信息传输采用不同的端口。当移动终端收到第一预设类型端口的信息和第二预设类型的端口的信息之后,加载第一预设类型端口的驱动和第二预设类型端口的驱动;其中第一预设类型端口的驱动和第二预设类型端口的驱动 预先设置在移动终端内,以便于在需要加载时及时加载。在车载设备侧,车载设备也加载第一预设类型端口的驱动和第二预设类型端口的驱动;另外,本实施例的移动终端中自带有认证模块,能够与车载设备进行认证交互,实现对车载设备的认证。而车载设备侧内部预设有认证芯片,在加载驱动时,需要同时在车载设备侧加载认证芯片的驱动。然后车载设备侧的认证芯片可以产生认证信息,然后车载设备通过第二预设类型端口将认证信息传输至移动终端侧,由移动终端内的认证模块对认证信息进行认证处理,如果认证过程中,移动终端侧还根据认证消息产生一定的校验消息需要进一步由认证芯片进行认证处理,则移动终端再通过第二预设类型端口将需要认证芯片处理的校验信息传输至车载设备,按照这种方式反复交互,实现对认证消息的认证,即实现移动终端对车载设备的认证。认证通过之后,确定车载设备可以与移动终端通信连接,此时车载设备可以获取移动终端根据网段ID为车载设备分配的IP地址。具体地,可以由车载设备向移动终端请求IP地址,然后车载设备根据移动终端的请求,根据移动终端自身的网段ID为车载设备分配与移动终端在同一网段的IP地址,这样保证移动终端与车载设备的通信。然后移动终端将分配的IP地址发送给车载设备,由车载设备根据该IP地址与移动终端之间通过第一预设类型端口建立通信连接。本实施例的移动终端与车载设备之间可以采用上述实施例所述的CarLife车机互联通信协议进行通信,并在采用本实施例的方法建立通信连接之后,采用CarLife车机互联通信协议的数据通道进行数据传输。In actual use, the mobile terminal and the in-vehicle device are connected through USB. At this time, the in-vehicle device works in the main (HOST) mode, and the mobile terminal works in the slave mode, that is, the DEVICE mode. Since the mobile terminal and the in-vehicle device are to establish communication, the in-vehicle device and the mobile terminal need to perform mode switching to switch the mobile terminal to the HOST mode. After the mobile terminal switches to the HOST mode, the in-vehicle device needs to report the information of the first preset type port and the information of the second preset type to the mobile terminal, where the first preset type of port is used for subsequent data transmission; The two preset types of ports are suitable for subsequent transmission of authentication information. That is to say, the data transmission between the mobile terminal and the in-vehicle device of the embodiment and the authentication information transmission before the connection is established use different ports. After the mobile terminal receives the information of the first preset type port and the information of the second preset type of port, loading the driver of the first preset type port and the driving of the second preset type port; wherein the first preset type Port driver and second preset type port driver It is preset in the mobile terminal so as to be loaded in time when loading is required. On the vehicle-mounted device side, the in-vehicle device also loads the driving of the first preset type port and the driving of the second preset type port; in addition, the mobile terminal of the embodiment has an authentication module capable of performing authentication interaction with the in-vehicle device. Achieve certification for in-vehicle equipment. The authentication chip is pre-configured inside the vehicle-mounted device side, and when the driver is loaded, the driver of the authentication chip needs to be loaded on the vehicle-mounted device side at the same time. Then, the authentication chip on the vehicle-mounted device side can generate authentication information, and then the in-vehicle device transmits the authentication information to the mobile terminal side through the second preset type port, and the authentication module in the mobile terminal performs authentication processing on the authentication information, if the authentication process is performed, The mobile terminal side further generates a certain verification message according to the authentication message, and further needs to be authenticated by the authentication chip, and then the mobile terminal transmits the verification information required to be processed by the authentication chip to the in-vehicle device through the second preset type port, according to the The method repeatedly performs interaction to authenticate the authentication message, that is, the mobile terminal authenticates the in-vehicle device. After the authentication is passed, it is determined that the in-vehicle device can communicate with the mobile terminal, and the in-vehicle device can obtain the IP address assigned by the mobile terminal to the in-vehicle device according to the network segment ID. Specifically, the in-vehicle device may request an IP address from the in-vehicle device, and then the in-vehicle device allocates an IP address of the in-vehicle device in the same network segment as the mobile terminal according to the network segment ID of the mobile terminal according to the request of the mobile terminal, so as to ensure the mobile terminal. Communication with in-vehicle devices. Then, the mobile terminal sends the assigned IP address to the in-vehicle device, and the in-vehicle device establishes a communication connection with the mobile terminal according to the first preset type port according to the IP address. The CarLife vehicle interconnection communication protocol described in the above embodiment can be used for communication between the mobile terminal and the in-vehicle device of the embodiment, and after the communication connection is established by using the method of the embodiment, the data of the CarLife vehicle interconnection communication protocol is adopted. The channel performs data transmission.
本实施例的通信连接建立方法,当移动终端通过USB接入车载设备后并切换为主模式时,车载设备向移动终端上报进行数据传输的第一预 设类型端口的信息和进行认证信息传输的第二预设类型端口的信息,以供移动终端加载各端口对应的驱动;车载设备加载第一预设类型端口的驱动、第二预设类型端口的驱动和认证芯片的驱动;根据认证芯片产生的认证信息,通过第二预设类型的端口与移动终端进行认证交互;以对认证信息进行认证;认证通过后,车载设备获取移动终端根据网段ID为车载设备分配的IP地址;根据IP地址、通过第一预设类型端口与移动终端建立进行数据传输的通信连接。本实施例的车载设备与移动终端之间采用USB的有线连接进行通信,可以克服现有技术中车载设备与移动终端之间采用无线方式进行通信,连接稳定性非常差的缺陷;而且,本实施例的车载设备与移动终端之间采用USB的有线连接,且采用NCM端口进行数据传输,该NCM是一种传输网络数据的网络端口,具有高速传输机制,可以支持的数据带宽足够大,数据传输的效率比较高;而且本实施例的技术方案中,车载设备与移动终端两端都会把USB端口虚拟成网卡,两侧的应用如Carlife可以通过网卡和对端进行通讯,虚拟的网卡可以进行网络编程,建立多个网络通道,因此,本实施例的技术方案能够支持多数据通道,可扩展性非常好。In the communication connection establishment method of the embodiment, when the mobile terminal accesses the in-vehicle device through the USB and switches to the main mode, the in-vehicle device reports the first pre-data transmission to the mobile terminal. The information of the type port and the information of the second preset type port for performing the authentication information transmission, so that the mobile terminal loads the driver corresponding to each port; the vehicle device loads the driver of the first preset type port, and the port of the second preset type Driving and authenticating the chip; according to the authentication information generated by the authentication chip, performing authentication interaction with the mobile terminal through the second preset type of port; authenticating the authentication information; after the authentication is passed, the in-vehicle device acquires the mobile terminal according to the network segment ID An IP address assigned to the in-vehicle device; and a communication connection for data transmission is established with the mobile terminal through the first preset type port according to the IP address. The in-vehicle device and the mobile terminal of the embodiment use the wired connection of the USB to communicate, which can overcome the defect that the in-vehicle device and the mobile terminal communicate in a wireless manner in the prior art, and the connection stability is very poor; The example of the in-vehicle device and the mobile terminal adopts a USB wired connection and uses NCM port for data transmission. The NCM is a network port for transmitting network data, has a high-speed transmission mechanism, and can support a data bandwidth large enough for data transmission. The efficiency of the embodiment is relatively high; and in the technical solution of the embodiment, the USB port is virtualized into a network card at both ends of the vehicle device and the mobile terminal, and applications on both sides, such as Carlife, can communicate with the peer through the network card, and the virtual network card can perform network. Programming, establishing a plurality of network channels, therefore, the technical solution of the embodiment can support multiple data channels, and the scalability is very good.
进一步可选地,在上述实施例的技术方案的基础上,当移动终端通过USB接入车载设备后并切换为主模式之前,本实施例的通信连接建立方法,还可以包括如下步骤:Further, optionally, on the basis of the technical solution of the foregoing embodiment, before the mobile terminal accesses the in-vehicle device through the USB and switches to the main mode, the communication connection establishing method in this embodiment may further include the following steps:
(a1)当移动终端通过USB接入车载设备,车载设备对移动终端进行端口枚举,以检测移动终端是否为支持第一预设类型端口通信的移动终端;(a1) when the mobile terminal accesses the in-vehicle device through the USB, the in-vehicle device performs port enumeration on the mobile terminal to detect whether the mobile terminal is a mobile terminal supporting the first preset type port communication;
(a2)若移动终端为支持第一预设类型端口通信的移动终端,车载 设备向移动终端发送主从切换命令,以供移动终端将从模式切换为主模式;(a2) if the mobile terminal is a mobile terminal supporting the first preset type of port communication, the vehicle The device sends a master-slave switching command to the mobile terminal, so that the mobile terminal switches from the mode to the master mode;
(a3)车载设备将主模式切换为从模式。(a3) The in-vehicle device switches the main mode to the slave mode.
在移动终端通过USB接入车载设备时,车载设备是HOST模式,移动终端为DEVICE模式,此时车载设备对移动终端的USB端口进行端口枚举,检测移动终端是否支持第一预设类型端口通信。若支持,车载设备向移动终端发送主从切换命令,以供移动终端将从模式即DEVICE模式切换为主模式即HOST模式。然后同时车载设备将主模式即HOST模式切换为从模式即DEVICE模式。由于模式发生切换,此时移动终端还要重新对车载设备的USB端口进行枚举,两者确定对方均支持第一预设类型端口通信即可。若车载设备对移动终端的USB端口进行端口枚举,检测移动终端不支持第一预设类型端口通信,则此时的移动终端无法按照本实施例的方法进行通信连接的建立。When the mobile terminal accesses the in-vehicle device through the USB device, the in-vehicle device is in the HOST mode, and the mobile terminal is in the DEVICE mode. At this time, the in-vehicle device performs port enumeration on the USB port of the mobile terminal, and detects whether the mobile terminal supports the first preset type port communication. . If supported, the in-vehicle device transmits a master-slave switching command to the mobile terminal for the mobile terminal to switch from the mode, ie, the DEVICE mode, to the master mode, that is, the HOST mode. Then, at the same time, the in-vehicle device switches the main mode, that is, the HOST mode to the slave mode, that is, the DEVICE mode. Since the mode is switched, the mobile terminal needs to re-enume the USB port of the in-vehicle device, and both of them determine that the other party supports the first preset type port communication. If the in-vehicle device performs port enumeration on the USB port of the mobile terminal, and detects that the mobile terminal does not support the first preset type of port communication, the mobile terminal at this time cannot establish the communication connection according to the method of this embodiment.
例如以移动终端的操作系统为IOS为例,此时对应的移动终端可以为iPhone,对应的第一预设类型端口为网络控制模块(Network Control Model;NCM)端口,第二预设类型端口为IAP2端口,认证芯片为MFI芯片,MFI芯片为苹果公司研发的一种“Made for iPod、Made for iPhone,以及Made for iPad”的一款连接iPod,iPhone和iPad而特别设计的一种实现认证功能的电子配件。对应地,在移动终端侧需要加载NCM端口对应的NCM驱动和IAP2端口对应的IAP2驱动。在车载设备侧除了加载NCM驱动和IAP2驱动,还需要加载MFi芯片驱动。For example, the operating system of the mobile terminal is an IOS. The corresponding mobile terminal may be an iPhone, and the corresponding first preset type port is a Network Control Model (NCM) port, and the second preset type port is IAP2 port, the authentication chip is MFI chip, MFI chip is a kind of "Made for iPod, Made for iPhone, and Made for iPad" developed by Apple. It is specially designed to connect to iPod, iPhone and iPad. Electronic accessories. Correspondingly, the NCM driver corresponding to the NCM port and the IAP2 driver corresponding to the IAP2 port need to be loaded on the mobile terminal side. In addition to loading the NCM driver and the IAP2 driver on the vehicle-mounted device side, the MFi chip driver needs to be loaded.
NCM驱动:具体地,在移动终端侧加载NCM的HOST驱动(苹果已经开发完成),车机端加载NCM从设备的驱动。驱动加载完后,车 载设备侧可以通过netcfg查看到对应的网路设备节点。NCM driver: Specifically, the HOST driver of the NCM is loaded on the mobile terminal side (Apple has been developed), and the driver side loads the driver of the NCM slave device. After the driver is loaded, the car The device side can view the corresponding network device node through netcfg.
iAP2驱动:具体地,在移动终端侧加载iAP2的HOST驱动(苹果已经开发完成),车机端加载iAP2从设备的驱动。驱动加载完后,可以在dev目录下映射出相应的设备文件(如:/dev/MFI_IAP2)。iAP2 driver: Specifically, the HOST driver of iAP2 is loaded on the mobile terminal side (Apple has already developed), and the car terminal loads the driver of the iAP2 slave device. After the driver is loaded, you can map the corresponding device file in the dev directory (for example: /dev/MFI_IAP2).
MFi芯片驱动:具体地,在车载设备侧加载MFi芯片(主要是通过集成总线(Inter-Integrated Circuit;I2C)同车机交互)的驱动,完成后在dev目录下映射相应的设备文件(如/dev/MFi)。MFi chip driver: Specifically, the MFi chip is loaded on the vehicle-mounted device side (mainly through the Inter-Integrated Circuit (I2C) to interact with the vehicle), and the corresponding device file is mapped in the dev directory after completion (eg / Dev/MFi).
进一步可选地,在上述实施例的技术方案的基础上,其中步骤102“车载设备根据认证芯片产生的认证信息,通过第二预设类型的端口与移动终端进行认证交互;以对认证信息进行认证”之前,还可以包括:车载设备启动认证芯片的认证,并获取认证芯片产生的认证信息。Further, optionally, based on the technical solution of the foregoing embodiment, in step 102, the in-vehicle device performs authentication and interaction with the mobile terminal through the second preset type of port according to the authentication information generated by the authentication chip; Before the certification, it may also include: the in-vehicle device starts the authentication of the authentication chip, and obtains the authentication information generated by the authentication chip.
例如,以移动终端为iPhone为例,根据苹果的iAP2认证协议开发其认证程序,该认证程序可以设置在MFi芯片中,该程序可以通过/dev/MFi_iAP2与iPhone交互,通过/dev/MFI与认证芯片进行数据交互,完成认证。并在认证完成后,移动终端和车载设备成功加载NCM驱动后,移动终端和车载设备之间通过NCM端口连接成功。移动终端和车载设备会映射成网络设备节点,且由移动终端根据自身的网段ID为车载设备分配IP地址并分配相应的IP地址。且通过第一预设类型端口如NCM端口向车载设备发送该IP地址。这样,车载设备可以通过NCM端口接收分配的IP地址,并与移动终端之间建立数据通路,比如各种基于用户数据报协议(User Datagram Protocol;UDP)和传输控制协议(Transmission Control Protocol;TCP)的数据通路,以实现移动终端与车载设备之间进行数据传输的通信连接。 For example, taking the mobile terminal as the iPhone as an example, the authentication program is developed according to Apple's iAP2 authentication protocol. The authentication program can be set in the MFi chip. The program can interact with the iPhone via /dev/MFi_iAP2, and pass /dev/MFI and authentication. The chip performs data interaction and completes the authentication. After the authentication is completed, after the mobile terminal and the in-vehicle device successfully load the NCM driver, the mobile terminal and the in-vehicle device are successfully connected through the NCM port. The mobile terminal and the in-vehicle device are mapped into network device nodes, and the mobile terminal allocates an IP address to the in-vehicle device according to its own network segment ID and allocates a corresponding IP address. And sending the IP address to the in-vehicle device through the first preset type port, such as the NCM port. In this way, the in-vehicle device can receive the assigned IP address through the NCM port and establish a data path with the mobile terminal, such as various User Datagram Protocol (UDP) and Transmission Control Protocol (TCP). Data path to realize the communication connection between the mobile terminal and the in-vehicle device for data transmission.
上述实施例的通信连接建立方法,车载设备与移动终端之间采用USB的有线连接进行通信,可以克服现有技术中车载设备与移动终端之间采用无线方式进行通信,连接稳定性非常差的缺陷;而且,本实施例的车载设备与移动终端之间采用USB的有线连接,且采用NCM端口进行数据传输,该NCM是一种传输网络数据的网络端口,具有高速传输机制,可以支持的数据带宽足够大,数据传输的效率比较高;而且本实施例的技术方案中,车载设备与移动终端两端都会把USB端口虚拟成网卡,两侧的应用如Carlife可以通过网卡和对端进行通讯,虚拟的网卡可以进行网络编程,建立多个网络通道,因此,本实施例的技术方案能够支持多数据通道,可扩展性非常好。In the communication connection establishment method of the above embodiment, the communication between the in-vehicle device and the mobile terminal is performed by using a USB wired connection, which can overcome the defect that the in-vehicle device and the mobile terminal communicate in a wireless manner in the prior art, and the connection stability is very poor. Moreover, the in-vehicle device and the mobile terminal of the embodiment adopt a wired connection of USB and use NCM port for data transmission, and the NCM is a network port for transmitting network data, and has a high-speed transmission mechanism and can support data bandwidth. Sufficiently large, the data transmission efficiency is relatively high; and in the technical solution of the embodiment, the USB port is virtualized into a network card at both ends of the vehicle device and the mobile terminal, and applications on both sides, such as Carlife, can communicate through the network card and the peer end, and virtual The network card can be network programmed to establish a plurality of network channels. Therefore, the technical solution of the embodiment can support multiple data channels, and the scalability is very good.
图2为本发明的通信连接建立方法实施例二的流程图。如图2所示,本实施例的通信连接建立方法,具体可以包括如下步骤:FIG. 2 is a flowchart of Embodiment 2 of a method for establishing a communication connection according to the present invention. As shown in FIG. 2, the method for establishing a communication connection in this embodiment may specifically include the following steps:
200、当移动终端通过USB接入车载设备后并切换为主模式时,移动终端接收车载设备上报的进行数据传输的第一预设类型端口的信息和进行认证信息传输的第二预设类型端口的信息;200. When the mobile terminal accesses the in-vehicle device through the USB and switches to the main mode, the mobile terminal receives the information of the first preset type port for data transmission reported by the in-vehicle device and the second preset type port for performing the authentication information transmission. Information;
201、移动终端根据第一预设类型端口的信息和第二预设类型端口的信息分别加载第一预设类型端口的驱动和第二预设类型端口的驱动;201. The mobile terminal loads, according to the information of the first preset type port and the information of the second preset type port, the driving of the first preset type port and the driving of the second preset type port respectively;
202、移动终端通过第二预设类型的端口与车载设备进行认证交互,以对认证芯片产生的认证信息进行认证;车载设备加载有第一预设类型端口的驱动、第二预设类型端口的驱动和认证芯片的驱动;202. The mobile terminal performs authentication and interaction with the in-vehicle device through the second preset type of port to authenticate the authentication information generated by the authentication chip. The in-vehicle device is loaded with the driver of the first preset type port and the port of the second preset type. Drive and certify the driver of the chip;
203、认证通过后,移动终端根据网段ID为车载设备分配IP地址;203. After the authentication is passed, the mobile terminal allocates an IP address to the in-vehicle device according to the network segment ID.
204、移动终端根据IP地址、通过第一预设类型端口与车载设备建立进行数据传输的通信连接。 204. The mobile terminal establishes a communication connection for performing data transmission with the in-vehicle device according to the IP address and through the first preset type port.
本实施例的通信连接建立方法的执行主体为移动终端。本实施例的通信连接建立方法与上述图1所示实施例的区别仅在于:上述图1所示实施例在车载设备侧描述本发明的技术方案,而本实施例在移动终端侧描述本发明的技术方案,其实现原理完全相同,详细亦可以参考上述图1所示实施例的记载,在此不再赘述。The execution body of the communication connection establishment method of this embodiment is a mobile terminal. The communication connection establishment method of the present embodiment is different from the embodiment shown in FIG. 1 only in that the embodiment shown in FIG. 1 describes the technical solution of the present invention on the vehicle-mounted device side, and the present embodiment describes the present invention on the mobile terminal side. For the technical solution, the implementation principle is the same. For details, refer to the description of the embodiment shown in FIG. 1 , and details are not described herein again.
本实施例的通信连接建立方法,当移动终端通过USB接入车载设备后并切换为主模式时,移动终端接收车载设备上报的进行数据传输的第一预设类型端口的信息和进行认证信息传输的第二预设类型端口的信息;移动终端根据第一预设类型端口的信息和第二预设类型端口的信息分别加载第一预设类型端口的驱动和第二预设类型端口的驱动;移动终端通过第二预设类型的端口与车载设备进行认证交互,以对认证芯片产生的认证信息进行认证;车载设备加载有第一预设类型端口的驱动、第二预设类型端口的驱动和认证芯片的驱动;认证通过后,移动终端根据网段ID为车载设备分配IP地址;移动终端根据IP地址、通过第一预设类型端口与车载设备建立进行数据传输的通信连接。本实施例的车载设备与移动终端之间采用USB的有线连接进行通信,可以克服现有技术中车载设备与移动终端之间采用无线方式进行通信,连接稳定性非常差的缺陷;而且,本实施例的车载设备与移动终端之间采用USB的有线连接,且采用NCM端口进行数据传输,该NCM是一种传输网络数据的网络端口,具有高速传输机制,可以支持的数据带宽足够大,数据传输的效率比较高;而且本实施例的技术方案中,车载设备与移动终端两端都会把USB端口虚拟成网卡,两侧的应用如Carlife可以通过网卡和对端进行通讯,虚拟的网卡可以进行网络编程,建立多个网络通道,因此,本实施例的 技术方案能够支持多数据通道,可扩展性非常好。进一步可选地,在上述实施例的技术方案的基础上,在步骤200“移动终端接收车载设备上报的进行数据传输的第一预设类型端口的信息和进行认证信息传输的第二预设类型端口的信息”之前,还可以包括如下步骤:In the communication connection establishment method of the embodiment, when the mobile terminal accesses the in-vehicle device through the USB and switches to the main mode, the mobile terminal receives the information of the first preset type port for transmitting the data reported by the in-vehicle device and performs the authentication information transmission. The information of the second preset type port is loaded by the mobile terminal according to the information of the first preset type port and the information of the second preset type port, respectively; The mobile terminal performs authentication interaction with the in-vehicle device through the second preset type of port to authenticate the authentication information generated by the authentication chip; the in-vehicle device is loaded with the driver of the first preset type port, and the driving of the second preset type port After the authentication is passed, the mobile terminal allocates an IP address to the in-vehicle device according to the network segment ID; the mobile terminal establishes a communication connection for data transmission with the in-vehicle device according to the IP address and through the first preset type port. The in-vehicle device and the mobile terminal of the embodiment use the wired connection of the USB to communicate, which can overcome the defect that the in-vehicle device and the mobile terminal communicate in a wireless manner in the prior art, and the connection stability is very poor; The example of the in-vehicle device and the mobile terminal adopts a USB wired connection and uses NCM port for data transmission. The NCM is a network port for transmitting network data, has a high-speed transmission mechanism, and can support a data bandwidth large enough for data transmission. The efficiency of the embodiment is relatively high; and in the technical solution of the embodiment, the USB port is virtualized into a network card at both ends of the vehicle device and the mobile terminal, and applications on both sides, such as Carlife, can communicate with the peer through the network card, and the virtual network card can perform network. Programming, establishing a plurality of network channels, and thus, the embodiment The technical solution can support multiple data channels and the scalability is very good. Further, based on the technical solution of the foregoing embodiment, in step 200, the mobile terminal receives the information of the first preset type port for performing data transmission reported by the in-vehicle device and the second preset type for performing the authentication information transmission. Before the information of the port, the following steps can also be included:
(b1)当移动终端通过USB接入车载设备,且通过车载设备的端口枚举确定当前移动终端为支持第一预设类型端口通信的移动终端时,移动终端接收车载设备发送的主从切换命令;(b1) When the mobile terminal accesses the in-vehicle device through the USB, and the port enumeration of the in-vehicle device determines that the current mobile terminal is a mobile terminal supporting the first preset type port communication, the mobile terminal receives the master-slave switching command sent by the in-vehicle device. ;
(b2)移动终端根据主从切换命令,将当前模式切换为主模式;(b2) the mobile terminal switches the current mode to the master mode according to the master-slave switching command;
(b3)移动终端对车载设备进行端口枚举。(b3) The mobile terminal performs port enumeration on the in-vehicle device.
进一步可选地,在上述实施例的技术方案的基础上,在步骤203“认证通过后,移动终端根据网段ID为车载设备分配IP地址”之前,还可以包括如下步骤:Further, optionally, on the basis of the technical solution of the foregoing embodiment, after the step 203, after the authentication is passed, the mobile terminal allocates an IP address to the in-vehicle device according to the network segment ID, the method further includes the following steps:
(c1))移动终端接收车载设备发送的IP请求;(c1)) the mobile terminal receives an IP request sent by the in-vehicle device;
(c2)移动终端根据网段ID为车载设备分配IP地址之后,方法还包括:(c2) After the mobile terminal allocates an IP address to the in-vehicle device according to the network segment ID, the method further includes:
(c3)移动终端向车载设备发送IP地址。(c3) The mobile terminal transmits an IP address to the in-vehicle device.
即本实施例中移动终端是根据车载设备的请求向移动终端分配IP地址的;且在分配完IP地址之后,将IP地址发送给车载设备。That is, in this embodiment, the mobile terminal allocates an IP address to the mobile terminal according to the request of the in-vehicle device; and after allocating the IP address, the IP address is transmitted to the in-vehicle device.
进一步可选地,本实施例的通信连接建立方法中,当移动终端为IOS操作系统的移动终端,第一预设类型端口为NCM端口,第二预设类型端口为IAP2端口,认证芯片为MFI芯片。Further, in the communication connection establishment method of the embodiment, when the mobile terminal is a mobile terminal of the IOS operating system, the first preset type port is an NCM port, the second preset type port is an IAP2 port, and the authentication chip is an MFI. chip.
上述可选技术方案,可以参考上述车载设备侧的可选技术方案,其实现原理相同,在此不再赘述。 For the above-mentioned optional technical solutions, reference may be made to the optional technical solutions on the in-vehicle device side, and the implementation principles are the same, and details are not described herein again.
上述实施例的通信连接建立方法,车载设备与移动终端之间采用USB的有线连接进行通信,可以克服现有技术中车载设备与移动终端之间采用无线方式进行通信,连接稳定性非常差的缺陷;而且,本实施例的车载设备与移动终端之间采用USB的有线连接,且采用NCM端口进行数据传输,该NCM是一种传输网络数据的网络端口,具有高速传输机制,可以支持的数据带宽足够大,数据传输的效率比较高;而且本实施例的技术方案中,车载设备与移动终端两端都会把USB端口虚拟成网卡,两侧的应用如Carlife可以通过网卡和对端进行通讯,虚拟的网卡可以进行网络编程,建立多个网络通道,因此,本实施例的技术方案能够支持多数据通道,可扩展性非常好。In the communication connection establishment method of the above embodiment, the communication between the in-vehicle device and the mobile terminal is performed by using a USB wired connection, which can overcome the defect that the in-vehicle device and the mobile terminal communicate in a wireless manner in the prior art, and the connection stability is very poor. Moreover, the in-vehicle device and the mobile terminal of the embodiment adopt a wired connection of USB and use NCM port for data transmission, and the NCM is a network port for transmitting network data, and has a high-speed transmission mechanism and can support data bandwidth. Sufficiently large, the data transmission efficiency is relatively high; and in the technical solution of the embodiment, the USB port is virtualized into a network card at both ends of the vehicle device and the mobile terminal, and applications on both sides, such as Carlife, can communicate through the network card and the peer end, and virtual The network card can be network programmed to establish a plurality of network channels. Therefore, the technical solution of the embodiment can support multiple data channels, and the scalability is very good.
图3为本发明的通信连接建立方法实施例三的信令图。如图1所述,本实施例的通信连接建立方法,具体可以包括如下步骤:FIG. 3 is a signaling diagram of Embodiment 3 of a method for establishing a communication connection according to the present invention. As shown in FIG. 1 , the method for establishing a communication connection in this embodiment may specifically include the following steps:
300、iPhone手机通过USB刚插入车载设备时,车载设备对接入的手机进行USB端口枚举,检测该手机是否为iPhone手机;300. When the iPhone is just plugged into the car device via USB, the car device performs USB port enumeration on the accessed mobile phone to detect whether the mobile phone is an iPhone mobile phone;
本实施例中,iPhone手机通过USB刚插入车载设备时,车载设备工作在USB的HOST模式,会对iPhone手机进行USB端口枚举。由于iPhone手机具有其自身的特性,例如支持NCM端口和IAP2端口。因此当车载设备发现连接的是iPhone手机时,确定该手机支持NCM端口传输。In this embodiment, when the iPhone is just plugged into the car device via USB, the car device works in the HOST mode of the USB, and the USB port is enumerated for the iPhone. Because the iPhone has its own features, such as support for NCM ports and IAP2 ports. Therefore, when the in-vehicle device finds that the iPhone is connected, it is determined that the phone supports NCM port transmission.
301、车载设备向iPhone手机发送USB主从模式切换命令;301. The in-vehicle device sends a USB master-slave mode switching command to the iPhone.
例如,车载设备通过ep0向iPhone手机发送USB主从模式切换命令。For example, the in-vehicle device sends a USB master-slave mode switching command to the iPhone via ep0.
302、车载设备从HOST模式切换至从模式; 302. The in-vehicle device switches from the HOST mode to the slave mode;
303、iPhone手机收到USB主从模式切换命令后,USB reset后切换到HOST模式;303. After receiving the USB master-slave mode switching command, the iPhone resets to the HOST mode after the USB reset;
304、iPhone手机对通过USB连接的车载设备进行重新USB端口枚举;304, iPhone mobile phone to re-USB port enumeration of the car device connected via USB;
305、车载设备作为USB从模式,向iPhone手机上报标准的NCM端口的信息及符合苹果认证协议的IAP2端口的信息;305. The in-vehicle device uses the USB slave mode to report the information of the standard NCM port to the iPhone and the information of the IAP2 port conforming to the Apple authentication protocol;
其中NCM端口用于传输数据。例如,NCM端口的信息具体可以包括如下表1所示的信息。IAP2端口用于传输认证信息。例如IAP2端口的信息具体可以包括如下表2所示的信息。The NCM port is used to transmit data. For example, the information of the NCM port may specifically include the information shown in Table 1 below. The IAP2 port is used to transmit authentication information. For example, the information of the IAP2 port may specifically include the information shown in Table 2 below.
表1Table 1
  端口类Port class 端口子类Port subclass 端口协议码Port protocol code
数据端口Data port 0×20×2 0×0d0×0d 0×000×00
通信端口Communication port 0×0a0×0a 0×000×00 0×010×01
表2Table 2
Figure PCTCN2017079945-appb-000001
Figure PCTCN2017079945-appb-000001
306、车载设备加载NCM驱动、iAP2驱动和MFi认证芯片的驱动;306. The vehicle device loads the driver of the NCM driver, the iAP2 driver, and the MFi authentication chip;
307、iPhone手机加载NCM驱动和iAP2驱动;307, iPhone loading NCM driver and iAP2 driver;
此时对应地,在车载设备侧加载的NCM驱动和iAP2驱动为从模式的驱动;在iPhone手机侧加载的NCM驱动和iAP2驱动为主模式的驱动。并且在车载设备侧预先设置有MFi认证芯片,图4为本发明实施例中iPhone手机、车载设备以及MFi认证芯片的结构示意图。MFi认证芯片预先通过I2C与车载设备的主板连接,设置在车载设备内部。其中NCM驱动、iAP2驱动和MFi芯片驱动的详细介绍,可以参考上述相关实施例的记载,在此不再赘述。加载驱动之后,相当于激活了NCM端口、IAP2端口以及MFi的认证程序。iPhone手机和车机设备成功加载NCM驱动后会映射成网络设备节点。Correspondingly, the NCM driver and the iAP2 driver loaded on the in-vehicle device side are driven in the slave mode; the NCM driver and the iAP2 driver loaded on the iPhone handset side are driven in the master mode. And an MFi authentication chip is preset in the vehicle device side. FIG. 4 is a schematic structural diagram of an iPhone mobile phone, an in-vehicle device, and an MFi authentication chip according to an embodiment of the present invention. The MFi authentication chip is connected to the motherboard of the in-vehicle device through I2C in advance, and is installed inside the in-vehicle device. For details of the NCM driver, the iAP2 driver, and the MFi chip driver, reference may be made to the description of the related embodiments, and details are not described herein again. After loading the driver, it is equivalent to activating the NCM port, IAP2 port, and MFi authentication program. After the iPhone and the car device successfully load the NCM driver, they are mapped to network device nodes.
308、车载设备和iPhone手机根据IAP2端口进行iAP2的认证;308, the in-vehicle device and the iPhone are authenticated according to the IAP2 port;
具体地,根据苹果的iAP2认证协议开发其认证程序,该程序通过iAP2的驱动加载完之后,在dev目录下映射出相应的设备文件/dev/MFi_iAP2与iPhone手机交互,通过/dev/MFI与MFi认证芯片进行数据交互,实现认证。例如先有MFi产生认证信息,通过/dev/MFI发送至iPhone手机,由iPhone手机内的某个认证模块对认证消息进行处理,如需要进一步返回车载终端侧的MFi芯片进行认证,还可以将iPhone手机产生的验证消息通过/dev/MFI返回至车载设备侧的MFi芯片,通过多次交互,实现认证。Specifically, the authentication program is developed according to Apple's iAP2 authentication protocol. After the program is loaded by the iAP2 driver, the corresponding device file /dev/MFi_iAP2 is mapped to the iPhone in the dev directory, and the /dev/MFI and MFi are passed. The authentication chip performs data interaction and implements authentication. For example, MFi first generates authentication information, and is sent to the iPhone via /dev/MFI. The authentication message is processed by an authentication module in the iPhone. If it needs to be further returned to the MFi chip on the vehicle terminal side for authentication, the iPhone can also be used. The verification message generated by the mobile phone is returned to the MFi chip on the in-vehicle device side through /dev/MFI, and the authentication is realized through multiple interactions.
309、车载设备向iPhone手机请求IP地址;309. The in-vehicle device requests an IP address from the iPhone.
310、iPhone手机根据自身网段ID为车载设备分配IP地址;310. The iPhone assigns an IP address to the in-vehicle device according to its own network segment ID;
311、iPhone手机向车载设备发送IP地址; 311. The iPhone sends an IP address to the in-vehicle device;
312、车载设备根据IP地址与iPhone手机通过NCM端口建立进行数据传输的通信连接。312. The in-vehicle device establishes a communication connection for data transmission with the iPhone through the NCM port according to the IP address.
通过上述步骤,可以在车载设备与iPhone手机之间建立通信连接,这样车载设备与iPhone手机可以通过NCM端口进行数据传输。Through the above steps, a communication connection can be established between the in-vehicle device and the iPhone, so that the in-vehicle device and the iPhone can transmit data through the NCM port.
本实施例的通信连接建立方法,通过采用上述方案,车载设备与移动终端之间采用USB的有线连接进行通信,可以克服现有技术中车载设备与移动终端之间采用无线方式进行通信,连接稳定性非常差的缺陷;而且,本实施例的车载设备与移动终端之间采用USB的有线连接,且采用NCM端口进行数据传输,该NCM是一种传输网络数据的网络端口,具有高速传输机制,可以支持的数据带宽足够大,数据传输的效率比较高;而且本实施例的技术方案中,车载设备与移动终端两端都会把USB端口虚拟成网卡,两侧的应用如Carlife可以通过网卡和对端进行通讯,虚拟的网卡可以进行网络编程,建立多个网络通道,因此,本实施例的技术方案能够支持多数据通道,可扩展性非常好。In the communication connection establishment method of the embodiment, by using the above solution, the in-vehicle device and the mobile terminal use the USB wired connection to communicate, which can overcome the wireless communication between the in-vehicle device and the mobile terminal in the prior art, and the connection is stable. The defect is very poor; moreover, the in-vehicle device and the mobile terminal of the embodiment adopt a USB wired connection, and the NCM port is used for data transmission, and the NCM is a network port for transmitting network data, and has a high-speed transmission mechanism. The data bandwidth that can be supported is large enough, and the efficiency of data transmission is relatively high. In the technical solution of the embodiment, the USB port is virtualized into a network card at both ends of the vehicle device and the mobile terminal, and applications on both sides, such as Carlife, can pass the network card and the pair. The communication is performed on the network, and the virtual network card can perform network programming and establish multiple network channels. Therefore, the technical solution of this embodiment can support multiple data channels, and the scalability is very good.
图5为本发明的车载设备实施例一的结构图。如图5所示,本实施例的车载设备,具体可以包括:发送模块10、加载模块11、认证模块12、获取模块13和建立模块14。Fig. 5 is a structural diagram showing a first embodiment of the in-vehicle device of the present invention. As shown in FIG. 5, the in-vehicle device of this embodiment may specifically include: a sending module 10, a loading module 11, an authentication module 12, an obtaining module 13, and an establishing module 14.
其中发送模块10用于当移动终端通过USB接入车载设备后并切换为主模式时,向移动终端上报进行数据传输的第一预设类型端口的信息和进行认证信息传输的第二预设类型端口的信息,以供移动终端加载各端口对应的驱动;发送模块10还用于触发加载模块11启动,加载模块11用于加载第一预设类型端口的驱动、第二预设类型端口的驱动和认证芯片的驱动;认证模块12用于根据加载模块11加载的启动,根据认证 芯片产生的认证信息,通过第二预设类型的端口与移动终端进行认证交互;以对认证信息进行认证;获取模块13用于在认证模块12认证通过后,获取移动终端根据网段ID为车载设备分配的IP地址;建立模块14用于根据获取模块13获取的IP地址、通过第一预设类型端口与移动终端建立进行数据传输的通信连接。The sending module 10 is configured to: when the mobile terminal accesses the in-vehicle device through the USB and switch to the main mode, report the information of the first preset type port for performing data transmission and the second preset type for performing the authentication information transmission to the mobile terminal. The information of the port is used by the mobile terminal to load the driver corresponding to each port; the sending module 10 is further configured to trigger the loading of the loading module 11 , and the loading module 11 is configured to load the driving of the first preset type port and the driving of the second preset type port And the driver of the authentication chip; the authentication module 12 is configured to start according to the loading of the loading module 11, according to the authentication The authentication information generated by the chip is authenticated and interacted with the mobile terminal through the second preset type of port; the authentication information is authenticated; the obtaining module 13 is configured to obtain the mobile terminal according to the network segment ID as the vehicle after the authentication module 12 passes the authentication. The IP address assigned by the device; the establishing module 14 is configured to establish, according to the IP address acquired by the obtaining module 13, a communication connection for data transmission with the mobile terminal through the first preset type port.
本实施例的车载设备,通过采用上述模块实现通信连接的建立与上述相关方法实施例的实现原理以及技术效果相同,详细可以参考上述相关方法实施例的记载,在此不再赘述。For the in-vehicle device of the present embodiment, the establishment of the communication connection by using the above-mentioned module is the same as the implementation principle and the technical effect of the related method embodiment. For details, refer to the description of the related method embodiments, and details are not described herein again.
图6为本发明的车载设备实施例二的结构图。如图6所示,本实施例的车载设备在上述图5所示实施例的技术方案的基础上,进一步包括如下技术方案。Fig. 6 is a structural diagram of a second embodiment of the in-vehicle device of the present invention. As shown in FIG. 6, the in-vehicle device of the present embodiment further includes the following technical solutions based on the technical solution of the embodiment shown in FIG.
如图6所示,本实施例的车载设备,还可以包括枚举模块15和切换模块16。As shown in FIG. 6, the in-vehicle device of this embodiment may further include an enumeration module 15 and a switching module 16.
其中枚举模块15用于当移动终端通过USB接入车载设备,对移动终端进行端口枚举,以检测移动终端是否为支持第一预设类型端口通信的移动终端;The enumeration module 15 is configured to: when the mobile terminal accesses the in-vehicle device through the USB, perform port enumeration on the mobile terminal to detect whether the mobile terminal is a mobile terminal that supports the first preset type port communication;
发送模块10还用于若枚举模块15确定移动终端为支持第一预设类型端口通信的移动终端,向移动终端发送主从切换命令,以供移动终端将从模式切换为主模式;The sending module 10 is further configured to: if the enumerating module 15 determines that the mobile terminal is a mobile terminal that supports the first preset type port communication, send a master-slave switching command to the mobile terminal, so that the mobile terminal switches from the mode to the master mode;
切换模块16用于若枚举模块15确定移动终端为支持第一预设类型端口通信的移动终端,将主模式切换为从模式。The switching module 16 is configured to switch the main mode to the slave mode if the enumeration module 15 determines that the mobile terminal is a mobile terminal supporting the first preset type port communication.
进一步可选地,如图6所示,本实施例的车载设备,还可以包括启动模块17。 Further, as shown in FIG. 6 , the in-vehicle device of the embodiment may further include a startup module 17 .
启动模块17用于启动认证芯片的认证;获取模块13还用于获取启动模块17启动的认证芯片产生的认证信息。The startup module 17 is configured to initiate authentication of the authentication chip. The acquisition module 13 is further configured to acquire authentication information generated by the authentication chip activated by the startup module 17.
进一步可选地,本实施例的车载设备中,当移动终端为IOS操作系统的移动终端,第一预设类型端口为NCM端口,第二预设类型端口为IAP2端口,认证芯片为MFI芯片。Further, in the in-vehicle device of the embodiment, when the mobile terminal is a mobile terminal of the IOS operating system, the first preset type port is an NCM port, the second preset type port is an IAP2 port, and the authentication chip is an MFI chip.
本实施例的车载设备,通过采用上述模块实现通信连接的建立与上述相关方法实施例的实现原理以及技术效果相同,详细可以参考上述相关方法实施例的记载,在此不再赘述。For the in-vehicle device of the present embodiment, the establishment of the communication connection by using the above-mentioned module is the same as the implementation principle and the technical effect of the related method embodiment. For details, refer to the description of the related method embodiments, and details are not described herein again.
图7为本发明的移动终端实施例一的结构图。如图7所示,本实施例的移动终端,具体可以包括:接收模块20、加载模块21、认证模块22、分配模块23和建立模块24。FIG. 7 is a structural diagram of Embodiment 1 of a mobile terminal according to the present invention. As shown in FIG. 7, the mobile terminal of this embodiment may specifically include: a receiving module 20, a loading module 21, an authentication module 22, an allocating module 23, and an establishing module 24.
其中接收模块20用于当移动终端通过USB接入车载设备后并切换为主模式时,接收车载设备上报的进行数据传输的第一预设类型端口的信息和进行认证信息传输的第二预设类型端口的信息;加载模块21用于根据接收模块20接收的第一预设类型端口的信息和第二预设类型端口的信息分别加载第一预设类型端口的驱动和第二预设类型端口的驱动;认证模块22用于通过加载模块21加载了驱动的第二预设类型的端口与车载设备进行认证交互,以对认证芯片产生的认证信息进行认证;车载设备加载有第一预设类型端口的驱动、第二预设类型端口的驱动和认证芯片的驱动;分配模块23用于在认证模块22认证通过后,根据网段ID为车载设备分配IP地址;建立模块24用于根据分配模块23分配的IP地址、通过第一预设类型端口与车载设备建立进行数据传输的通信连接。The receiving module 20 is configured to: when the mobile terminal accesses the in-vehicle device through the USB and switch to the main mode, receive the information of the first preset type port for performing data transmission reported by the in-vehicle device, and the second preset for performing the authentication information transmission. The loading module 21 is configured to load the driving of the first preset type port and the second preset type port according to the information of the first preset type port and the information of the second preset type port respectively received by the receiving module 20 The authentication module 22 is configured to perform authentication interaction with the in-vehicle device by using the second preset type port loaded by the loading module 21 to authenticate the authentication information generated by the authentication chip; the in-vehicle device is loaded with the first preset type. The driver of the port, the driving of the second preset type port, and the driving of the authentication chip; the distribution module 23 is configured to allocate an IP address to the in-vehicle device according to the network segment ID after the authentication module 22 passes the authentication; the establishing module 24 is configured to allocate the module according to the 23 assigned IP address, establishing a communication connection for data transmission with the in-vehicle device through the first preset type port.
本实施例的移动终端,通过采用上述模块实现通信连接的建立与上 述相关方法实施例的实现原理以及技术效果相同,详细可以参考上述相关方法实施例的记载,在此不再赘述。The mobile terminal of this embodiment realizes the establishment and the communication connection by adopting the above module. The implementation principles and technical effects of the related method embodiments are the same. For details, refer to the description of the foregoing related method embodiments, and details are not described herein again.
图8为本发明的移动终端实施例二的结构图。如图8所示,本实施例的移动终端在上述图7所示实施例的技术方案的基础上,进一步包括如下技术方案。FIG. 8 is a structural diagram of Embodiment 2 of a mobile terminal according to the present invention. As shown in FIG. 8, the mobile terminal of this embodiment further includes the following technical solutions based on the technical solution of the embodiment shown in FIG.
如图8所示,本实施例的移动终端,还可以包括枚举模块25和切换模块26。As shown in FIG. 8, the mobile terminal of this embodiment may further include an enumeration module 25 and a switching module 26.
接收模块20还用于当移动终端通过USB接入车载设备,且通过车载设备的端口枚举确定当前移动终端为支持第一预设类型端口通信的移动终端时,接收车载设备发送的主从切换命令;The receiving module 20 is further configured to: when the mobile terminal accesses the in-vehicle device through the USB, and determine, by the port enumeration of the in-vehicle device, that the current mobile terminal is a mobile terminal that supports the first preset type of port communication, receiving the master-slave switch sent by the in-vehicle device command;
切换模块26用于根据接收模块20接收的主从切换命令,将当前模式切换为主模式;The switching module 26 is configured to switch the current mode to the master mode according to the master-slave switching command received by the receiving module 20;
枚举模块25用于当切换模块26将当前模式切换之后,对车载设备进行端口枚举。The enumeration module 25 is configured to perform port enumeration on the in-vehicle device after the switching module 26 switches the current mode.
进一步可选地,如图8所示,本实施例的移动终端,还可以包括发送模块27。Further, as shown in FIG. 8 , the mobile terminal in this embodiment may further include a sending module 27 .
其中接收模块20还用于接收车载设备发送的IP请求;The receiving module 20 is further configured to receive an IP request sent by the in-vehicle device;
分配模块23用于根据接收模块20接收的IP请求,根据网段ID为车载设备分配IP地址;The allocating module 23 is configured to allocate an IP address to the in-vehicle device according to the network segment ID according to the IP request received by the receiving module 20;
发送模块27用于向车载设备发送分配模块23分配的IP地址。The sending module 27 is configured to send the IP address assigned by the allocating module 23 to the in-vehicle device.
进一步可选地,本实施例的移动终端中,当移动终端为IOS操作系统的移动终端,第一预设类型端口为NCM端口,第二预设类型端口为IAP2端口,认证芯片为MFI芯片。 Further, in the mobile terminal of the embodiment, when the mobile terminal is a mobile terminal of the IOS operating system, the first preset type port is an NCM port, the second preset type port is an IAP2 port, and the authentication chip is an MFI chip.
本实施例的移动终端,通过采用上述模块实现通信连接的建立与上述相关方法实施例的实现原理以及技术效果相同,详细可以参考上述相关方法实施例的记载,在此不再赘述。For the mobile terminal of the present embodiment, the implementation of the communication connection by using the above-mentioned modules is the same as the implementation principle and the technical effect of the foregoing related method embodiments. For details, refer to the description of the related method embodiments, and details are not described herein again.
图9为本发明的通信连接建立系统实施例的结构图。如图8所示,本实施例的通信连接建立系统包括用于建立通信连接的车载设备30和移动终端40;车载设备30采用如上图5或者图6所示的车载设备;移动终端40采用如上图7或者图8所示的移动终端。并具体可以采用如上图1-图3任一所述的通信连接建立方法实现通信连接建立系统的建立。9 is a structural diagram of an embodiment of a communication connection establishment system of the present invention. As shown in FIG. 8, the communication connection establishing system of the present embodiment includes an in-vehicle device 30 and a mobile terminal 40 for establishing a communication connection; the in-vehicle device 30 adopts the in-vehicle device shown in FIG. 5 or FIG. 6; the mobile terminal 40 adopts the above. The mobile terminal shown in FIG. 7 or FIG. Specifically, the establishment of the communication connection establishment system can be implemented by using the communication connection establishment method as described in any of the above FIG. 1 to FIG. 3.
本发明实施例提供的上述方法还可以以设置并运行于电子设备中的计算机程序体现。如图10中所示,该电子设备可以包括一个或多个处理器800,还包括存储器801和一个或多个程序,图10所示实施例一包括一个处理器800为例来描述本发明的技术方案。其中该一个或多个程序存储于存储器801中,被上述一个或多个处理器800执行以实现本发明上述实施例中所示的方法流程和/或装置操作。例如,被上述一个或多个处理器800执行的方法流程,可以包括:The above method provided by the embodiment of the present invention can also be embodied by a computer program that is set up and runs in an electronic device. As shown in FIG. 10, the electronic device may include one or more processors 800, and further includes a memory 801 and one or more programs. The embodiment shown in FIG. 10 includes a processor 800 as an example to describe the present invention. Technical solutions. The one or more programs are stored in the memory 801 and executed by the one or more processors 800 to implement the method flow and/or device operations illustrated in the above-described embodiments of the present invention. For example, the method flow executed by the one or more processors 800 may include:
当移动终端通过通用串行总线接入车载设备后并切换为主模式时,所述车载设备向所述移动终端上报进行数据传输的第一预设类型端口的信息和进行认证信息传输的第二预设类型端口的信息,以供所述移动终端加载各端口对应的驱动;When the mobile terminal accesses the in-vehicle device through the universal serial bus and switches to the main mode, the in-vehicle device reports information of the first preset type port for performing data transmission and the second for performing authentication information transmission to the mobile terminal. Presetting the information of the port for the mobile terminal to load the driver corresponding to each port;
所述车载设备加载所述第一预设类型端口的驱动、所述第二预设类型端口的驱动和认证芯片的驱动;The in-vehicle device loads the driving of the first preset type port, the driving of the second preset type port, and the driving of the authentication chip;
所述车载设备根据所述认证芯片产生的认证信息,通过所述第二预设类型的端口与所述移动终端进行认证交互;以对所述认证信息进行认 证;The in-vehicle device performs authentication interaction with the mobile terminal by using the second preset type of port according to the authentication information generated by the authentication chip, to identify the authentication information. certificate;
认证通过后,所述车载设备获取所述移动终端根据网段ID为所述车载设备分配的IP地址;After the authentication is passed, the in-vehicle device acquires an IP address allocated by the mobile terminal to the in-vehicle device according to the network segment ID;
所述车载设备根据所述IP地址、通过所述第一预设类型端口与所述移动终端建立进行数据传输的通信连接。The in-vehicle device establishes a communication connection for data transmission with the mobile terminal through the first preset type port according to the IP address.
或者,被上述一个或多个处理器800执行的方法流程,可以包括:Alternatively, the method flow executed by the one or more processors 800 may include:
当移动终端通过通用串行总线接入车载设备后并切换为主模式时,所述移动终端接收所述车载设备上报的进行数据传输的第一预设类型端口的信息和进行认证信息传输的第二预设类型端口的信息;When the mobile terminal accesses the in-vehicle device through the universal serial bus and switches to the master mode, the mobile terminal receives the information of the first preset type port for transmitting data reported by the in-vehicle device and transmits the authentication information. Two preset type port information;
所述移动终端根据所述第一预设类型端口的信息和所述第二预设类型端口的信息分别加载所述第一预设类型端口的驱动和所述第二预设类型端口的驱动;The mobile terminal loads the driving of the first preset type port and the driving of the second preset type port according to the information of the first preset type port and the information of the second preset type port, respectively;
所述移动终端通过所述第二预设类型的端口与所述车载设备进行认证交互,以对认证芯片产生的认证信息进行认证;所述车载设备加载有所述第一预设类型端口的驱动、所述第二预设类型端口的驱动和认证芯片的驱动;The mobile terminal performs authentication interaction with the in-vehicle device through the second preset type of port to authenticate the authentication information generated by the authentication chip; the in-vehicle device is loaded with the driver of the first preset type port Driving of the second preset type port and driving of the authentication chip;
认证通过后,所述移动终端根据网段ID为所述车载设备分配IP地址;After the authentication is passed, the mobile terminal allocates an IP address to the in-vehicle device according to the network segment ID;
所述移动终端根据所述IP地址、通过所述第一预设类型端口与所述车载设备建立进行数据传输的通信连接。The mobile terminal establishes a communication connection for data transmission with the in-vehicle device through the first preset type port according to the IP address.
本实施例中所述的电子设备可以为移动终端或者车载设备。The electronic device described in this embodiment may be a mobile terminal or an in-vehicle device.
在本发明所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例 仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In the several embodiments provided by the present invention, it should be understood that the disclosed system, apparatus, and method may be implemented in other manners. For example, the device embodiment described above For example, the division of the unit is only a logical function division, and the actual implementation may have another division manner.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本发明各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The above-described integrated unit implemented in the form of a software functional unit can be stored in a computer readable storage medium. The above software functional unit is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to perform the methods of the various embodiments of the present invention. Part of the steps. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes. .
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明保护的范围之内。 The above are only the preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalents, improvements, etc., which are made within the spirit and principles of the present invention, should be included in the present invention. Within the scope of protection.

Claims (21)

  1. 一种通信连接建立方法,其特征在于,所述方法包括:A communication connection establishing method, the method comprising:
    当移动终端通过通用串行总线接入车载设备后并切换为主模式时,所述车载设备向所述移动终端上报进行数据传输的第一预设类型端口的信息和进行认证信息传输的第二预设类型端口的信息,以供所述移动终端加载各端口对应的驱动;When the mobile terminal accesses the in-vehicle device through the universal serial bus and switches to the main mode, the in-vehicle device reports information of the first preset type port for performing data transmission and the second for performing authentication information transmission to the mobile terminal. Presetting the information of the port for the mobile terminal to load the driver corresponding to each port;
    所述车载设备加载所述第一预设类型端口的驱动、所述第二预设类型端口的驱动和认证芯片的驱动;The in-vehicle device loads the driving of the first preset type port, the driving of the second preset type port, and the driving of the authentication chip;
    所述车载设备根据所述认证芯片产生的认证信息,通过所述第二预设类型的端口与所述移动终端进行认证交互;以对所述认证信息进行认证;The in-vehicle device performs authentication interaction with the mobile terminal by using the second preset type of port according to the authentication information generated by the authentication chip, to authenticate the authentication information;
    认证通过后,所述车载设备获取所述移动终端根据网段ID为所述车载设备分配的IP地址;After the authentication is passed, the in-vehicle device acquires an IP address allocated by the mobile terminal to the in-vehicle device according to the network segment ID;
    所述车载设备根据所述IP地址、通过所述第一预设类型端口与所述移动终端建立进行数据传输的通信连接。The in-vehicle device establishes a communication connection for data transmission with the mobile terminal through the first preset type port according to the IP address.
  2. 根据权利要求1所述的方法,其特征在于,当移动终端通过通用串行总线接入车载设备后并切换为主模式之前,所述方法还包括:The method according to claim 1, wherein the method further comprises: after the mobile terminal accesses the in-vehicle device through the universal serial bus and switches to the main mode, the method further comprises:
    当所述移动终端通过所述通用串行总线接入所述车载设备,所述车载设备对所述移动终端进行端口枚举,以检测所述移动终端是否为支持所述第一预设类型端口通信的移动终端;When the mobile terminal accesses the in-vehicle device through the universal serial bus, the in-vehicle device performs port enumeration on the mobile terminal to detect whether the mobile terminal supports the first preset type port Mobile terminal for communication;
    若所述移动终端为支持所述第一预设类型端口通信的移动终端,所述车载设备向所述移动终端发送主从切换命令,以供所述移动终端将从模式切换为主模式; If the mobile terminal is a mobile terminal that supports the first preset type port communication, the in-vehicle device sends a master-slave switching command to the mobile terminal, so that the mobile terminal switches from a mode to a master mode;
    所述车载设备将主模式切换为从模式。The in-vehicle device switches the main mode to the slave mode.
  3. 根据权利要求1所述的方法,其特征在于,所述车载设备根据所述认证芯片产生的认证信息,通过所述第二预设类型的端口与所述移动终端进行认证交互;以对所述认证信息进行认证之前,所述方法还包括:The method according to claim 1, wherein the in-vehicle device performs authentication interaction with the mobile terminal through the second preset type of port according to the authentication information generated by the authentication chip; Before the authentication information is authenticated, the method further includes:
    所述车载设备启动所述认证芯片的认证,并获取所述认证芯片产生的所述认证信息。The in-vehicle device starts authentication of the authentication chip, and acquires the authentication information generated by the authentication chip.
  4. 根据权利要求1-3任一所述的方法,其特征在于,当所述移动终端为IOS操作系统的移动终端,所述第一预设类型端口为NCM端口,所述第二预设类型端口为IAP2端口,所述认证芯片为MFI芯片。The method according to any one of claims 1-3, wherein when the mobile terminal is a mobile terminal of an IOS operating system, the first preset type port is an NCM port, and the second preset type port is For the IAP2 port, the authentication chip is an MFI chip.
  5. 一种通信连接建立方法,其特征在于,所述方法包括:A communication connection establishing method, the method comprising:
    当移动终端通过通用串行总线接入车载设备后并切换为主模式时,所述移动终端接收所述车载设备上报的进行数据传输的第一预设类型端口的信息和进行认证信息传输的第二预设类型端口的信息;When the mobile terminal accesses the in-vehicle device through the universal serial bus and switches to the master mode, the mobile terminal receives the information of the first preset type port for transmitting data reported by the in-vehicle device and transmits the authentication information. Two preset type port information;
    所述移动终端根据所述第一预设类型端口的信息和所述第二预设类型端口的信息分别加载所述第一预设类型端口的驱动和所述第二预设类型端口的驱动;The mobile terminal loads the driving of the first preset type port and the driving of the second preset type port according to the information of the first preset type port and the information of the second preset type port, respectively;
    所述移动终端通过所述第二预设类型的端口与所述车载设备进行认证交互,以对认证芯片产生的认证信息进行认证;所述车载设备加载有所述第一预设类型端口的驱动、所述第二预设类型端口的驱动和认证芯片的驱动;The mobile terminal performs authentication interaction with the in-vehicle device through the second preset type of port to authenticate the authentication information generated by the authentication chip; the in-vehicle device is loaded with the driver of the first preset type port Driving of the second preset type port and driving of the authentication chip;
    认证通过后,所述移动终端根据网段ID为所述车载设备分配IP地址;After the authentication is passed, the mobile terminal allocates an IP address to the in-vehicle device according to the network segment ID;
    所述移动终端根据所述IP地址、通过所述第一预设类型端口与所述 车载设备建立进行数据传输的通信连接。Transmitting, by the mobile terminal, the first preset type port according to the IP address The in-vehicle device establishes a communication connection for data transmission.
  6. 根据权利要求5所述的方法,其特征在于,所述移动终端接收所述车载设备上报的进行数据传输的第一预设类型端口的信息和进行认证信息传输的第二预设类型端口的信息之前,所述方法还包括:The method according to claim 5, wherein the mobile terminal receives information of a first preset type port for data transmission reported by the in-vehicle device and information of a second preset type port for performing authentication information transmission Previously, the method further includes:
    当所述移动终端通过所述通用串行总线接入所述车载设备,且通过所述车载设备的端口枚举确定当前所述移动终端为支持所述第一预设类型端口通信的移动终端时,所述移动终端接收所述车载设备发送的主从切换命令;When the mobile terminal accesses the in-vehicle device through the universal serial bus, and determines, by the port enumeration of the in-vehicle device, that the mobile terminal is currently a mobile terminal supporting the first preset type port communication The mobile terminal receives a master-slave switching command sent by the in-vehicle device;
    所述移动终端根据所述主从切换命令,将当前模式切换为主模式;The mobile terminal switches the current mode to a master mode according to the master-slave switching command;
    所述移动终端对所述车载设备进行端口枚举。The mobile terminal performs port enumeration on the in-vehicle device.
  7. 根据权利要求5所述的方法,其特征在于,认证通过后,所述移动终端根据网段ID为所述车载设备分配IP地址之前,所述方法还包括:The method according to claim 5, wherein, after the authentication is passed, before the mobile terminal allocates an IP address to the in-vehicle device according to the network segment ID, the method further includes:
    所述移动终端接收所述车载设备发送的IP请求;Receiving, by the mobile terminal, an IP request sent by the in-vehicle device;
    所述移动终端根据网段ID为所述车载设备分配IP地址之后,所述方法还包括:After the mobile terminal allocates an IP address to the in-vehicle device according to the network segment ID, the method further includes:
    所述移动终端向所述车载设备发送所述IP地址。The mobile terminal transmits the IP address to the in-vehicle device.
  8. 根据权利要求5-7任一所述的方法,其特征在于,当所述移动终端为IOS操作系统的移动终端,所述第一预设类型端口为NCM端口,所述第二预设类型端口为IAP2端口,所述认证芯片为MFI芯片。The method according to any one of claims 5-7, wherein when the mobile terminal is a mobile terminal of an IOS operating system, the first preset type port is an NCM port, and the second preset type port is For the IAP2 port, the authentication chip is an MFI chip.
  9. 一种车载设备,其特征在于,所述车载设备包括:An in-vehicle device, characterized in that the in-vehicle device comprises:
    发送模块,用于当移动终端通过通用串行总线接入所述车载设备后并切换为主模式时,向所述移动终端上报进行数据传输的第一预设类型端口的信息和进行认证信息传输的第二预设类型端口的信息,以供所述 移动终端加载各端口对应的驱动;a sending module, configured to report, to the mobile terminal, information of a first preset type of port for performing data transmission and perform authentication information transmission when the mobile terminal accesses the in-vehicle device through a universal serial bus and switches to a master mode Information of the second preset type of port for the The mobile terminal loads the driver corresponding to each port;
    加载模块,用于加载所述第一预设类型端口的驱动、所述第二预设类型端口的驱动和认证芯片的驱动;a loading module, configured to load the driving of the first preset type port, the driving of the second preset type port, and the driving of the authentication chip;
    认证模块,用于根据所述认证芯片产生的认证信息,通过所述第二预设类型的端口与所述移动终端进行认证交互;以对所述认证信息进行认证;An authentication module, configured to perform authentication interaction with the mobile terminal by using the second preset type of port according to the authentication information generated by the authentication chip, to authenticate the authentication information;
    获取模块,用于认证通过后,获取所述移动终端根据网段ID为所述车载设备分配的IP地址;Obtaining, after the authentication is passed, obtaining an IP address allocated by the mobile terminal to the in-vehicle device according to the network segment ID;
    建立模块,用于根据所述IP地址、通过所述第一预设类型端口与所述移动终端建立进行数据传输的通信连接。And a establishing module, configured to establish, according to the IP address, a communication connection for performing data transmission with the mobile terminal by using the first preset type port.
  10. 根据权利要求9所述的车载设备,其特征在于,所述车载设备还包括枚举模块和切换模块;The in-vehicle device according to claim 9, wherein the in-vehicle device further comprises an enumeration module and a switching module;
    所述枚举模块,用于当所述移动终端通过所述通用串行总线接入所述车载设备,对所述移动终端进行端口枚举,以检测所述移动终端是否为支持所述第一预设类型端口通信的移动终端;The enumeration module is configured to: when the mobile terminal accesses the in-vehicle device through the universal serial bus, perform port enumeration on the mobile terminal to detect whether the mobile terminal supports the first a mobile terminal of a preset type port communication;
    所述发送模块,还用于若所述移动终端为支持所述第一预设类型端口通信的移动终端,向所述移动终端发送主从切换命令,以供所述移动终端将从模式切换为主模式;The sending module is further configured to: if the mobile terminal is a mobile terminal that supports the first preset type port communication, send a master-slave switching command to the mobile terminal, so that the mobile terminal switches from a mode to a mode Main mode
    所述切换模块,用于将主模式切换为从模式。The switching module is configured to switch the main mode to the slave mode.
  11. 根据权利要求9所述的车载设备,其特征在于,所述车载设备还包括启动模块;The in-vehicle device according to claim 9, wherein the in-vehicle device further comprises a startup module;
    所述启动模块,用于启动所述认证芯片的认证;The startup module is configured to initiate authentication of the authentication chip;
    所述获取模块,还用于获取所述认证芯片产生的所述认证信息。 The obtaining module is further configured to acquire the authentication information generated by the authentication chip.
  12. 根据权利要求9-11任一所述的车载设备,其特征在于,当所述移动终端为IOS操作系统的移动终端,所述第一预设类型端口为NCM端口,所述第二预设类型端口为IAP2端口,所述认证芯片为MFI芯片。The in-vehicle device according to any one of claims 9-11, wherein when the mobile terminal is a mobile terminal of an IOS operating system, the first preset type port is an NCM port, and the second preset type is The port is an IAP2 port, and the authentication chip is an MFI chip.
  13. 一种移动终端,其特征在于,所述移动终端包括:A mobile terminal, characterized in that the mobile terminal comprises:
    接收模块,用于当移动终端通过通用串行总线接入车载设备后并切换为主模式时,接收所述车载设备上报的进行数据传输的第一预设类型端口的信息和进行认证信息传输的第二预设类型端口的信息;a receiving module, configured to: when the mobile terminal accesses the in-vehicle device through the universal serial bus and switch to the main mode, receive information about the first preset type of port reported by the in-vehicle device for data transmission, and perform authentication information transmission. Information of the second preset type port;
    加载模块,用于根据所述第一预设类型端口的信息和所述第二预设类型端口的信息分别加载所述第一预设类型端口的驱动和所述第二预设类型端口的驱动;a loading module, configured to respectively load the driving of the first preset type port and the driving of the second preset type port according to the information of the first preset type port and the information of the second preset type port ;
    认证模块,用于通过所述第二预设类型的端口与所述车载设备进行认证交互,以对认证芯片产生的认证信息进行认证;所述车载设备加载有所述第一预设类型端口的驱动、所述第二预设类型端口的驱动和认证芯片的驱动;An authentication module, configured to perform authentication interaction with the in-vehicle device by using the second preset type of port, to authenticate the authentication information generated by the authentication chip, where the in-vehicle device is loaded with the first preset type port Driving, driving of the second preset type port and driving of the authentication chip;
    分配模块,用于认证通过后,根据网段ID为所述车载设备分配IP地址;An allocation module, configured to allocate an IP address to the in-vehicle device according to the network segment ID after the authentication is passed;
    建立模块,用于根据所述IP地址、通过所述第一预设类型端口与所述车载设备建立进行数据传输的通信连接。And a establishing module, configured to establish, according to the IP address, a communication connection for performing data transmission with the in-vehicle device through the first preset type port.
  14. 根据权利要求13所述的移动终端,其特征在于,所述移动终端还包括枚举模块和切换模块:The mobile terminal according to claim 13, wherein the mobile terminal further comprises an enumeration module and a switching module:
    所述接收模块,还用于当所述移动终端通过所述通用串行总线接入所述车载设备,且通过所述车载设备的端口枚举确定当前所述移动终端为支持所述第一预设类型端口通信的移动终端时,接收所述车载设备发 送的主从切换命令;The receiving module is further configured to: when the mobile terminal accesses the in-vehicle device through the universal serial bus, and determine, by using port enumeration of the in-vehicle device, that the current mobile terminal supports the first pre- When the mobile terminal of the type port communication is set, the in-vehicle device is sent The master-slave switching command sent;
    所述切换模块,用于根据所述主从切换命令,将当前模式切换为主模式;The switching module is configured to switch the current mode to a master mode according to the master-slave switching command;
    所述枚举模块,用于对所述车载设备进行端口枚举。The enumeration module is configured to perform port enumeration on the in-vehicle device.
  15. 根据权利要求13所述的移动终端,其特征在于,所述移动终端还包括发送模块;The mobile terminal according to claim 13, wherein the mobile terminal further comprises a sending module;
    所述接收模块,还用于接收所述车载设备发送的IP请求;The receiving module is further configured to receive an IP request sent by the in-vehicle device;
    所述发送模块,用于向所述车载设备发送所述IP地址。The sending module is configured to send the IP address to the in-vehicle device.
  16. 根据权利要求13-15任一所述的移动终端,其特征在于,当所述移动终端为IOS操作系统的移动终端,所述第一预设类型端口为NCM端口,所述第二预设类型端口为IAP2端口,所述认证芯片为MFI芯片。The mobile terminal according to any one of claims 13-15, wherein when the mobile terminal is a mobile terminal of an IOS operating system, the first preset type port is an NCM port, and the second preset type is The port is an IAP2 port, and the authentication chip is an MFI chip.
  17. 一种通信连接建立系统,其特征在于,所述系统包括用于建立通信连接的车载设备和移动终端;所述车载设备采用如上权利要求9-12任一所述的车载设备;所述移动终端采用如上权利要求13-16任一所述的移动终端。A communication connection establishing system, characterized in that the system comprises an in-vehicle device and a mobile terminal for establishing a communication connection; the in-vehicle device adopts the in-vehicle device according to any one of claims 9-12; the mobile terminal A mobile terminal as claimed in any of claims 13-16.
  18. 一种设备,包括a device, including
    存储器,包括一个或者多个程序;Memory, including one or more programs;
    一个或者多个处理器,耦合到所述存储器,执行所述一个或者多个程序,以实现如权利要求1至4任一权项所述方法中车载设备执行的操作。One or more processors coupled to the memory to execute the one or more programs to perform the operations performed by the onboard device in the method of any of claims 1 to 4.
  19. 一种设备,包括a device, including
    存储器,包括一个或者多个程序;Memory, including one or more programs;
    一个或者多个处理器,耦合到所述存储器,执行所述一个或者多个 程序,以实现如权利要求5至8任一权项所述方法中移动终端执行的操作。One or more processors coupled to the memory to perform the one or more A program for implementing the operations performed by the mobile terminal in the method of any of claims 5 to 8.
  20. 一种计算机存储介质,所述计算机存储介质被编码有计算机程序,所述程序在被一个或多个计算机执行时,使得所述一个或多个计算机执行如权利要求1至4任一权项所述方法中车载设备执行的操作。A computer storage medium encoded with a computer program, the program, when executed by one or more computers, causing the one or more computers to perform any of the claims 1 to 4 The operation performed by the in-vehicle device in the method.
  21. 一种计算机存储介质,所述计算机存储介质被编码有计算机程序,所述程序在被一个或多个计算机执行时,使得所述一个或多个计算机执行如权利要求5至8任一权项所述方法中移动终端执行的操作。 A computer storage medium encoded with a computer program, the program, when executed by one or more computers, causing the one or more computers to perform any of the claims 5-8 The operation performed by the mobile terminal in the method.
PCT/CN2017/079945 2016-12-30 2017-04-10 Communication connection establishing method and system, mobile terminal, vehicle-mounted equipment, corresponding equipment and computer storage medium WO2018120493A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611256186.2 2016-12-30
CN201611256186.2A CN106603860A (en) 2016-12-30 2016-12-30 Communication connection establishment method and system, mobile terminal and vehicle-mounted equipment

Publications (1)

Publication Number Publication Date
WO2018120493A1 true WO2018120493A1 (en) 2018-07-05

Family

ID=58582929

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/079945 WO2018120493A1 (en) 2016-12-30 2017-04-10 Communication connection establishing method and system, mobile terminal, vehicle-mounted equipment, corresponding equipment and computer storage medium

Country Status (2)

Country Link
CN (1) CN106603860A (en)
WO (1) WO2018120493A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113495860A (en) * 2020-03-20 2021-10-12 合肥杰发科技有限公司 Data transmission method of SOC (System on chip) equipment, SOC equipment and device with storage function
CN113973280A (en) * 2020-07-22 2022-01-25 广州汽车集团股份有限公司 Vehicle-mounted message transmission method, device and system
CN114885328A (en) * 2021-01-21 2022-08-09 华为技术有限公司 Vehicle machine connecting method and device
CN115139939A (en) * 2022-06-06 2022-10-04 智己汽车科技有限公司 Method and system for connecting and controlling vehicle-mounted peripheral equipment
CN115292231A (en) * 2022-10-09 2022-11-04 荣耀终端有限公司 Equipment port switching method and device

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107222637B (en) * 2017-06-30 2021-05-04 百度在线网络技术(北京)有限公司 Connection method and device, vehicle-mounted system, terminal and storage medium
CN108255677A (en) * 2018-01-16 2018-07-06 中电福富信息科技有限公司 The vehicle-mounted vehicle device of car networking and Android device communication means and its device
CN111586627B (en) * 2020-04-14 2022-05-20 惠州市德赛西威智能交通技术研究院有限公司 Carplay synchronous connection method and device and vehicle-mounted system
CN112261586A (en) * 2020-10-22 2021-01-22 浙江合众新能源汽车有限公司 Method for automatically identifying driver to limit driving range of driver by using vehicle-mounted robot
CN115567632B (en) * 2022-09-08 2024-02-23 闪耀现实(无锡)科技有限公司 Method and device for establishing data path, system, vehicle, equipment and medium
CN115913800A (en) * 2022-11-04 2023-04-04 合肥杰发科技有限公司 Communication connection control method, vehicle-mounted device, communication system, and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103281438A (en) * 2013-05-03 2013-09-04 广东翼卡车联网服务有限公司 Mobile phone communication module-based data transmission method and system in Internet of vehicles
CN103428283A (en) * 2013-08-06 2013-12-04 惠州华阳通用电子有限公司 Method allowing vehicular terminal to share intelligent mobile terminal network
US20150170427A1 (en) * 2013-12-16 2015-06-18 GM Global Technology Operations LLC Managing short-range wireless device connection preferences at a vehicle
CN105451154A (en) * 2014-09-16 2016-03-30 钛马信息网络技术有限公司 Vehicle-mounted information system and control method thereof
US20160309371A1 (en) * 2013-06-07 2016-10-20 Apple Inc. System and method for transitioning to a vehicle network resource

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8554924B2 (en) * 2009-03-16 2013-10-08 Apple Inc. Connection to multiple accessories with multiple accessory-specific protocols
US8561207B2 (en) * 2010-08-20 2013-10-15 Apple Inc. Authenticating a multiple interface device on an enumerated bus
CN102970367B (en) * 2012-11-26 2015-12-02 武汉理工大学 Based on the smart mobile phone onboard system of car networking
CN105120009A (en) * 2015-09-14 2015-12-02 百度在线网络技术(北京)有限公司 Terminal interconnection method and device
CN106250282A (en) * 2016-08-05 2016-12-21 惠州市德赛西威汽车电子股份有限公司 A kind of device improving CarPlay onboard system communication performance

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103281438A (en) * 2013-05-03 2013-09-04 广东翼卡车联网服务有限公司 Mobile phone communication module-based data transmission method and system in Internet of vehicles
US20160309371A1 (en) * 2013-06-07 2016-10-20 Apple Inc. System and method for transitioning to a vehicle network resource
CN103428283A (en) * 2013-08-06 2013-12-04 惠州华阳通用电子有限公司 Method allowing vehicular terminal to share intelligent mobile terminal network
US20150170427A1 (en) * 2013-12-16 2015-06-18 GM Global Technology Operations LLC Managing short-range wireless device connection preferences at a vehicle
CN105451154A (en) * 2014-09-16 2016-03-30 钛马信息网络技术有限公司 Vehicle-mounted information system and control method thereof

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113495860A (en) * 2020-03-20 2021-10-12 合肥杰发科技有限公司 Data transmission method of SOC (System on chip) equipment, SOC equipment and device with storage function
CN113495860B (en) * 2020-03-20 2024-04-19 合肥杰发科技有限公司 Data transmission method of SOC (system on chip) equipment, SOC equipment and device with storage function
CN113973280A (en) * 2020-07-22 2022-01-25 广州汽车集团股份有限公司 Vehicle-mounted message transmission method, device and system
CN113973280B (en) * 2020-07-22 2023-09-01 广州汽车集团股份有限公司 Vehicle-mounted message transmission method, device and system
CN114885328A (en) * 2021-01-21 2022-08-09 华为技术有限公司 Vehicle machine connecting method and device
CN114885328B (en) * 2021-01-21 2024-01-16 华为技术有限公司 Vehicle-computer connection method and device
CN115139939A (en) * 2022-06-06 2022-10-04 智己汽车科技有限公司 Method and system for connecting and controlling vehicle-mounted peripheral equipment
CN115139939B (en) * 2022-06-06 2024-05-14 智己汽车科技有限公司 Method and system for connecting and controlling vehicle-mounted peripheral equipment
CN115292231A (en) * 2022-10-09 2022-11-04 荣耀终端有限公司 Equipment port switching method and device

Also Published As

Publication number Publication date
CN106603860A (en) 2017-04-26

Similar Documents

Publication Publication Date Title
WO2018120493A1 (en) Communication connection establishing method and system, mobile terminal, vehicle-mounted equipment, corresponding equipment and computer storage medium
JP6611921B2 (en) Terminal interconnection method, apparatus, nonvolatile computer storage medium, and computer program
US10021180B2 (en) Universal environment extender
US11374809B2 (en) Auxiliary device to enhance native in-vehicle systems by adding interfaces and computational power
JP6022716B2 (en) Authenticate wireless dockees to wireless docking services
US10938963B2 (en) Electronic device for performing communication with external electronic device
EP3041196B1 (en) Method and apparatus for connecting a mobile communication device to a head unit of a vehicle
WO2012083080A2 (en) Wireless network interface with infrastructure and direct modes
KR20140116900A (en) Methods and apparatus for establishing a tunneled direct link setup (tdls) session between devices in a wireless network
CN107256188B (en) Android device control method and device, terminal and storage medium
CN112752245B (en) Distribution network method and device, electronic equipment and storage medium
WO2011150883A2 (en) Method and device for terminal batch upgrading
CN103401996A (en) Car networking real-time data transmission system and method
CN112055251A (en) Media data playing method, device, equipment and storage medium
US10425801B2 (en) Method and device for providing contents in communication system
WO2018120645A1 (en) Device connection method and terminal
KR20140101648A (en) Method and apparatus for connecting between client and server
WO2014075259A1 (en) Processing method and network device for international mobile equipment identity (imei) information
CN109981778B (en) Method, device, equipment and storage medium for realizing service of content distribution network
CN115883572A (en) Peripheral sharing method and device
JP6497711B2 (en) Resource broadcast method and resource broadcast apparatus
WO2017016397A1 (en) Networking method and device for unmanned aerial vehicle, and unmanned aerial vehicle control system
WO2019011328A1 (en) Wireless access method and device
CN116382744B (en) Method, device, system and storage medium for parallel refreshing of multiple ECUs
CN114143396B (en) Method and system for realizing wireless interconnection between vehicle and mobile phone based on NFC

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17888457

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 01/10/2019)

122 Ep: pct application non-entry in european phase

Ref document number: 17888457

Country of ref document: EP

Kind code of ref document: A1