Communication connection control method, vehicle-mounted equipment, communication system and storage medium
By setting the Universal Serial Bus interface in the vehicle device to the main mode and resetting the power interface, the problem of the vehicle device being unable to actively control the disconnection and connection of the CarPlay session of the wired terminal device is solved, and unified management of wired and wireless terminal devices is achieved.
Patent Information
- Application Number
- CN202211376399.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-04
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2042-11-04
AI Technical Summary
In the existing technology, the vehicle-mounted device cannot actively control the disconnection and connection of the CarPlay session between the wired terminal device and the vehicle terminal, and it needs to be achieved by unplugging the connection cable.
By executing a control sub-process in the vehicle-mounted device, the universal serial bus interface in the wired mode is set to the master mode and the power interface is reset to achieve the control of the enumeration of the terminal device and the communication connection.
The vehicle-mounted equipment can actively control the communication connection of wired terminal devices, actively disconnect or connect different terminal devices, and uniformly manage wired and wireless terminal devices.
Smart Images

Figure CN115913800B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication connection technology, and in particular to a communication connection control method, vehicle-mounted equipment, a communication system, and a storage medium. Background Art
[0002] With the continuous development of in-vehicle infotainment systems and network interconnection technologies, products that synchronize in-vehicle central control platforms with mobile phones are becoming increasingly popular. CarPlay, a software system released by Apple Inc., allows the vehicle to actively control the disconnection of the CarPlay session between devices connected wirelessly to the vehicle's computer. However, for devices connected by wire, the only way to disconnect the CarPlay session between the device and the vehicle is to unplug the cable; the vehicle cannot actively control the disconnection and reconnection of the CarPlay session. Summary of the Invention
[0003] The present application at least provides a communication connection control method, vehicle-mounted equipment, communication system and storage medium to solve the above problems.
[0004] In a first aspect, the present application provides a method for controlling a communication connection, which is applied to an in-vehicle device, wherein the physical connection between the in-vehicle device and at least one terminal device is a wired connection, and the communication connection between the in-vehicle device and any one of the at least one terminal device includes a disconnected state and a connected state, wherein the disconnected state is obtained by executing a disconnection process, and the connected state is obtained by executing a connection process;
[0005] The disconnection process and / or the connection process includes executing a control sub-process to set the universal serial bus interface in the wired mode to a master mode and performing an operation of resetting the power interface in the wired mode, thereby re-enumerating any one of the terminal devices;
[0006] The control method includes: responding to a first selection instruction on the operation interface for displaying the at least one terminal device on the vehicle-mounted device, executing the disconnection process, thereby executing the control sub-process; and / or, responding to a second selection instruction on the operation interface, executing the connection process, thereby executing the control sub-process.
[0007] Wherein, the control sub-process is implemented by a universal input and output interface;
[0008] The execution control sub-process includes: when the universal input / output interface outputs a first level, controlling the power interface in the wired mode to be powered off;
[0009] When the universal input / output interface outputs a second level, the universal serial bus interface in the wired mode is set to a master mode, and any one of the terminal devices is re-enumerated, wherein the second level is different from the first level.
[0010] The universal input / output interface outputs the first level for a preset time and then outputs the second level.
[0011] Among them, when the connection process includes setting the universal serial bus interface in the wired mode to the main mode and performing the operation of resetting the power interface in the wired mode, the disconnection process includes: controlling the communication connection between any one terminal device and the vehicle-mounted device to be in a disconnected state, and controlling the universal serial bus interface in the wired mode to maintain the device mode.
[0012] Among them, when the connection process includes setting the universal serial bus interface in the wired mode to the main mode and performing the operation of resetting the power interface in the wired mode, the connection process also includes: sending a mode switching command to any one of the terminal devices to switch to the main mode, and the universal serial bus interface in the wired mode is switched from the main mode to the device mode so that it can be enumerated by any one of the terminal devices and load the authentication function and the network card function, thereby establishing a session connection with any one of the terminal devices.
[0013] Among them, when the disconnection process includes setting the wired mode to the main mode and performing the operation of resetting the power interface in the wired mode, the disconnection process also includes: controlling the communication connection between any one of the terminal devices and the vehicle-mounted device to be in a disconnected state, and marking any one of the terminal devices.
[0014] Among them, when the disconnection process includes setting the wired mode to the main mode and performing the operation of resetting the power interface in the wired mode, the connection process includes: sending a mode switching command to any one of the terminal devices to switch to the main mode, and the universal serial bus interface in the wired mode is switched from the main mode to the device mode, so as to be enumerated by any one of the terminal devices, and load the authentication function and the network card function, thereby establishing a session connection with any one of the terminal devices.
[0015] A second aspect of the present application provides a vehicle-mounted device, comprising a memory and a processor coupled to each other, wherein the processor is configured to execute program instructions stored in the memory to implement the communication connection control method in the first aspect.
[0016] A third aspect of the present application provides a non-volatile computer-readable storage medium, which is used to store program instructions. When the program instructions are executed by a processor, they are used to implement the communication connection control method in the first aspect.
[0017] The fourth aspect of the present application provides a communication system, including a vehicle-mounted device and at least one terminal device, the physical connection between the vehicle-mounted device and the at least one terminal device is through a wired connection, and the communication connection between the vehicle-mounted device and the at least one terminal device is realized through the communication connection control method in the above-mentioned first aspect.
[0018] In the above-mentioned solution, the physical connection between the vehicle-mounted device and at least one terminal device is connected via a wired connection, and the communication connection between the vehicle-mounted device and any one of the at least one terminal devices includes a disconnected state and a connected state, wherein the disconnected state is obtained by executing a disconnection process, and the connected state is obtained by executing a connection process; wherein the disconnection process and / or the connection process includes executing a control sub-process to set the universal serial bus interface in the wired mode to the master mode, and performing an operation of resetting the power interface in the wired mode, thereby re-enumerating any terminal device. The control method in this solution includes executing a disconnection process in response to a first selection instruction on an operation interface for displaying at least one terminal device on the vehicle-mounted device, thereby executing a control sub-process, and / or, executing a connection process in response to a second selection instruction on the operation interface, thereby executing a control sub-process. The solution in this application, by executing a control sub-process, can re-enumerate any terminal device, so that the vehicle-mounted device can actively control the disconnection and connection of the communication connection with the wired terminal device, so as to switch different terminal devices, thereby realizing unified control of the terminal devices connected in wired mode and the terminal devices connected in wireless mode.
[0019] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings herein are incorporated into and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and, together with the specification, are used to illustrate the technical solutions of the present application.
[0021] Figure 1 This is a schematic diagram of the structure of an embodiment of the communication system of the present application;
[0022] Figure 2 This is a structural diagram of an embodiment of the vehicle-mounted device of the present application;
[0023] Figure 3 This is a flow chart of an embodiment of a method for controlling a communication connection of the present application;
[0024] Figure 4 This is a structural diagram of another embodiment of the vehicle-mounted device of the present application;
[0025] Figure 5 This is a structural diagram of an embodiment of the non-volatile computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0026] The present application will be further described in detail below in conjunction with the accompanying drawings and examples. It is particularly noted that the following examples are only intended to illustrate the present application and are not intended to limit the scope of the present application. Similarly, the following examples are only some examples of the present application and not all examples. All other examples obtained by those of ordinary skill in the art without creative work are intended to fall within the scope of protection of this application.
[0027] References to "embodiments" in this application mean that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0028] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the objects associated before and after are in an "or" relationship. In addition, "many" in this article means two or more than two. In addition, the term "at least one" in this article means any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C, can mean including any one or more elements selected from the set consisting of A, B, and C. In addition, the terms "first", "second", and "third" in this application are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated.
[0029] As mentioned above, for terminal devices wirelessly connected to the vehicle side, the vehicle side can actively control the disconnection of the CarPlay session between the terminal device and the vehicle side; however, for terminal devices connected to the vehicle side by wire, the CarPlay session between the terminal device and the vehicle side can only be disconnected by unplugging the connection cable, and the vehicle side cannot actively control the disconnection and connection of the CarPlay session.
[0030] Among them, the vehicle side can determine whether the terminal device is wirelessly accessed or wired based on the type of network card. For terminal devices connected to the vehicle side wirelessly, the network card used can be a WiFi network card. When the vehicle side detects that the terminal device is connected via Bluetooth and WiFi, it calls the corresponding interface to control the session connection. For example, if the terminal device is an iPhone, and the vehicle side detects that the iPhone is connected via Bluetooth and WiFi, it calls the interface of the CarPlay Software Development Kit (SDK) to control the connection or disconnection of the CarPlay session between the iPhone and the vehicle side.
[0031] A terminal device connected to the vehicle side by wire, for example, the terminal device is an iPhone, and the network card used can be a Universal Serial Bus (USB) NCM network card. The vehicle side detects that the iPhone is connected via a USB cable, and the Universal Serial Bus (USB) interface of the vehicle side is in host mode. At this time, the iPhone is in device mode. The vehicle side can enumerate the iPhone and send a mode switch (USB Roleswitch) command to the iPhone to switch the iPhone to host mode. At the same time, the vehicle side switches to device mode and loads the authentication (IAP2) function and the network card (NCM) function, so that the vehicle side can be enumerated by the iPhone, and then through the authentication function and the network card function, the iPhone and the vehicle side establish a CarPlay session connection, thereby realizing data transmission between the iPhone and the vehicle side. When the USB cable is unplugged, the CarPlay session between the iPhone and the vehicle side is disconnected, and the vehicle side switches from device mode to host mode. It can be seen that for terminal devices connected to the car computer via wires, the CarPlay session between the terminal device and the car computer can only be connected or disconnected by plugging and unplugging the connection cable.
[0032] To this end, the present application provides a communication connection control method, vehicle-mounted equipment, communication system and storage medium, so that the vehicle terminal can actively control the disconnection or connection of the communication connection with the terminal device.
[0033] The following first introduces the communication system in this application solution. Figure 1 , Figure 1This is a structural diagram of an embodiment of the communication system of the present application. The communication system includes an on-board device 200 and at least one terminal device 300. The physical connection between the on-board device 200 and the at least one terminal device 300 is connected by wired connection; the communication connection between the on-board device 200 and the at least one terminal device 300 is realized by a control method of the communication connection. The on-board device 200 is provided with an operation interface 203, which can be used to display the terminal device 300, for example, display the preset name of the terminal device 300. Among them, Figure 1 The solid connection line in the figure indicates that the physical connection between the terminal device 300 and the vehicle-mounted device 200 is a wired connection. Figure 1 The dotted line in the figure represents the communication connection between the terminal device 300 and the vehicle-mounted device 200. It is understandable that the communication system may also include a terminal device 300 connected wirelessly, which will not be described here.
[0034] Specifically, the physical connection between the vehicle-mounted device 200 and at least one terminal device 300 is connected in a wired manner, and the communication connection between the vehicle-mounted device 200 and any one of the at least one terminal devices 300 includes a disconnected state and a connected state, wherein the disconnected state is obtained by the vehicle-mounted device 200 executing the disconnection process, and the connected state is obtained by the vehicle-mounted device 200 executing the connection process.
[0035] It is understandable that the physical connection between the vehicle-mounted device 200 and at least one terminal device 300 is via a wired connection, that is, at least one terminal device 300 is connected to the vehicle-mounted device 200 via a corresponding connection line. The communication connection between the vehicle-mounted device 200 and any terminal device 300 includes a disconnected state and a connected state. When the communication connection between the vehicle-mounted device 200 and the terminal device 300 is in the disconnected state, communication data cannot be transmitted between the vehicle-mounted device 200 and the terminal device 300; when the communication connection between the vehicle-mounted device 200 and the terminal device 300 is in the connected state, communication data can be transmitted between the vehicle-mounted device 200 and the terminal device 300. Among them, the disconnected state is obtained by the vehicle-mounted device 200 executing the disconnection process, that is, the vehicle-mounted device 200 executes the disconnection process, so that the communication connection between the vehicle-mounted device 200 and the terminal device 300 becomes a disconnected state; the connected state is obtained by the vehicle-mounted device 200 executing the connection process, that is, the vehicle-mounted device 200 executes the connection process, so that the communication connection between the vehicle-mounted device 200 and the terminal device 300 becomes a connected state.
[0036] Among them, the disconnection process and / or connection process includes executing a control sub-process to set the universal serial bus interface in the wired mode to the main mode, and performing an operation of resetting the power interface in the wired mode, thereby re-enumerating any terminal device 300.
[0037] It can be understood that the disconnection process, or the connection process, or the disconnection process and the connection process include executing a control sub-process to set the USB interface in wired mode to master mode, that is, to set the wired USB interface of the vehicle-mounted device 200 to master mode. And perform an operation of resetting the power interface in wired mode, so as to re-enumerate any terminal device 300. For example, the wired power interface of the vehicle-mounted device 200 is powered off and then powered on again. The power outage of the power interface of the vehicle-mounted device 200 is detected by the terminal device 300, and the terminal device 300 will switch to device mode, so that the vehicle-mounted device 200 can re-enumerate the selected terminal device 300. When the terminal device 300 is connected to the vehicle-mounted device 200 via a wired mode, the vehicle-mounted device 200 enumerates the terminal device 300. Therefore, the vehicle-mounted device 200 subsequently executes a control sub-process and performs an operation of resetting the power interface to re-enumerate the terminal device 300.
[0038] For example, the USB interface of the vehicle-mounted device 200 includes several pins with different functions, including a power pin, such as VBUS, to power the USB interface so that other pins of the USB interface can function normally. At least one terminal device 300 is plugged into the USB interface of the vehicle-mounted device 200 via a USB cable, allowing at least one terminal device 300 to access the vehicle-mounted device 200 via a wired connection. The vehicle-mounted device 200 enumerates the terminal devices 300 and establishes a communication connection with the terminal devices 300. When the communication connection between any of the terminal devices 300 and the vehicle-mounted device 200 needs to be disconnected, a disconnection process is executed to disconnect the communication connection between the selected terminal device 300 and the vehicle-mounted device 200. When the communication connection between any of the terminal devices 300 and the vehicle-mounted device 200 needs to be selected, a connection process is executed to connect the communication connection between the selected terminal device 300 and the vehicle-mounted device 200. The disconnection process and / or the connection process include executing a control sub-process to set the USB interface of the vehicle-mounted device 200 to master mode and then powering off and then back on the USB interface of the vehicle-mounted device 200. That is, the power pin of the USB interface is powered off and then back on, for example, by controlling the VBUS to be powered off and then back on, so as to achieve powering off and then back on the USB interface of the vehicle-mounted device 200. After the selected terminal device 300 detects that the USB interface of the vehicle-mounted device 200 has been powered off, it switches to device mode; when the USB interface of the vehicle-mounted device 200 is powered back on, and the USB interface of the vehicle-mounted device 200 is now in master mode, the vehicle-mounted device 200 in master mode can re-enumerate the terminal device 300 selected in device mode.
[0039] In some embodiments, the system installed on the terminal device 300 may be an iOS system, and the terminal device 300 installed with the iOS system can support the CarPlay function. Figure 2 This is a structural diagram of an embodiment of the vehicle-mounted device of the present application. Figure 2 As shown, the in-vehicle device 200 is specifically an in-vehicle infotainment system 400 (IVI) as an example for description. The in-vehicle infotainment system 400 includes a CarPlay application module 401 , a CarPlay service module 402 and a kernel module 403 .
[0040] The CarPlay application module 401 can be used to display available CarPlay devices, thereby controlling all terminal devices 300 to be displayed in a preset list for user selection. Different subscripts can be used to distinguish between wired and wireless terminal devices 300, or other feasible methods are not limited thereto. Furthermore, multiple terminal devices 300 can be distinguished by preset names.
[0041] The CarPlay application module 401 can also be used to provide device connection and disconnection prompts, such as controlling the preset name of the terminal device 300 and the corresponding operation to be displayed in the form of a prompt box to prompt the user's current operation. The disconnection prompt box includes the preset name of the selected terminal device 300 and the information that the terminal device 300 is selected to be disconnected, to prompt the user that the terminal device 300 is selected to be disconnected. The connection prompt box includes the preset name of the selected terminal device 300 and the information that the terminal device 300 is selected to be connected, to prompt the user that the terminal device 300 is selected to be connected.
[0042] The CarPlay application module 401 can also be used to provide a CarPlay screen display to facilitate users to select corresponding CarPlay functions according to the displayed CarPlay screen.
[0043] The CarPlay service module 402 can be used to provide CarPlay-related services for the CarPlay application module 401. The CarPlay service module 402 can include a device list management module 4021, a CarPlay session management module 4022, and a CarPlay device connection monitoring module 4023. It is understood that the device list management module 4021 can be used to manage a list of at least one terminal device 300; the CarPlay session management module 4022 can be used to manage the session connection between the terminal device 300 and the in-vehicle infotainment system 400; and the CarPlay device connection monitoring module 4023 can be used to monitor the connection status of the terminal device 300.
[0044] The kernel module 403 includes a CarPlay driver 4031, a USB Controller driver 4032, an NCM driver 4033, and an IAP2 driver 4034. Among them, the CarPlay driver 4031 can be used to provide wired plug-in and unplug detection, such as plug-in and unplug detection of the USB data cable, and send event notifications to the CarPlay device connection monitoring module 4023 of the CarPlay service module 402 to monitor the connection status of the terminal device 300. The USB Controller driver 4032 can be used to provide a USB mode switching function, such as controlling the USB interface to switch from host mode to device mode, or controlling the USB interface to switch from device mode to host mode; the USB Controller driver 4032 can also be used for VBUS power supply control, such as controlling VBUS power on or controlling VBUS power off. The NCM driver 4033 and the IAP2 driver 4034 can be used to provide an interface to establish a wired CarPlay session, so that a wired CarPlay session is established between the terminal device 300 and the interface of the vehicle-mounted device 200.
[0045] See also Figure 3 , Figure 3 This is a flow chart of an embodiment of a method for controlling a communication connection of the present application. The method may be executed by the aforementioned vehicle-mounted device 200. In some possible implementations, the method for controlling a communication connection may be implemented by a processor of the vehicle-mounted device 200 by calling program instructions stored in a memory. Specifically, the method for controlling a communication connection includes the following steps:
[0046] S1. In response to a first selection instruction on an operation interface for displaying at least one terminal device on a vehicle-mounted device, a disconnection process is executed to implement an execution control sub-process.
[0047] In response to a first selection instruction on the operation interface of the vehicle-mounted device for displaying at least one terminal device, it is understood that at least one terminal device 300 is displayed on the operation interface 203 of the vehicle-mounted device 200 in a preset manner. The at least one terminal device 300 can be selected by clicking a preset area on the operation interface 203 of the vehicle-mounted device 200, or by selecting a preset area on the operation interface 203 using a physical button on the vehicle-mounted device 200, or by other possible operation methods, thereby triggering the first selection instruction. In response to the first selection instruction, a disconnection process is executed, thereby implementing the execution control sub-process to set the USB interface in the wired mode to the master mode and perform an operation to reset the power interface in the wired mode, so that the vehicle-mounted device 200 can re-enumerate the selected terminal device 300.
[0048] S2. In response to the second selection instruction on the operation interface, the connection process is executed, thereby executing the control sub-process.
[0049] In response to the second selection instruction on the operation interface, it is understood that at least one terminal device 300 is displayed on the operation interface 203 of the vehicle-mounted device 200 in a preset manner. The at least one terminal device 300 can be selected by clicking a preset area on the operation interface 203 of the vehicle-mounted device 200, or by selecting a preset area on the operation interface 203 using a physical button on the vehicle-mounted device 200, or by other possible operation methods, thereby triggering the second selection instruction. In response to the second selection instruction, the connection process is executed, thereby implementing the execution control sub-process to set the USB interface in the wired mode to the master mode and perform the operation of resetting the power interface in the wired mode, so that the vehicle-mounted device 200 can re-enumerate the selected terminal device 300.
[0050] In addition, in response to an instruction that any terminal device 300 connected wirelessly is selected to be disconnected, the corresponding interface is called to control the communication connection between the selected terminal device 300 and the vehicle-mounted device 200 to be disconnected; in response to an instruction that any terminal device 300 connected wirelessly is selected to be connected, the corresponding interface is called to control the communication connection between the selected terminal device 300 and the vehicle-mounted device 200 to be connected.
[0051] It can be understood that there is no specific limitation on the operation order of the above-mentioned steps S1 and S2. For example, step S1 may be performed before step S2. In this case, the terminal devices 300 selected in steps S1 and S2 may be the same or different. As long as the terminal device 300 is in a connected state, it can be selected to be disconnected, and as long as the terminal device 300 is in a disconnected state, it can be selected to be connected; step S2 may be performed before step S1. In this case, the terminal devices 300 selected in steps S1 and S2 may be the same or different. As long as the terminal device 300 is in a disconnected state, it can be selected to be connected, and as long as the terminal device 300 is in a connected state, it can be selected to be disconnected; steps S1 and S2 may also be performed simultaneously. In this case, the terminal devices 300 selected in steps S1 and S2 are not the same. The terminal device 300 in a connected state is disconnected by step S1, and the terminal device 300 in a disconnected state is connected by step S2.
[0052] In the above-mentioned solution, the physical connection between the vehicle-mounted device and at least one terminal device is connected via a wired connection, and the communication connection between the vehicle-mounted device and any one of the at least one terminal devices includes a disconnected state and a connected state, wherein the disconnected state is obtained by executing a disconnection process, and the connected state is obtained by executing a connection process; wherein the disconnection process and / or the connection process includes executing a control sub-process to set the universal serial bus interface in the wired mode to the master mode, and performing an operation to reset the power interface in the wired mode, thereby re-enumerating any terminal device. The control method in this solution includes, in response to a first selection instruction on an operation interface for displaying at least one terminal device on the vehicle-mounted device, executing a disconnection process, thereby executing a control sub-process, and / or, in response to a second selection instruction on the operation interface, executing a connection process, thereby executing a control sub-process. The solution in this application, by executing a control sub-process, can re-enumerate any terminal device, so that the vehicle-mounted device can actively control the disconnection and connection of the communication connection with the wired terminal device, so as to switch different terminal devices, thereby realizing unified control of the wired terminal device and the wireless terminal device.
[0053] As described above, the disconnection process and / or the connection process includes executing a control sub-process to set the USB interface in wired mode to master mode and resetting the power interface in wired mode, thereby re-enumerating the selected terminal device 300. In one embodiment of the present application, the control sub-process is implemented by a universal input / output interface; executing the control sub-process includes: when the universal input / output interface outputs a first electrical level, controlling the power interface in wired mode to be powered off; when the universal input / output interface outputs a second electrical level, setting the USB interface in wired mode to master mode and re-enumerating any terminal device 300, wherein the second electrical level is different from the first electrical level.
[0054] The control sub-process is implemented by a general-purpose input / output (GPIO) interface. When the GPIO interface outputs a first level, the power interface in the wired mode is powered off. When the GPIO interface outputs a second level, the USB interface in the wired mode is set to master mode and the selected terminal device 300 is re-enumerated. The second level is different from the first level. The first level and the second level can be set to high or low, respectively. For example, the first level is high and the second level is low; or the first level is low and the second level is high. The setting can be based on actual usage requirements and is not specifically limited.
[0055] As will be appreciated, the power pin of the USB interface of the vehicle-mounted device 200 is VBUS, and power is supplied to the USB interface via VBUS as an example. When the GPIO interface outputs a first level, VBUS is controlled to be powered off to power off the USB interface of the vehicle-mounted device 200. The selected terminal device 300 can detect that the USB interface of the vehicle-mounted device 200 is powered off, and the selected terminal device 300 switches to device mode. When the GPIO interface outputs a second level, VBUS is controlled to be powered on to power on the USB interface of the vehicle-mounted device 200, and the USB interface of the vehicle-mounted device 200 is set to master mode, so that the vehicle-mounted device 200 in master mode can re-enumerate the selected terminal device 300 in device mode.
[0056] As described above, when the GPIO interface outputs a first level, the power interface in the wired mode is powered off. When the GPIO interface outputs a second level, the USB interface in the wired mode is set to master mode, and the first and second levels are different. In one embodiment of the present application, the GPIO interface outputs the second level after outputting the first level for a predetermined period of time.
[0057] The GPIO interface outputs the second level after outputting the first level for a preset time. The preset time can be set to 500 milliseconds, or can be set to other values according to actual usage requirements, without specific limitation.
[0058] The following example illustrates a situation where the first level is low, the second level is high, and the preset time is 500 milliseconds. The GPIO interface outputs a low level, deenergizing VBUS to thereby deenergize the USB interface of the vehicle-mounted device 200. The selected terminal device 300 detects the deenergized USB interface of the vehicle-mounted device 200 and switches to device mode. After the GPIO interface continuously outputs a low level for 500 milliseconds, it outputs a high level, energizing VBUS to reenergize the USB interface of the vehicle-mounted device 200. The USB interface of the vehicle-mounted device 200 is then set to master mode, thereby re-enumerating the selected terminal device 300 in device mode.
[0059] As described above, the disconnection process and / or the connection process includes executing a control sub-process to set the USB interface in wired mode to master mode and perform an operation to reset the power interface in wired mode, thereby re-enumerating any terminal device 300. In one embodiment of the present application, when the connection process includes setting the USB interface in wired mode to master mode and performing an operation to reset the power interface in wired mode, the disconnection process includes: controlling the communication connection between any terminal device 300 and the in-vehicle device 200 to be in a disconnected state, and controlling the USB interface in wired mode to maintain device mode.
[0060] The disconnection process includes controlling the communication connection between any one of the terminal devices 300 and the vehicle-mounted device 200 to be disconnected, and controlling the USB interface in the wired mode to maintain device mode. It will be understood that in response to any one of the at least one terminal device 300 being selected for disconnection, the disconnection process is executed, and the disconnection process includes controlling the communication connection between the selected terminal device 300 and the vehicle-mounted device 200 to be disconnected, and controlling the USB interface of the wired connection of the vehicle-mounted device 200 to maintain device mode.
[0061] For example, when the communication connection between the vehicle-mounted device 200 and the terminal device 300 is in a connected state, the USB interface of the vehicle-mounted device 200 is in device mode. When the connection process includes setting the USB interface of the vehicle-mounted device 200 to master mode and resetting the power supply of the USB interface of the vehicle-mounted device 200, the disconnection process includes controlling the communication connection between the selected terminal device 300 and the vehicle-mounted device 200 to be disconnected and controlling the USB interface of the vehicle-mounted device 200 to remain in device mode. Furthermore, when the selected terminal device 300 is selected for connection again, the USB interface of the vehicle-mounted device 200 is switched from device mode to master mode, and the power supply of the USB interface of the vehicle-mounted device 200 is reset, thereby re-enumerating the selected terminal device 300.
[0062] As described above, the disconnection process includes controlling the communication connection between any terminal device 300 and the vehicle-mounted device 200 to be in a disconnected state, and controlling the USB interface in the wired mode to maintain device mode. In one embodiment of the present application, when the connection process includes setting the USB interface in the wired mode to master mode and performing an operation of resetting the power interface in the wired mode, the connection process also includes: sending a mode switching command to any terminal device 300, so that any terminal device 300 switches to master mode, and the USB interface in the wired mode switches from master mode to device mode, so that it can be enumerated by any terminal device 300, and the authentication function and network card function are loaded, thereby establishing a session connection with any terminal device 300.
[0063] As will be appreciated, in response to any one of the at least one terminal devices 300 being selected for connection, a connection process is executed. The connection process includes controlling the USB interface of the vehicle-mounted device 200 to be powered off. The selected terminal device 300 detects the powered-off USB interface of the vehicle-mounted device 200 and switches the selected terminal device 300 to device mode. After the USB interface of the vehicle-mounted device 200 is powered off for a preset time, the USB interface of the vehicle-mounted device 200 is controlled to be powered back on, and the USB interface of the vehicle-mounted device 200 is set to master mode, thereby re-enumerating the selected terminal device 300 in device mode. After the selected terminal device 300 is re-enumerated by the vehicle-mounted device 200, the vehicle-mounted device 200 sends a mode switch command to the selected terminal device 300, causing the selected terminal device 300 to switch from device mode to master mode. At this time, the USB interface of the vehicle-mounted device 200 is switched from master mode to device mode, allowing the vehicle-mounted device 200 to be enumerated by the selected terminal device 300 in master mode. The vehicle-mounted device 200 is controlled to load the authentication function and the network card function, and then the selected terminal device 300 is connected to the vehicle-mounted device 200 through the authentication function and the network card function, thereby realizing data transmission between the terminal device 300 and the vehicle-mounted device 200.
[0064] As described above, the disconnection process and / or the connection process includes executing a control sub-process to set the USB interface in wired mode to master mode and perform an operation to reset the power interface in wired mode, thereby re-enumerating any terminal device 300. In one embodiment of the present application, when the disconnection process includes setting the USB interface in wired mode to master mode and performing an operation to reset the power interface in wired mode, the disconnection process also includes: controlling the communication connection between any terminal device 300 and the in-vehicle device 200 to be in a disconnected state, and marking any terminal device 300.
[0065] It will be appreciated that in response to any one of the at least one terminal device 300 being selected for disconnection, a disconnection process is executed. The disconnection process includes setting the USB interface of the vehicle-mounted device 200 to master mode, powering off and then powering back on the USB interface of the vehicle-mounted device 200, controlling the communication connection between the selected terminal device 300 and the vehicle-mounted device 200 to be in a disconnected state, and marking the selected terminal device 300. For example, a set of logic can be set to mark the selected terminal device 300, indicating that the communication connection between the selected terminal device 300 and the vehicle-mounted device 200 is in a disconnected state. The marking of the terminal device 300 can also be performed by other achievable methods, which are not specifically limited.
[0066] For example, when the communication connection between the in-vehicle device 200 and the terminal device 300 is in a connected state, the USB interface of the in-vehicle device 200 is in device mode. In response to any one of the at least one terminal device 300 being selected for disconnection, a disconnection process is executed. The disconnection process includes controlling the USB interface of the in-vehicle device 200 to be powered off. The selected terminal device 300 will detect the powered-off USB interface of the in-vehicle device 200 and switch the selected terminal device 300 to device mode. After the USB interface of the in-vehicle device 200 is powered off for a preset time, the USB interface of the in-vehicle device 200 is controlled to be powered back on, and the USB interface of the in-vehicle device 200 is set to master mode, thereby re-enumerating the selected terminal device 300 in device mode. After the selected terminal device 300 is re-enumerated by the vehicle-mounted device 200, the communication connection between the selected terminal device 300 and the vehicle-mounted device 200 is controlled to be in a disconnected state. At this time, the selected terminal device 300 is in device mode, and the selected terminal device 300 is marked to indicate that the communication connection between the selected terminal device 300 and the vehicle-mounted device 200 is in a disconnected state.
[0067] As described above, the disconnection process includes setting the USB interface in wired mode to master mode, resetting the power interface in wired mode, controlling the communication connection between the selected terminal device 300 and the vehicle-mounted device 200 to be in a disconnected state, and marking the selected terminal device 300. In one embodiment of the present application, when the disconnection process includes setting the USB interface in wired mode to master mode and resetting the power interface in wired mode, the connection process includes: sending a mode switching command to any terminal device 300, so that any terminal device 300 switches to master mode, the USB interface in wired mode switches from master mode to device mode, so that it can be enumerated by any terminal device 300, and the authentication function and network card function are loaded, thereby establishing a session connection with any terminal device 300.
[0068] It is understood that the disconnection process includes controlling the USB interface of the vehicle-mounted device 200 to be powered off. The selected terminal device 300 will detect the powered-off USB interface of the vehicle-mounted device 200, and the selected terminal device 300 will switch to device mode. After the USB interface of the vehicle-mounted device 200 is powered off for a preset time, the USB interface of the vehicle-mounted device 200 is controlled to be powered on again, and the USB interface of the vehicle-mounted device 200 is set to master mode, thereby re-enumerating the selected terminal device 300 in device mode. After the selected terminal device 300 is re-enumerated by the vehicle-mounted device 200, the communication connection between the selected terminal device 300 and the vehicle-mounted device 200 is controlled to be disconnected. At this time, the selected terminal device 300 is in device mode, and the selected terminal device 300 is marked. In response to any one of the at least one terminal device 300 being selected for connection, a connection process is executed. The connection process includes the vehicle-mounted device 200 sending a mode switching command to the selected and marked terminal device 300, so that the selected terminal device 300 switches from device mode to master mode. At this time, the USB interface of the vehicle-mounted device 200 is switched from master mode to device mode, so that the vehicle-mounted device 200 can be enumerated by the selected terminal device 300 in master mode. The vehicle-mounted device 200 is controlled to load an authentication function and a network card function, and then, through the authentication function and the network card function, a communication connection is established between the selected terminal device 300 and the vehicle-mounted device 200, thereby realizing data transmission between the terminal device 300 and the vehicle-mounted device 200.
[0069] Those skilled in the art will understand that in the above-mentioned method of the specific implementation method, the writing order of each step does not mean a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0070] See also Figure 4 , Figure 4 2 is a schematic diagram of another embodiment of an in-vehicle device according to the present application. In-vehicle device 200 includes a memory 201 and a processor 202 coupled to each other. Processor 202 is configured to execute program instructions stored in memory 201 to implement the steps of the aforementioned embodiment of the communication connection control method. In a specific implementation scenario, in-vehicle device 200 may include, but is not limited to, a microcomputer and a server. Furthermore, in-vehicle device 200 may also include mobile devices such as laptops and tablet computers, without limitation herein.
[0071] Specifically, the processor 202 is used to control itself and the memory 201 to implement the steps of the control method embodiment of the above-mentioned communication connection. The processor 202 can also be called a CPU (Central Processing Unit), and the processor 202 may be an integrated circuit chip with signal processing capabilities. The processor 202 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 202 can be implemented by an integrated circuit chip.
[0072] See also Figure 5 , Figure 5 The computer-readable storage medium 500 is used to store program instructions 501, which, when executed by the processor 202, implement the steps of the above-mentioned communication connection control method embodiment.
[0073] The above description of the various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced with each other and will not be repeated herein for the sake of brevity.
[0074] In the several embodiments provided in this application, it should be understood that the disclosed methods and related devices can be implemented in other ways. For example, the above-described related device implementation methods are merely illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, such as units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication disconnection shown or discussed can be through some interfaces, indirect coupling or communication disconnection of devices or units, which can be electrical, mechanical or other forms.
[0075] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0076] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
Claims
1. A method for controlling a communication connection, characterized in that: Applied to an in-vehicle device, the physical connection between the in-vehicle device and at least one terminal device is a wired connection, and the communication connection between the in-vehicle device and any one of the at least one terminal device includes a disconnected state and a connected state, wherein the disconnected state is obtained by executing a disconnection process, and the connected state is obtained by executing a connection process; The disconnection process and / or the connection process includes executing a control sub-process to set the universal serial bus interface in the wired mode to a master mode and performing an operation of resetting the power interface in the wired mode, thereby re-enumerating any one of the terminal devices; The control method includes: In response to a first selection instruction on the operation interface of the vehicle-mounted device for displaying the at least one terminal device, executing the disconnection process, thereby implementing the control sub-process; and / or In response to a second selection instruction on the operation interface, executing the connection process, thereby executing the control sub-process; Wherein, when the communication connection between the vehicle-mounted device and the terminal device is in the disconnected state, the vehicle-mounted device and the terminal device cannot transmit communication data.
2. The control method according to claim 1, characterized in that: The control sub-process is implemented by a universal input and output interface; The execution control sub-process includes: When the universal input / output interface outputs a first level, controlling the power interface in the wired mode to be powered off; When the universal input / output interface outputs a second level, the universal serial bus interface in the wired mode is set to a master mode, and the arbitrary terminal device is re-enumerated, wherein the second level is different from the first level.
3. The control method according to claim 2, characterized in that: The universal input / output interface outputs the first level for a preset time and then outputs the second level.
4. The control method according to claim 1, wherein: When the connection process includes setting the universal serial bus interface in the wired mode to the main mode and performing the operation of resetting the power interface in the wired mode, the disconnection process includes: controlling the communication connection between any one terminal device and the vehicle-mounted device to be in a disconnected state, and controlling the universal serial bus interface in the wired mode to maintain the device mode.
5. The control method according to claim 1, characterized in that: When the connection process includes setting the universal serial bus interface in the wired mode to a master mode and performing an operation of resetting the power interface in the wired mode, the connection process further includes: A mode switching command is sent to any one of the terminal devices to switch the terminal device to the main mode, and the universal serial bus interface in the wired mode is switched from the main mode to the device mode so that it can be enumerated by the any one of the terminal devices, and the authentication function and the network card function are loaded, thereby establishing a session connection with the any one of the terminal devices.
6. The control method according to claim 1, characterized in that: When the disconnection process includes setting the wired mode to the main mode and performing the operation of resetting the power interface in the wired mode, the disconnection process also includes: controlling the communication connection between any one of the terminal devices and the vehicle-mounted device to be in a disconnected state, and marking any one of the terminal devices.
7. The control method according to claim 1, characterized in that: When the disconnection process includes setting the wired mode to the main mode and performing an operation of resetting the power interface in the wired mode, the connection process includes: A mode switching command is sent to any one of the terminal devices to switch the terminal device to the main mode, and the universal serial bus interface in the wired mode is switched from the main mode to the device mode so that it can be enumerated by the any one of the terminal devices, and the authentication function and the network card function are loaded, thereby establishing a session connection with the any one of the terminal devices.
8. A vehicle-mounted device, characterized in that: The invention comprises a memory and a processor coupled to each other, wherein the processor is used to execute program instructions stored in the memory to implement the communication connection control method according to any one of claims 1 to 7.
9. A non-volatile computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store program instructions, and when the program instructions are executed by a processor, the program instructions are used to implement the communication connection control method according to any one of claims 1 to 7.
10. A communication system, characterized in that: It includes a vehicle-mounted device and at least one terminal device, the physical connection between the vehicle-mounted device and the at least one terminal device is through a wired connection, and the communication connection between the vehicle-mounted device and the at least one terminal device is realized by the control method of the communication connection as described in any one of claims 1 to 7.
Citation Information
Patent Citations
System and method for providing contents
CN110851697A