In-vehicle apparatus, communication method, and communication program
The in-vehicle device automates communication relay between USB devices and other network devices by using a detection unit, acquisition unit, and relay units, ensuring seamless communication without user intervention.
Patent Information
- Application Number
- JP2024009872
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-01-26
- Publication Date
- 2025-08-07
AI Technical Summary
Existing technologies lack a simple configuration for relaying communication between an external device connected to an in-vehicle network via a USB interface and other devices within the network.
An in-vehicle device equipped with a connection port, detection unit, acquisition unit, relay units, and memory unit that stores correspondence information, allowing automatic activation of relay units based on USB information to facilitate communication between USB devices and other network devices without user intervention.
Enables seamless communication relay between USB devices and other in-vehicle network devices with a simple configuration, eliminating the need for user operation.
Smart Images

Figure 2025115424000001_ABST
Abstract
Description
[Technical Field]
[0001] The present disclosure relates to an in-vehicle device, a communication method, and a communication program. [Background technology]
[0002] With the spread of car sharing and the demand for improved processing capabilities of in-vehicle devices installed in vehicles, there has been a demand for customizing in-vehicle networks by connecting external devices to the in-vehicle devices.
[0003] For example, Patent Document 1 (WO 2020 / 179123) discloses the following management device: That is, the management device includes a detection unit that detects the addition of a functional unit to a network that includes one or more in-vehicle functional units, an acquisition unit that acquires functional unit information including information on the new functional unit that is the functional unit whose addition is detected by the detection unit and on the network configuration of the in-vehicle functional unit at a layer lower than the application layer, and a generation unit that generates configuration information of the new network that is the network that further includes the new functional unit, based on the functional unit information acquired by the acquisition unit. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] International Publication No. 2020 / 179123 Summary of the Invention [Problem to be solved by the invention]
[0005] There is a demand for a technology that goes beyond the technology described in Patent Document 1 and that is capable of relaying communication between an external device connected to an in-vehicle network via a USB (Universal Serial Bus) interface and other devices in the in-vehicle network with a simple configuration.
[0006] The present disclosure has been made to solve the above-mentioned problems, and its purpose is to provide an in-vehicle device, a communication method, and a communication program that are capable of relaying communication between an external device connected to an in-vehicle network via a USB interface and other devices in the in-vehicle network with a simple configuration. [Means for solving the problem]
[0007] The in-vehicle device of the present disclosure is an in-vehicle device in an in-vehicle network, and includes: a connection port to which a USB device can be connected via a USB interface; a detection unit that detects connection of the USB device to the connection port; an acquisition unit that acquires USB information related to the USB device whose connection is detected by the detection unit; a plurality of relay units that perform relay processing to relay communications between the USB device and other devices in the in-vehicle network; a startup unit that starts one of the plurality of relay units that performs the relay processing between the USB device whose connection is detected by the detection unit and the other devices; and a memory unit that stores correspondence information indicating a correspondence between each of the plurality of relay units and the USB information, wherein the relay unit terminates at least one of communication with the USB device and communication with the other devices during the relay processing, and the startup unit determines which of the relay units to start based on the correspondence information and the USB information acquired by the acquisition unit.
[0008] One aspect of the present disclosure can be realized not only as an in-vehicle device equipped with such a characteristic processing unit, but also as a semiconductor integrated circuit that realizes part or all of the in-vehicle device, or as a system that includes the in-vehicle device. [Effects of the Invention]
[0009] According to the present disclosure, it is possible to relay communication between an external device connected to an in-vehicle network via a USB interface and other devices in the in-vehicle network with a simple configuration. [Brief explanation of the drawings]
[0010] [Figure 1] FIG. 1 is a diagram illustrating an example of a configuration of an in-vehicle system according to an embodiment of the present disclosure. [Figure 2] FIG. 2 is a diagram illustrating a configuration of an in-vehicle ECU according to an embodiment of the present disclosure. [Figure 3] FIG. 3 is a diagram showing a list of USB device classes of USB devices according to an embodiment of the present disclosure. [Figure 4] FIG. 4 is a diagram illustrating an example of a correspondence table stored in a storage unit in an in-vehicle ECU according to an embodiment of the present disclosure. [Figure 5] FIG. 5 is a flowchart illustrating an example of an operation procedure when the vehicle-mounted ECU according to the embodiment of the present disclosure starts relay processing. [Figure 6] FIG. 6 is a flowchart defining an example of an operation procedure when the in-vehicle ECU according to the embodiment of the present disclosure starts up the termination unit. [Figure 7] FIG. 7 is a diagram illustrating an example of a communication sequence in the in-vehicle system according to the embodiment of the present disclosure. DETAILED DESCRIPTION OF THE INVENTION
[0011] First, the contents of the embodiments of the present disclosure will be listed and described. (1) An in-vehicle device according to an embodiment of the present disclosure is an in-vehicle device in an in-vehicle network, comprising: a connection port to which a USB device can be connected via a USB interface; a detection unit that detects connection of the USB device to the connection port; an acquisition unit that acquires USB information related to the USB device whose connection is detected by the detection unit; a plurality of relay units that perform relay processing to relay communications between the USB device and other devices in the in-vehicle network; a startup unit that starts one of the plurality of relay units that performs the relay processing between the USB device whose connection is detected by the detection unit and the other devices; and a storage unit that stores correspondence information indicating a correspondence between each of the plurality of relay units and the USB information, wherein the relay unit terminates at least one of communication with the USB device and communication with the other devices during the relay processing, and the startup unit determines which of the relay units to start based on the correspondence information and the USB information acquired by the acquisition unit.
[0012] With this configuration, the relay unit can be activated based on the correspondence information stored in advance in the storage unit to perform relay processing between the USB device and other devices, so when a USB device is connected to the connection port, communication between the USB device and other devices can be started without any user operation. Therefore, communication between an external device connected to the in-vehicle network via the USB interface and other devices in the in-vehicle network can be relayed with a simple configuration.
[0013] (2) In the above (1), the in-vehicle device may be provided with a plurality of the connection ports, and the acquisition unit may acquire the USB information for identifying the connection port to which the USB device is connected among the plurality of connection ports.
[0014] With this configuration, when a plurality of USB devices of the same model number are connected to a plurality of connection ports, the relay unit can be activated in association with the USB device according to the connection port.
[0015] (3) In the above (1) or (2), the acquisition unit may acquire multiple types of USB information for one of the USB devices, and if there is no relay unit that corresponds to all types of USB information in the correspondence information, the launch unit may determine the relay unit to launch based on some types of USB information.
[0016] This configuration allows for increased flexibility in the type of USB device and the connection port when connecting a USB device to a connection port, while activating a relay unit that can perform relay processing between a USB device connected to a connection port and other devices.
[0017] (4) In (3) above, the storage unit may store, as the correspondence information, a correspondence table including a composite primary key consisting of multiple items corresponding to the multiple types of USB information, and in which the values of some of the items in the composite primary key are arbitrary.
[0018] With this configuration, when there is no relay unit that can handle all types of USB information, a relay unit that can perform relay processing between a USB device connected to a connection port and other devices can be easily selected and started using the correspondence table.
[0019] (5) In any of (1) to (4) above, the vehicle-mounted device may be provided with a plurality of relay units of the same type, and the memory unit may store the correspondence information further indicating a correspondence between each of the plurality of relay units of the same type and additional information that can identify the relay unit.
[0020] With this configuration, when a relay unit of the same type is activated, the additional information can be used to allow other devices that communicate with a certain USB device to easily recognize the relay unit of the same type that performs relay processing between the USB device and the relay unit.
[0021] (6) A communication method according to an embodiment of the present disclosure is a communication method in an in-vehicle device in an in-vehicle network, the in-vehicle device including a connection port to which a USB device can be connected via a USB interface and a plurality of relay units that perform relay processing to relay communications between the USB device and other devices in the in-vehicle network, the relay units performing at least one of terminating communications with the USB device and terminating communications with the other devices in the relay processing, the communication method including the steps of detecting connection of the USB device to the connection port, acquiring USB information related to the USB device whose connection has been detected, and activating one of the relay units that performs the relay processing between the USB device whose connection has been detected and the other devices, the in-vehicle device further including a memory unit that stores correspondence information indicating a correspondence between each of the plurality of relay units and the USB information, and in the step of activating the relay units, determining which of the relay units to activate based on the correspondence information and the acquired USB information.
[0022] This method activates the relay unit based on the correspondence information stored in advance in the storage unit and performs relay processing between the USB device and other devices, so that when a USB device is connected to the connection port, communication between the USB device and other devices can be initiated without requiring user operation. Therefore, communication between an external device connected to the in-vehicle network via the USB interface and other devices in the in-vehicle network can be relayed with a simple configuration.
[0023] (7) A communication program according to an embodiment of the present disclosure is a communication program used in an in-vehicle device in an in-vehicle network, the in-vehicle device having a connection port to which a USB device can be connected via a USB interface, the program causing a computer to function as a detection unit that detects connection of the USB device to the connection port, an acquisition unit that acquires USB information related to the USB device whose connection is detected by the detection unit, a plurality of relay units that perform relay processing to relay communication between the USB device and other devices in the in-vehicle network, and a startup unit that starts up one of the relay units that performs the relay processing between the USB device whose connection is detected by the detection unit and the other devices, the in-vehicle device further having a storage unit that stores correspondence information indicating a correspondence between each of the plurality of relay units and the USB information, the relay unit terminates at least one of communication with the USB device and communication with the other devices in the relay processing, and the startup unit determines which of the relay units to start based on the correspondence information and the USB information acquired by the acquisition unit.
[0024] With this configuration, the relay unit can be activated based on the correspondence information stored in advance in the storage unit to perform relay processing between the USB device and other devices, so when a USB device is connected to the connection port, communication between the USB device and other devices can be started without any user operation. Therefore, communication between an external device connected to the in-vehicle network via the USB interface and other devices in the in-vehicle network can be relayed with a simple configuration.
[0025] Hereinafter, embodiments of the present disclosure will be described with reference to the drawings. In the drawings, identical or corresponding parts are designated by the same reference numerals, and their description will not be repeated. Furthermore, at least some of the embodiments described below may be combined in any manner.
[0026] [Configuration and basic operation] Fig. 1 is a diagram illustrating an example of the configuration of an in-vehicle system according to an embodiment of the present disclosure. Referring to Fig. 1, the in-vehicle system 301 includes an in-vehicle ECU (Electronic Control Unit) 101 and in-vehicle ECUs 111A and 111B. The in-vehicle system 301 is mounted on a vehicle 1. The in-vehicle ECUs 101 and 111 configure an in-vehicle network 201. The in-vehicle system 301 may include one or three or more in-vehicle ECUs 111.
[0027] The in-vehicle ECU 111 is, for example, a relay device, a TCU (Telematics Communication Unit), an automatic driving ECU, an engine ECU, a sensor, a navigation device, a human-machine interface, a camera, and the like.
[0028] The in-vehicle ECU 101 includes communication ports P1A and P1B and USB (registered trademark) ports P2A, P2B, and P2C. Hereinafter, each of the communication ports P1A and P1B will also be referred to as a communication port P1, and each of the USB ports P2A, P2B, and P2C will also be referred to as a USB port P2. The USB port P2 is an example of a connection port. The port numbers of the USB ports P2A, P2B, and P2C are assumed to be "N001," "N002," and "N003," respectively. The in-vehicle ECU 101 may be configured to include one or three or more communication ports P1. The in-vehicle ECU 101 may also be configured to include two or four or more USB ports P2.
[0029] The communication port P1 is a connector that can be connected to, for example, an Ethernet (registered trademark) cable 2. The USB port P2 can be connected to a USB device 121 via a USB interface. In other words, the USB port P2 is a connector that can be connected to a USB connector.
[0030] The in-vehicle ECUs 111A and 111B are connected to communication ports P1A and P1B of the in-vehicle ECU 101, respectively, via an Ethernet cable 2. Note that the in-vehicle ECU 111 is not limited to being connected to the in-vehicle ECU 101 via the Ethernet cable 2, and may be connected via a communication line conforming to other standards such as CAN (Controller Area Network) (registered trademark) and FlexRay (registered trademark).
[0031] [assignment] There is a demand for a technology that can relay communication between a USB device 121 connected to an in-vehicle network 201 via a USB interface and other devices in the in-vehicle network 201 with a simple configuration.
[0032] For example, when a USB device is connected to a USB port of a personal computer, the personal computer starts an application selected by the user, and the application communicates directly with the USB device to exchange communication data.
[0033] On the other hand, in the in-vehicle system 301, when the USB device 121 is connected to the USB port P2 of the in-vehicle ECU 101, it is conceivable that the USB device 121 and the in-vehicle ECU 111 exchange communication data Dt via the in-vehicle ECU 101. However, while the USB device 121 communicates in accordance with the USB standard, the in-vehicle ECU 111 communicates in accordance with a standard different from USB. Therefore, in the in-vehicle system 301, a relay application that performs relay processing between the USB device 121 and the in-vehicle ECU 111 is installed in the in-vehicle ECU 101.
[0034] For example, the in-vehicle ECU 101 is equipped with a plurality of relay applications corresponding to the respective types of USB devices 121 that can be connected to the in-vehicle ECU 101. For example, when the USB device 121 is retrofitted to the USB port P2 of the in-vehicle ECU 101 after the vehicle 1 is shipped, a technique is desired that can automatically select and start an application corresponding to the USB device 121 from the plurality of relay applications and start communication between the USB device 121 and the in-vehicle ECU 111 without requiring user operation.
[0035] Therefore, the in-vehicle system 301 according to the embodiment of the present disclosure solves the above problem by adopting the following configuration.
[0036] (In-vehicle ECU) FIG. 2 is a diagram illustrating a configuration of an in-vehicle ECU according to an embodiment of the present disclosure. Referring to FIG. 2, the in-vehicle ECU 101 includes a USB communication unit 11, an ECU communication unit 12, a proxy unit 13, a startup unit 15, and a storage unit 16. The proxy unit 13 includes a plurality of termination units 14. The USB communication unit 11 is an example of a detection unit and an acquisition unit. The termination unit 14 is an example of a relay unit. Some or all of the USB communication unit 11, the ECU communication unit 12, the proxy unit 13, and the startup unit 15 are realized by, for example, a processing circuit including one or more processors. The storage unit 16 is, for example, a non-volatile memory included in the processing circuit.
[0037] 2, USB devices 121A and 121B, which are part of the USB device 121, are connected to USB ports P2A and P2B, respectively. For example, the USB devices 121A and 121B are video cameras. The USB device 121 and the in-vehicle ECU 111 transmit communication data Dt via the in-vehicle ECU 101.
[0038] 3 is a diagram showing a list of USB device classes for USB devices according to an embodiment of the present disclosure, illustrating the correspondence between the class names of the USB device classes and the USB devices 121 that correspond to the USB device classes.
[0039] Referring to FIG. 3, USB devices 121 are classified into one or more USB device classes with similar functions according to the standard established by the USB-IF (Implementers Forum). USB devices 121A and 121B, which are video cameras, are classified into a USB device class with the class name "Video." Another USB device 121, which is a microphone, is classified into a USB device class with the class name "Audio." Furthermore, a USB device 121, which is a keyboard, is classified into a USB device class with the class name "HID (Human Interface Device)." USB devices 121 belonging to the same USB device class communicate with other devices according to a common interface specification, i.e., by using a common interface.
[0040] The USB device 121 stores USB information related to the USB device 121. For example, the USB device 121 stores, as USB information, a class number that indicates the USB device class to which the USB device 121 belongs, an idVender that indicates the manufacturer of the USB device 121, and an idProduct that is a number assigned by the manufacturer to each product of the USB device 121.
[0041] Referring back to FIG. 2, the termination unit 14 in the proxy unit 13 performs a relay process for relaying communication between the USB device 121 and the in-vehicle ECU 111 .
[0042] As an example, the types of the multiple termination units 14 in the proxy unit 13 differ for each USB device class. That is, the proxy unit 13 includes the same number of types of termination units 14 as the number of USB device classes of the USB devices 121 that can be connected to the USB port P2. A termination unit 14 of a type corresponding to a certain USB device class can communicate with a USB device 121 that belongs to that USB device class.
[0043] For example, the proxy unit 13 includes multiple termination units 14 of the same type. More specifically, the termination units 14 have the same application ID for each type. The proxy unit 13 includes multiple termination units 14 with the same application ID.
[0044] (Connection detection) The USB communication unit 11 detects the connection of the USB device 121 to the USB port P2. More specifically, when the USB device 121 is connected to the USB port P2, it transmits a connection notification to the in-vehicle ECU 101. When the USB communication unit 11 receives the connection notification from the USB device 121 via the USB port P2, it recognizes that the USB device 121 is connected to the USB port P2.
[0045] The USB communication unit 11 acquires USB information about the USB device 121 whose connection to the USB port P2 has been detected. For example, the USB communication unit 11 acquires, as the USB information, a port number for identifying the USB port P2 to which the USB device 121 is connected among the multiple USB ports P2. Also, for example, the USB communication unit 11 acquires multiple types of USB information about one USB device 121.
[0046] More specifically, when the USB communication unit 11 recognizes that the USB device 121 is connected to the USB port P2, it transmits a device information request to the USB device 121 via the USB port P2.
[0047] When the USB device 121 receives a device information request from the vehicle-mounted ECU 101, the USB device 121 transmits a device information response including the class number, idVender, and idProduct of the USB device 121 to the vehicle-mounted ECU 101 as a response to the device information request.
[0048] When the USB communication unit 11 receives a device information response from the USB device 121 via the USB port P2, it acquires the port number of the USB port P2. The USB communication unit 11 also acquires the class number, idVender, and idProduct from the received device information response. The USB communication unit 11 creates connection information Con indicating the acquired port number, class number, idVender, and idProduct, and outputs the created connection information Con to the startup unit 15.
[0049] (Starting the termination based on the correspondence table) The activation unit 15 activates one of the plurality of termination units 14 that performs relay processing between the USB device 121 whose connection is detected by the USB communication unit 11 and the in-vehicle ECU 111 .
[0050] 4 is a diagram illustrating an example of a correspondence table stored in a storage unit in an on-vehicle ECU according to an embodiment of the present disclosure. Referring to FIG. 4, storage unit 16 stores correspondence table T1 indicating the correspondence between each of a plurality of termination units 14 and USB information. Correspondence table T1 is an example of correspondence information.
[0051] For example, the correspondence table T1 includes a composite primary key made up of multiple items corresponding to the above-mentioned multiple types of USB information. More specifically, the correspondence table T1 is a table showing the correspondence between the composite primary key made up of the items of class number, port number, idVender, and idProduct and the application ID.
[0052] In correspondence table T1, values of some items in the composite primary key are arbitrary. More specifically, correspondence table T1 includes a plurality of records R1 in which the values of all items in the composite primary key are set to predetermined values, a plurality of records R2 in which the idVender and idProduct fields are set to arbitrary values, i.e., NULL, a plurality of records R3 in which the port number field is set to an arbitrary value, i.e., NULL, and a plurality of records R4 in which the port number, idVender, and idProduct fields are set to arbitrary values, i.e., NULL.
[0053] For example, the correspondence table T1 further indicates the correspondence between each of a plurality of termination units 14 of the same type and a service ID and an option ID, which are additional information that can identify the termination unit 14. More specifically, the correspondence table T1 is a table that further indicates the correspondence between an application ID and a service ID and an option ID. Specifically, the correspondence table T1 includes a record R1 in which the application ID is "AP001" and the service ID and option ID are "X001" and "Y001", respectively, and a record R1 in which the application ID is "AP001" and the service ID and option ID are "X002" and "Y002", respectively.
[0054] The activation unit 15 determines the termination unit 14 to be activated based on the correspondence table T1 in the storage unit 16 and the USB information acquired by the USB communication unit 11. More specifically, the activation unit 15 receives the connection information Con from the USB communication unit 11 and refers to the correspondence table T1 in the storage unit 16.
[0055] The launching unit 15 searches the multiple records R1 in the correspondence table T1 for a record R1 that includes a composite primary key that matches the port number, class number, idVender, and idProduct indicated by the connection information Con received from the USB communication unit 11. If the search target record R1 exists, the launching unit 15 acquires the application ID included in the record R1. The launching unit 15 launches the termination unit 14 that has the acquired application ID. Specifically, for example, if the port number, class number, idVender, and idProduct indicated by the connection information Con are "C002," "N002," "V002," and "P002," respectively, the launching unit 15 launches the termination unit 14 that has the application ID "AP004."
[0056] For example, if there is no termination unit 14 that corresponds to all types of USB information in the correspondence table T1, the activation unit 15 determines the termination unit 14 to be activated based on some types of USB information.
[0057] More specifically, if the search target record R1 does not exist, the launching unit 15 searches among the multiple records R2 in the correspondence table T1 for a record R2 that includes a composite primary key that matches the port number and class number indicated by the connection information Con received from the USB communication unit 11. If the search target record R2 exists, the launching unit 15 acquires the application ID included in the record R2. The launching unit 15 launches the termination unit 14 that has the acquired application ID. Specifically, for example, if the port number, class number, idVender, and idProduct indicated by the connection information Con are "C001," "N001," "V051," and "P051," respectively, the launching unit 15 launches the termination unit 14 that has the application ID "AP011."
[0058] Furthermore, if the search target records R1 and R2 are not present, the launching unit 15 searches among the multiple records R3 in the correspondence table T1 for a record R3 that includes a composite primary key that matches the class number, idVender, and idProduct indicated in the connection information Con received from the USB communication unit 11. If the search target record R3 is present, the launching unit 15 acquires the application ID included in the record R3. The launching unit 15 launches the termination unit 14 that has the acquired application ID. Specifically, for example, if the port number, class number, idVender, and idProduct indicated by the connection information Con are "C001," "N051," "V011," and "P011," respectively, the launching unit 15 launches the termination unit 14 that has the application ID "AP021."
[0059] Furthermore, if the search target records R1, R2, and R3 do not exist, the launching unit 15 searches for record R4 including a composite primary key that matches the class number indicated by the connection information Con received from the USB communication unit 11 from among the multiple records R4 in the correspondence table T1. If the search target record R4 exists, the launching unit 15 acquires the application ID included in the record R4. The launching unit 15 launches the termination unit 14 having the acquired application ID. Specifically, if the port number, class number, idVender, and idProduct indicated by the connection information Con are "C001," "N051," "V051," and "P051," respectively, the launching unit 15 launches the termination unit 14 having the application ID "AP031."
[0060] When starting up the termination unit 14, the starting unit 15 obtains, from the correspondence table T1, a service ID and an option ID corresponding to the application ID of the termination unit 14. Furthermore, when starting up the termination unit 14, the starting unit 15 outputs the connection information Con received from the USB communication unit 11 to the started up termination unit 14.
[0061] The termination unit 14 receives the connection information Con from the activation unit 15 and holds the received connection information Con.
[0062] (Example of starting the terminal) For example, the class number of the USB devices 121A and 121B is "C001," the idVender of the USB devices 121A and 121B is "V001," and the idProduct of the USB devices 121A and 121B is "P001." Also, as described above, the port numbers of the USB ports P2A and P2B are "N001" and "N002," respectively.
[0063] In this case, the startup unit 15 receives connection information Con from the USB communication unit 11 in response to the connection of the USB device 121A to the USB port P2A, and starts up the terminal unit 14A, which is the terminal unit 14 having the application ID "AP001", based on the received connection information Con and the correspondence table T1.
[0064] In addition, when USB device 121B is connected to USB port P2B, startup unit 15 receives connection information Con from USB communication unit 11, and starts up termination unit 14B, which is termination unit 14 having the application ID "AP001", based on the received connection information Con and correspondence table T1.
[0065] When the activation unit 15 activates the termination unit 14, the activation unit 15 provides the in-vehicle ECU 111 with a service using the USB device 121 by using an OfferService message conforming to SOME / IP (Scalable service-oriented middleware over IP).
[0066] More specifically, when activating the termination unit 14A, the activation unit 15 acquires, from the correspondence table T1, a service ID "X001" corresponding to the application ID of the termination unit 14A and an option ID "Y001" corresponding to the application ID of the termination unit 14A. The activation unit 15 generates an OfferService message M1A including the acquired service ID and option ID, and transmits the generated OfferService message M1A to the in-vehicle ECU 111 via the ECU communication unit 12 and the communication port P1.
[0067] The in-vehicle ECU 111 receives the OfferService message M1A from the in-vehicle ECU 101 and acquires a service ID from the received OfferService message M1A. For example, in order to receive the service indicated by the acquired service ID, the in-vehicle ECU 111A transmits a FindService message M2A including the service ID and the ID of the in-vehicle ECU 111A to the in-vehicle ECU 101.
[0068] When the start-up unit 15 receives the FindService message M2A from the in-vehicle ECU 111A via the communication port P1A and the ECU communication unit 12, it outputs a relay start instruction including the ID of the in-vehicle ECU 111A to the termination unit 14A.
[0069] Furthermore, when activating the terminal unit 14B, the activation unit 15 acquires, from the correspondence table T1, a service ID "X002" corresponding to the application ID of the terminal unit 14B and an option ID "Y002" corresponding to the application ID of the terminal unit 14A. The activation unit 15 generates an OfferService message M1B including the acquired service ID and option ID, and transmits the generated OfferService message M1B to the in-vehicle ECU 111 via the ECU communication unit 12 and the communication port P1.
[0070] The in-vehicle ECU 111 receives the OfferService message M1B from the in-vehicle ECU 101 and acquires a service ID from the received OfferService message M1B. For example, in order to receive the service indicated by the acquired service ID, the in-vehicle ECU 111B transmits a FindService message M2B including the service ID and the ID of the in-vehicle ECU 111B to the in-vehicle ECU 101.
[0071] When the start-up unit 15 receives the FindService message M2B from the in-vehicle ECU 111B via the communication port P1B and the ECU communication unit 12, it outputs a relay start instruction including the ID of the in-vehicle ECU 111B to the termination unit 14B.
[0072] (Relay processing) The termination unit 14 performs a relay process for relaying communication between the USB device 121 whose connection is detected by the USB communication unit 11 and the in-vehicle ECU 111 in the in-vehicle network 201 .
[0073] More specifically, upon receiving a relay start instruction from the activation unit 15, the termination unit 14A starts a relay process for relaying communication between the USB device 121A connected to the USB port P2A and the in-vehicle ECU 111A.
[0074] Furthermore, upon receiving a relay start instruction from the activation unit 15, the termination unit 14B starts a relay process for relaying communication between the USB device 121B connected to the USB port P2B and the in-vehicle ECU 111B.
[0075] In the relay process, the termination unit 14 terminates communication with the USB device 121 and communication with the in-vehicle ECU 111. That is, the termination unit 14 performs termination processing of the USB communication protocol and termination processing of the communication protocol in the in-vehicle network.
[0076] (1) Transmission of communication data Dt from the USB device 121 to the in-vehicle ECU 111 The USB device 121 generates communication data Dt1, which is the communication data Dt addressed to the in-vehicle ECU 111. The USB device 121 generates a frame F1 that includes the communication data Dt1 and is addressed to the in-vehicle ECU 111, and conforms to the USB standard, and transmits the generated frame F1 to the in-vehicle ECU 101.
[0077] When the USB communication unit 11 in the in-vehicle ECU 101 receives the frame F1 from the USB device 121 via the corresponding USB port P2, the USB communication unit 11 outputs the received frame F1 to the proxy unit 13.
[0078] In the proxy unit 13, the termination unit 14 corresponding to the USB device 121 that is the sender of the frame F1 receives the frame F1 from the USB communication unit 11 and performs termination processing of the USB communication protocol. More specifically, as the termination processing, the termination unit 14 acquires communication data Dt1 from the frame F1 and transmits a response frame to the USB device 121 via the USB communication unit 11 and USB port P2.
[0079] The termination unit 14 then generates a frame F2 conforming to the Ethernet standard, including the acquired communication data Dt1, and transmits the generated frame F2 to the destination in-vehicle ECU 111 via the ECU communication unit 12 and the corresponding communication port P1.
[0080] For example, when the in-vehicle ECU 111 that has received the frame F2 transmits a response frame, the termination unit 14 further receives the response frame via the ECU communication unit 12 and the communication port P1 as a termination process.
[0081] (2) Transmission of communication data Dt from the in-vehicle ECU 111 to the USB device 121 The in-vehicle ECU 111 generates communication data Dt2, which is communication data Dt addressed to the USB device 121. The in-vehicle ECU 111 generates a frame F2 that includes the communication data Dt2 and is addressed to the USB device 121 and conforms to Ethernet, and transmits the generated frame F2 to the in-vehicle ECU 101.
[0082] When the ECU communication unit 12 in the in-vehicle ECU 101 receives the frame F2 from the in-vehicle ECU 111 via the corresponding communication port P1, the ECU communication unit 12 outputs the received frame F2 to the proxy unit 13.
[0083] In the proxy unit 13, the termination unit 14 corresponding to the USB device 121 that is the destination of the frame F2 receives the frame F2 from the ECU communication unit 12 and performs termination processing of the communication protocol in the in-vehicle network. More specifically, as the termination processing, the termination unit 14 acquires the communication data Dt2 from the frame F2 and transmits a response frame to the in-vehicle ECU 111 via the ECU communication unit 12 and the communication port P1.
[0084] The termination unit 14 then generates a frame F1 conforming to the USB standard and including the communication data Dt2, and transmits the generated frame F1 to the destination USB device 121 via the USB communication unit 11 and the corresponding USB port P2.
[0085] For example, when the USB device 121 that has received the frame F1 transmits a response frame, the termination unit 14 further receives the response frame via the USB communication unit 11 and the USB port P2 as a termination process.
[0086] [Operation flow] FIG. 5 is a flowchart illustrating an example of an operation procedure when the vehicle-mounted ECU according to the embodiment of the present disclosure starts relay processing.
[0087] Referring to FIG. 5, first, the in-vehicle ECU 101 waits for a connection notification (NO in step S11), and upon receiving the connection notification from the USB device 121 via the USB port P2 (YES in step S11), the in-vehicle ECU 101 recognizes that the USB device 121 has been connected to the USB port P2, and transmits a device information request to the USB device 121 via the USB port P2 (step S12).
[0088] Next, the in-vehicle ECU 101 waits for the arrival of a device information response (NO in step S13), and when it receives a device information response from the USB device 121 via the USB port P2 (YES in step S13), it creates connection information Con indicating the port number, class number, idVender, and idProduct (step S14).
[0089] Next, the in-vehicle ECU 101 starts up the termination unit 14 corresponding to the USB information indicated by the connection information Con, based on the correspondence table T1 in the storage unit 16 (step S15).
[0090] Next, the in-vehicle ECU 101 starts a relay process for relaying communication between the USB device 121 connected to the USB port P2 and the in-vehicle ECU 111 (step S16).
[0091] Next, the in-vehicle ECU 101 waits for a connection notification from the new USB device 121 (NO in step S11).
[0092] 6 is a flowchart illustrating an example of an operation procedure when an in-vehicle ECU according to an embodiment of the present disclosure starts up a termination unit, and shows details of step S15 in FIG.
[0093] Referring to FIG. 6, first, the in-vehicle ECU 101 searches the records R1 in the correspondence table T1 for a record R1 that includes a composite primary key that matches the port number, class number, idVender, and idProduct indicated by the connection information Con (step S21).
[0094] Next, if the search target record R1 exists (YES in step S22), the in-vehicle ECU 101 acquires the application ID included in the record R1, and starts the terminal unit 14 having the acquired application ID (step S23).
[0095] On the other hand, if the record R1 to be searched for does not exist (NO in step S22), the in-vehicle ECU 101 searches for a record R2 containing a composite primary key that matches the port number and class number indicated by the connection information Con from among the multiple records R2 in the correspondence table T1 (step S24).
[0096] Next, if the search target record R2 exists (YES in step S25), the in-vehicle ECU 101 acquires the application ID included in the record R2, and starts the terminal unit 14 having the acquired application ID (step S23).
[0097] On the other hand, if the record R2 to be searched for does not exist (NO in step S25), the in-vehicle ECU 101 searches among the multiple records R3 in the correspondence table T1 for a record R3 that contains a composite primary key that matches the class number, idVender, and idProduct indicated by the connection information Con (step S26).
[0098] Next, if the search target record R3 exists (YES in step S27), the in-vehicle ECU 101 acquires the application ID included in the record R3, and starts the terminal unit 14 having the acquired application ID (step S23).
[0099] On the other hand, if the record R3 to be searched for does not exist (NO in step S27), the in-vehicle ECU 101 searches for a record R4 containing a composite primary key that matches the class number indicated by the connection information Con from among the multiple records R4 in the correspondence table T1 (step S28).
[0100] Next, if the search target record R4 exists (YES in step S29), the in-vehicle ECU 101 acquires the application ID included in the record R4, and starts the terminal unit 14 having the acquired application ID (step S23).
[0101] On the other hand, if the record R4 to be searched does not exist (NO in step S29), the in-vehicle ECU 101 ends the process without activating the termination unit 14.
[0102] FIG. 7 is a diagram illustrating an example of a communication sequence in the in-vehicle system according to the embodiment of the present disclosure.
[0103] Referring to FIG. 7, first, when the USB device 121A is connected to the USB port P2A in the in-vehicle ECU 101, the USB device 121A transmits a connection notification to the in-vehicle ECU 101 (step S31).
[0104] Next, when the in-vehicle ECU 101 receives a connection notification from the USB device 121A via the USB port P2A, it recognizes that the USB device 121A has been connected to the USB port P2A, and transmits a device information request to the USB device 121A via the USB port P2A (step S32).
[0105] Next, the USB device 121A transmits a device information response including the class number, idVender, and idProduct of the USB device 121A to the in-vehicle ECU 101 as a response to the device information request (step S33).
[0106] Next, the in-vehicle ECU 101 starts the termination unit 14A that corresponds to the class number, idVender and idProduct of the USB device 121A and the port number of the USB port P2A based on the correspondence table T1 in the storage unit 16 (step S34).
[0107] Next, the in-vehicle ECU 101 transmits to the in-vehicle ECU 111 an OfferService message M1A including a service ID "X001" corresponding to the application ID of the terminal unit 14A and an option ID "Y001" corresponding to the application ID of the terminal unit 14A (step S35).
[0108] Next, for example, the in-vehicle ECU 111A, one of the in-vehicle ECUs 111A and 111B that receives the OfferService message M1A, sends a FindService message M2A to the in-vehicle ECU 101, which includes the service ID "X001" corresponding to the application ID of the terminal unit 14A and the ID of the in-vehicle ECU 111A (step S36).
[0109] Next, the in-vehicle ECU 101 receives the FindService message M2A from the in-vehicle ECU 111A and starts a relay process for relaying communication between the USB device 121A and the in-vehicle ECU 111A (step S37).
[0110] Next, the USB device 121A receives, for example, a predetermined notification accompanying the reception of the FindService message M2A from the in-vehicle ECU 101, and transmits a frame F1 addressed to the in-vehicle ECU 111A to the in-vehicle ECU 101 (step S38).
[0111] Next, the in-vehicle ECU 101 receives the frame F1 from the USB device 121A and performs a termination process of the USB communication protocol. More specifically, as the termination process, the in-vehicle ECU 101 acquires the communication data Dt1 from the frame F1 and transmits a response frame to the USB device 121A (step S39).
[0112] Next, the in-vehicle ECU 101 transmits a frame F2 including the acquired communication data Dt1 to the in-vehicle ECU 111A (step S40).
[0113] Next, for example, the in-vehicle ECU 111A transmits a frame F2 addressed to the USB device 121A to the in-vehicle ECU 101 (step S41).
[0114] Next, the in-vehicle ECU 101 receives the frame F2 from the in-vehicle ECU 111A and performs a termination process of the communication protocol in the in-vehicle network. More specifically, as the termination process, the in-vehicle ECU 101 acquires the communication data Dt2 from the frame F2 and transmits a response frame to the in-vehicle ECU 111A (step S42).
[0115] Next, the in-vehicle ECU 101 transmits the frame F1 including the acquired communication data Dt2 to the in-vehicle ECU 111A (step S43).
[0116] Next, when the USB device 121B is connected to the USB port P2B in the in-vehicle ECU 101, the USB device 121B transmits a connection notification to the in-vehicle ECU 101 (step S44).
[0117] Next, when the in-vehicle ECU 101 receives a connection notification from the USB device 121B via the USB port P2B, it recognizes that the USB device 121B has been connected to the USB port P2B, and transmits a device information request to the USB device 121B via the USB port P2B (step S45).
[0118] Next, the USB device 121B transmits a device information response including the class number, idVender, and idProduct of the USB device 121B to the in-vehicle ECU 101 as a response to the device information request (step S46).
[0119] Next, the in-vehicle ECU 101 starts the termination unit 14B that corresponds to the class number, idVender and idProduct of the USB device 121B and the port number of the USB port P2B based on the correspondence table T1 in the storage unit 16 (step S47).
[0120] Next, the in-vehicle ECU 101 transmits to the in-vehicle ECU 111 an OfferService message M1B including a service ID "X002" corresponding to the application ID of the terminal unit 14B and an option ID "Y002" corresponding to the application ID of the terminal unit 14A (step S48).
[0121] Next, for example, the in-vehicle ECU 111B, one of the in-vehicle ECUs 111A and 111B, which receives the OfferService message M1B, sends a FindService message M2B to the in-vehicle ECU 101, including the service ID "X002" corresponding to the application ID of the terminal unit 14B and the ID of the in-vehicle ECU 111B (step S49).
[0122] Next, the in-vehicle ECU 101 receives the FindService message M2B from the in-vehicle ECU 111B and starts a relay process for relaying communication between the USB device 121B and the in-vehicle ECU 111B (step S50).
[0123] Next, the USB device 121B receives a predetermined notification accompanying the reception of the FindService message M2B from the in-vehicle ECU 101, and transmits a frame F1 addressed to the in-vehicle ECU 111B to the in-vehicle ECU 101 (step S51).
[0124] Next, the in-vehicle ECU 101 receives the frame F1 from the USB device 121B and performs a termination process of the USB communication protocol. More specifically, as the termination process, the in-vehicle ECU 101 acquires the communication data Dt1 from the frame F1 and transmits a response frame to the USB device 121B (step S52).
[0125] Next, the in-vehicle ECU 101 transmits the frame F2 including the acquired communication data Dt1 to the in-vehicle ECU 111B (step S53).
[0126] Next, for example, the in-vehicle ECU 111B transmits a frame F2 addressed to the USB device 121B to the in-vehicle ECU 101 (step S54).
[0127] Next, the in-vehicle ECU 101 receives the frame F2 from the in-vehicle ECU 111B and performs a termination process of the communication protocol in the in-vehicle network. More specifically, as the termination process, the in-vehicle ECU 101 acquires the communication data Dt2 from the frame F2 and transmits a response frame to the in-vehicle ECU 111B (step S55).
[0128] Next, the in-vehicle ECU 101 transmits the frame F1 including the acquired communication data Dt2 to the in-vehicle ECU 111B (step S56).
[0129] In the in-vehicle system 301, any one of the above steps S38, S39, S40, S51, S52, and S53 and the above steps S41, S42, S43, S54, S55, and S56 may not be performed. More specifically, the in-vehicle system 301 may be configured such that the USB device 121 transmits the communication data Dt1 to the in-vehicle ECU 111 via the in-vehicle ECU 101, while the in-vehicle ECU 111 does not transmit the communication data Dt2. In this case, the termination unit 14 terminates communication with the USB device 121, but does not terminate communication with the in-vehicle ECU 111.
[0130] Furthermore, the in-vehicle system 301 may be configured such that the in-vehicle ECU 111 transmits the communication data Dt2 to the USB device 121 via the in-vehicle ECU 101, while the USB device 121 does not transmit the communication data Dt1. In this case, the terminal unit 14 terminates communication with the in-vehicle ECU 111, but does not terminate communication with the USB device 121.
[0131] Furthermore, although the in-vehicle ECU 101 according to the embodiment of the present disclosure has been described as having a plurality of USB ports P2, this is not limiting. The in-vehicle ECU 101 may have a single USB port P2. In this case, the USB communication unit 11 does not acquire the port number of the USB port P2 to which the USB device 121 is connected, but instead creates connection information Con indicating the class number, idVender, and idProduct and outputs the connection information Con to the startup unit 15.
[0132] In addition, in the in-vehicle ECU 101 according to the embodiment of the present disclosure, the activation unit 15 is configured to activate the termination unit 14 corresponding to some types of USB information when the correspondence table T1 does not include the termination unit 14 corresponding to all types of USB information, but this is not limited to this. The activation unit 15 may be configured not to activate the termination unit 14 when the correspondence table T1 does not include the termination unit 14 corresponding to all types of USB information.
[0133] Furthermore, in the in-vehicle ECU 101 according to the embodiment of the present disclosure, the storage unit 16 is configured to store the correspondence table T1 including the records R2, R3, and R4, but this is not limited thereto. The storage unit 16 may be configured to store a correspondence table T1 that does not include the records R2, R3, and R4. In this case, if there is a record R1 that matches a predetermined number or more of the items in the composite primary key of the correspondence table T1, the launch unit 15 may launch the termination unit 14 having the app ID included in the record R1.
[0134] Furthermore, in the in-vehicle ECU 101 according to the embodiment of the present disclosure, the proxy unit 13 is configured to include multiple termination units 14 of the same type, but this is not limited to this. The proxy unit 13 may be configured to include one termination unit 14 per type. In this case, the storage unit 16 may be configured to store a correspondence table T1 that does not include items for service ID and option ID.
[0135] Furthermore, in the in-vehicle system 301 according to the embodiment of the present disclosure, the USB device 121 is configured to be directly connected to the USB port P2 in the in-vehicle ECU 101, but this is not limiting. The USB device 121 may be connected to the USB port P2 in the in-vehicle ECU 101 via a hub that includes a USB port. Furthermore, the correspondence table T1 in the storage unit 16 of the in-vehicle ECU 101 may be configured to further include an item for the port number of the USB port to which the USB device 121 is connected, among the USB ports of the hub.
[0136] The above-described embodiments should be considered to be illustrative in all respects and not restrictive. The scope of the present invention is defined by the claims, not by the above description, and is intended to include all modifications within the meaning and scope of the claims.
[0137] Each process (each function) in the above-described embodiments is realized by a processing circuit including one or more processors. The processing circuit may be configured as an integrated circuit or the like that combines one or more memories, various analog circuits, and various digital circuits in addition to the one or more processors. The one or more memories store programs (instructions) that cause the one or more processors to execute each of the processes. The one or more processors may execute each of the processes according to the program read from the one or more memories, or according to a logic circuit pre-designed to execute each of the processes. The processor may be various processors suitable for computer control, such as a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), a field programmable gate array (FPGA), and an application-specific integrated circuit (ASIC). Note that the physically separate processors may cooperate with each other to execute each of the processes. For example, the processors mounted on a plurality of physically separated computers may cooperate with each other to execute the above processes via a network such as a LAN (Local Area Network), a WAN (Wide Area Network), the Internet, etc. The program may be installed into the memory from an external server device or the like via the network, or may be distributed in a state stored on a recording medium such as a CD-ROM (Compact Disc Read Only Memory), a DVD-ROM (Digital Versatile Disc Read Only Memory), or a semiconductor memory, and installed into the memory from the recording medium.
[0138] The above description includes the following additional features. [Appendix 1] An in-vehicle device in an in-vehicle network, a connection port to which a USB device can be connected via a USB interface; a detection unit that detects connection of the USB device to the connection port; an acquisition unit that acquires USB information related to the USB device whose connection is detected by the detection unit; a plurality of relay units that perform relay processing for relaying communications between the USB device and other devices in the in-vehicle network; a starting unit that starts up a relay unit among the plurality of relay units that performs the relay process between the USB device whose connection is detected by the detecting unit and the other device; a storage unit that stores correspondence information indicating a correspondence relationship between each of the plurality of relay units and the USB information; the relay unit performs at least one of a termination of communication with the USB device and a termination of communication with the other device in the relay process; the activation unit determines the relay unit to be activated based on the correspondence information and the USB information acquired by the acquisition unit; The in-vehicle device, wherein the types of the plurality of relay units differ for each USB device class.
[0139] [Appendix 2] An in-vehicle device in an in-vehicle network, a processing circuit and a connection port to which a USB device can be connected via a USB interface; The processing circuitry Detecting the connection of the USB device to the connection port; Obtaining USB information about the detected USB device; performing a relay process for relaying communications between the USB device and other devices in the in-vehicle network; activating a relay unit that performs the relay process between the USB device that has detected the connection and the other device, among a plurality of relay units that perform the relay process; The in-vehicle device further comprises: a storage unit that stores correspondence information indicating a correspondence relationship between each of the plurality of relay units and the USB information; The processing circuitry In the relay process, at least one of a termination of communication with the USB device and a termination of communication with the other device is performed; The in-vehicle device determines the relay unit to be activated based on the correspondence information and the acquired USB information. [Explanation of symbols]
[0140] 1 vehicle 2 Ethernet cables 11 USB communication unit 12 ECU communication section 13 Proxy section 14 Termination 15 Starting part 16 Memory section 101 Automotive ECU 111,111A,111B Automotive ECU 121,121A,121B USB device 201 In-vehicle network 301 In-Vehicle Systems P1, P1A, P1B communication ports P2, P2A, P2B, P2C USB ports T1 Supported Table
Claims
1. An in-vehicle device in an in-vehicle network, a connection port to which a USB device can be connected via a USB interface; a detection unit that detects the connection of the USB device to the connection port; an acquisition unit that acquires USB information related to the USB device whose connection is detected by the detection unit; a plurality of relay units that perform relay processing for relaying communications between the USB device and other devices in the in-vehicle network; a start-up unit that starts up one of the plurality of relay units that performs the relay process between the USB device, the connection of which is detected by the detection unit, and the other device; a storage unit that stores correspondence information indicating a correspondence relationship between each of the plurality of relay units and the USB information; the relay unit performs at least one of a termination of communication with the USB device and a termination of communication with the other device in the relay process; The activation unit determines the relay unit to be activated based on the correspondence information and the USB information acquired by the acquisition unit.
2. the in-vehicle device includes a plurality of the connection ports, The in-vehicle device according to claim 1 , wherein the acquisition unit acquires the USB information for identifying the connection port to which the USB device is connected, among the plurality of connection ports.
3. the acquiring unit acquires a plurality of types of USB information for one of the USB devices, 3. The in-vehicle device according to claim 1, wherein, when the correspondence information does not include a relay unit that corresponds to all types of USB information, the activation unit determines the relay unit to be activated based on some types of USB information.
4. 4. The in-vehicle device according to claim 3, wherein the storage unit stores a correspondence table as the correspondence information, the correspondence table including a composite primary key consisting of a plurality of items corresponding to the plurality of types of USB information, and the values of some of the items in the composite primary key are arbitrary.
5. the in-vehicle device includes a plurality of relay units of the same type, 3. The in-vehicle device according to claim 1, wherein the storage unit stores the correspondence information further indicating a correspondence relationship between each of the plurality of relay units of the same type and additional information that can identify the relay unit.
6. A communication method for an in-vehicle device in an in-vehicle network, comprising: the in-vehicle device includes a connection port to which a USB device can be connected via a USB interface, and a plurality of relay units that perform relay processing to relay communications between the USB device and other devices in the in-vehicle network; the relay unit performs at least one of a termination of communication with the USB device and a termination of communication with the other device in the relay process; The communication method includes: detecting a connection of the USB device to the connection port; acquiring USB information about the USB device whose connection has been detected; activating a relay unit among the plurality of relay units that performs the relay process between the USB device that has detected the connection and the other device; The in-vehicle device further a storage unit that stores correspondence information indicating a correspondence relationship between each of the plurality of relay units and the USB information; In the step of activating the relay unit, the relay unit to be activated is determined based on the correspondence information and the acquired USB information.
7. A communication program used in an in-vehicle device in an in-vehicle network, the in-vehicle device includes a connection port to which a USB device can be connected via a USB interface; Computer, a detection unit that detects the connection of the USB device to the connection port; an acquisition unit that acquires USB information related to the USB device whose connection is detected by the detection unit; a plurality of relay units that perform relay processing for relaying communications between the USB device and other devices in the in-vehicle network; a start-up unit that starts up one of the plurality of relay units that performs the relay process between the USB device whose connection is detected by the detection unit and the other device; It is a program to function as The in-vehicle device further a storage unit that stores correspondence information indicating a correspondence relationship between each of the plurality of relay units and the USB information; the relay unit performs at least one of a termination of communication with the USB device and a termination of communication with the other device in the relay process; The launching unit determines the relay unit to be launched based on the correspondence information and the USB information acquired by the acquisition unit.
Citation Information
Patent Citations
Management device, vehicle communication system, vehicle, vehicle communication management device, vehicle communication management program
WO2020179123A1