Relay device, data relay method, and program

The relay device improves communication efficiency in in-vehicle systems by using a protocol and address conversion unit with a conversion table to manage multiple connections for different protocols, addressing the inefficiencies caused by the DoIP standard's TCP connection limitations.

JP2025145088APending Publication Date: 2025-10-03DENSO CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2024045094
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-03-21
Publication Date
2025-10-03

AI Technical Summary

Technical Problem

In-vehicle systems face inefficiencies in diagnostic communication due to the limitation of the DoIP standard, which restricts TCP connections to one per logical address, leading to prolonged waiting times when relaying data between ECUs connected via different protocols with varying communication speeds.

Method used

A relay device equipped with a protocol conversion unit and an address conversion unit that utilizes a conversion table to associate external and internal addresses based on speed-related information, allowing simultaneous communication over multiple connections for different protocols.

Benefits of technology

This configuration enhances communication efficiency by enabling simultaneous data transfer between ECUs with different communication speeds without delays, optimizing the use of connections based on protocol speed differences.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025145088000001_ABST
    Figure 2025145088000001_ABST
Patent Text Reader

Abstract

To provide a technique for improving communication efficiency in diagnostic communication in which multiple protocols with different communication speeds are mixed.SOLUTION: A protocol conversion unit 22 mutually converts between a first protocol used for communication with an external tool 4 and a second protocol used for communication with ECUs 3A and 3B. An address conversion unit 23 mutually converts between an address for a tool and an address for an ECU according to a conversion table 231. A plurality of addresses for tools are assigned to one external tool 4. The conversion table 231 is set so that a different address for the tool is associated with each type of second protocol identified by speed-related information.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present disclosure relates to a technique for relaying between networks with different protocols. [Background technology]

[0002] The following Patent Document 1 describes an in-vehicle system that uses a plurality of types of protocols with different communication speeds for communication between a relay device and an ECU. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] Japanese Patent Application Laid-Open No. 2014-078801 Summary of the Invention [Problem to be solved by the invention]

[0004] In-vehicle systems use Ethernet to connect external tools and relay devices, and Ethernet and CAN may be used together to connect multiple ECUs to be diagnosed and the relay device. Ethernet and CAN are registered trademarks. Known examples of diagnostic communication over Ethernet include DoIP, and known examples of diagnostic communication over CAN include DoCAN. Even if data is long enough to be transmitted in one frame with DoIP, it must be divided into multiple frames for transmission with DoCAN.

[0005] However, the DoIP standard limits the number of TCP connections to one per logical address used to identify a device. In other words, when an ECU starts a series of data transfers associated with an external tool, another ECU cannot start a data transfer until the series of data transfers is complete.

[0006] Therefore, when relaying by an ECU connected to a relay device via CAN begins, there is a problem that the waiting time becomes long until relaying by an ECU connected to a relay device via the faster Ethernet begins.

[0007] One aspect of the present disclosure provides a technique for improving communication efficiency in diagnostic communication in which multiple types of protocols with different communication speeds are mixed. [Means for solving the problem]

[0008] One aspect of the present disclosure is a relay device that relays data between multiple electronic devices, and includes a protocol conversion unit (22) and an address conversion unit (23). The protocol conversion unit is configured to convert between a first protocol used for communication with a first electronic device (4) and a second protocol used for communication with a second electronic device (3). The address conversion unit is configured to convert an external address indicated in a message from the first electronic device to a second electronic device to an internal address and to convert an internal address indicated in a message from the second electronic device to the first electronic device according to a conversion table (231). The conversion table associates an external address and an internal address, which are address information used to identify the first electronic device in a higher-level protocol, with each other. Multiple external addresses are assigned to one first electronic device. The conversion table is configured so that a different external address is associated with each type of second protocol identified by speed-related information. The speed-related information is information used to identify the type of second protocol based on differences in communication speed.

[0009] With this configuration, communication efficiency can be improved in diagnostic communication in which a plurality of protocols with different communication speeds are mixed. One aspect of the present disclosure is a data relay method for relaying data between multiple electronic devices. The data relay method includes converting between a first protocol used for communication with a first electronic device (4) and a second protocol used for communication with a second electronic device (3). The data relay method includes converting an external address indicated in a message from the first electronic device to a second electronic device to an internal address and converting an internal address indicated in a message from the second electronic device to the first electronic device to an external address according to a conversion table (231). The conversion table associates the external address and the internal address, which are address information used to identify the first electronic device in a higher-level protocol. Multiple external addresses are assigned to one first electronic device. The conversion table is configured so that a different external address is associated with each type of second protocol identified by speed-related information. The speed-related information is information used to identify the type of second protocol based on differences in communication speed. By implementing this method, it is possible to obtain effects similar to those of the relay device described above.

[0010] One aspect of the present disclosure is a program for causing a computer to function as the relay device described above. By executing such a program, it is possible to obtain the same effects as those of the relay device described above. [Brief explanation of the drawings]

[0011] [Figure 1] FIG. 1 is a block diagram showing a configuration of an in-vehicle system. [Figure 2] FIG. 10 is an explanatory diagram illustrating an example of a combination of protocols. [Figure 3] FIG. 10 is an explanatory diagram illustrating the contents of a conversion table. [Figure 4] FIG. 10 is a sequence diagram showing an operation when a diagnostic message is transmitted from an external tool to an ECU. [Figure 5] FIG. 10 is a sequence diagram showing an operation when a diagnostic message is transmitted from an ECU to an external tool. [Figure 6]FIG. 10 is an explanatory diagram showing the effect of executing communication with an external tool via multiple connections. [Figure 7] FIG. 10 is a sequence diagram showing an operation when updating a conversion table in the second embodiment. [Figure 8] FIG. 10 is an explanatory diagram illustrating an example of a combination of protocols associated with a connection. DETAILED DESCRIPTION OF THE INVENTION

[0012] Hereinafter, embodiments of the present disclosure will be described with reference to the drawings. [1. First embodiment] [1-1.Configuration] As shown in FIG. 1, the in-vehicle system 1 of this embodiment is mounted on a vehicle. The vehicle may have an automatic driving function in addition to a manual driving function. The vehicle may be a hybrid vehicle having an engine and an electric motor as a driving source. The vehicle is not limited to a vehicle having an automatic driving function or a hybrid vehicle, but may be a vehicle having only a manual driving function, or a vehicle having only an engine or only an electric motor as a driving source. Hereinafter, a vehicle equipped with the in-vehicle system 1 will be simply referred to as a vehicle.

[0013] The in-vehicle system 1 includes a relay device 2 and an electronic control unit (hereinafter referred to as ECU) group 3. ECU is an abbreviation for Electronic Control Unit. The relay device 2 has one or more external connection terminals T0 and multiple internal connection terminals T1 and T2. An external tool 4 is connected to the external connection terminal T0. An ECU 3A belonging to the ECU group 3 is connected to the internal connection terminal T1 via a first internal network. An ECU 3B belonging to the ECU group 3 is connected to the internal connection terminal T2 via a second internal network whose communication protocol is different from that of the first internal network. The relay device 2 may have multiple internal connection terminals T1 and T2. In addition to the internal connection terminals T1 and T2, the relay device 2 may also have one or more internal connection terminals connected to ECUs via an internal network whose communication protocol is different from that of the first and second internal networks. The relay device 2 relays data between the external tool 4 connected to the external connection terminal T0 and the ECUs connected to the internal connection terminals T1 and T2.

[0014] Hereinafter, the protocol used for diagnostic communication between the relay device 2 and the external tool 4 will be referred to as the first upper protocol, and the protocol used for diagnostic communication between the relay device 2 and each ECU belonging to the ECU group 3 will be referred to as the second upper protocol. Also, a protocol lower than the first upper protocol, used for connecting the relay device 2 and the external tool 4, will be referred to as the first lower protocol, and a protocol lower than the second upper protocol, used for connecting the relay device 2 and each ECU belonging to the ECU group 3, will be referred to as the second lower protocol. The first lower protocol and the first upper protocol will be collectively referred to as the first protocol P1, and the second lower protocol and the second upper protocol will be collectively referred to as the second protocol P2.

[0015] As shown in Fig. 2, in this embodiment, the first upper protocol is UDS and DoIP, and the first lower protocol is TCP, IP, and Ethernet. Ethernet is a registered trademark. UDS is an abbreviation for Unified Diagnostic Services, which is a unified diagnostic service for automobiles standardized by ISO14229. DoIP is an abbreviation for Diagnostics over Internet Protocol, which is an Ethernet-based diagnostic protocol standardized by ISO13400.

[0016] There are multiple types of second protocols P2, which are identified as second protocols P21 to P24 in this embodiment. The second protocols P21 to P24 are also collectively referred to as a second protocol group. In both the second protocol P21 and the second protocol P23, the lower protocols are TCP / UDP, IP, and Ethernet, and the upper protocols are UDS and any protocol. Any protocol means that any protocol can be used as the protocol connecting UDS and the lower protocols. The second protocol P21 and the second protocol P23 differ in the physical layer of the Ethernet. Specifically, the second protocol P21 uses an Ethernet compatible with a communication speed of 10 Mbps, while the second protocol P23 uses an Ethernet compatible with a communication speed of 100 Mbps. In other words, the types of second protocols may be distinguished based on the physical layer as well.

[0017] The second protocol P22 has an upper protocol of UDS and DoCAN, and a lower protocol of CAN. The second protocol P24 has an upper protocol of UDS and DoCAN, and a lower protocol of CAN FD. CAN stands for Controller Area Network and is a registered trademark. CAN FD stands for CAN with Flexible Data Rate. DoCAN stands for Diagnostic communication over Controller Area Network and is a CAN-based diagnostic protocol standardized by ISO15765.

[0018] The second protocols P21 to P24 belonging to the second protocol group differ from one another in at least one of the communication speed and the data length that can be transmitted in one frame. Returning to FIG. 1, the relay device 2 is an electronic control device mainly configured with a microcomputer including a CPU 2a, a ROM 2b, a RAM 2c, etc. Various functions of the microcomputer are realized by the CPU 2a executing a program stored in a non-transitory tangible recording medium. In this example, the ROM 2b corresponds to the non-transitory tangible recording medium storing the program. Furthermore, the execution of this program executes a method corresponding to the program. Note that some or all of the functions executed by the CPU 2a may be configured as hardware using one or more ICs, etc. Furthermore, the number of microcomputers constituting the relay device 2 may be one or more.

[0019] [1-2. Functional configuration of relay device] The functional configuration of the relay device 2 will be described. For ease of explanation, FIG. 1 shows a case where there is one each of the internal connection terminals T1 and T2.

[0020] The ECUs 3A and 3B and the external tool 4 are assigned logical addresses LA for identifying devices that are the target of diagnostic communication in the higher-level protocol. Specifically, LA=FF is assigned to the ECU 3A, and LA=GG is assigned to the ECU 3B. The external tool 4 is also assigned two logical addresses LA=AA and LA=BB, the number of which is the same as the number of types of second protocols that the relay device 2 uses to communicate with the ECUs 3A and 3B that belong to the ECU group 3.

[0021] The relay device 2 includes a connection unit 21, a protocol conversion unit 22, and an address conversion unit 23 as functional blocks that are realized by the CPU 2a or the like executing a program stored in the ROM 2b or the like.

[0022] The connection unit 21 has sockets S1 and S2, the number of which is the same as the number of types of second protocols used by the relay device 2 for communication with each ECU belonging to the ECU group 3 (i.e., two). The sockets S1 and S2 provide connections C1 and C2 of lower protocols used for communication with an external tool 4 connected to the external connection terminal T0. The sockets S1 and S2 are associated with an IP address indicating the same external tool 4 and different TCP port numbers. The connection unit 21 has the function of distributing data provided from upper layer programs that use the sockets S1 and S2 to an appropriate application at an appropriate communication destination. If there are multiple external connection terminals T0, a connection unit 21 is provided for each external connection terminal.

[0023] The protocol conversion unit 22 includes individual conversion units 22A and 22B prepared for each type of second protocol. The individual conversion unit 22A performs protocol conversion of a diagnostic communication message transmitted and received via the internal connection terminal T1 to which an internal network that communicates with the ECU 3A using the second protocol P21 is connected. Specifically, the individual conversion unit 22A performs protocol conversion between the first protocol P1 and the second protocol P21.

[0024] The individual conversion unit 22B performs protocol conversion of diagnostic communication messages transmitted and received via the internal connection terminal T2, which is connected to an internal network that communicates with the ECU 3B using the second protocol P22. Specifically, the individual conversion unit 22B performs protocol conversion between the first protocol P1 and the second protocol P22. The individual conversion unit 22B has a function of generating multiple DoCAN messages that comply with the second protocol P22 from one DoIP message that complies with the first protocol P1. The individual conversion unit 22B also has a function of generating one DoIP message that complies with the first protocol P1 from multiple DoCAN messages that comply with the second protocol P22.

[0025] The address conversion unit 23 includes a conversion table 231. The address conversion unit 23 converts, in accordance with the conversion table 231, the value of the logical address LA of the external tool 4 indicated as the destination or source in the header information of the upper protocol.

[0026] 3, in the conversion table 231, a logical address LA indicating the external tool 4, a logical address LA indicating the ECU with which the external tool 4 communicates, and speed-related information are associated with each of the sockets S1 and S2 of the connection unit 21. The speed-related information is information used to identify the type of the second protocol P2.

[0027] The logical addresses indicating the external tool 4 include a tool-to-tool address used in communication between the external tool 4 and the relay device 2, and an ECU-to-ECU address used in communication between the ECUs 3A, 3B and the relay device 2. The logical addresses indicating the ECUs list the logical addresses of all ECUs that communicate with the relay device 2 using the same type of second protocol P2.

[0028] The speed-related information is information used to identify the type of second protocol P2 with a focus on the communication speed, and in this case, information identifying the internal connection terminals T1 and T2 is used. In other words, since different second protocols P2 are used for the internal connection terminals T1 and T2, if it is known at which of the internal connection terminals T1 and T2 the communication was received, it becomes possible to identify the type of second protocol P2 used for the communication, and therefore the communication speed.

[0029] 3 indicates that, of the two logical addresses LA assigned to the external tool 4, LA=AA is associated with the socket S1, and LA=BB is associated with the socket S2. The conversion table 231 indicates that the socket S1 is used when a diagnostic message transmitted by the ECU 3A, which is connected to the internal connection terminal T1 and uses the second protocol P21 for communication with the relay device 2, is transmitted and received between the external tool 4 and the relay device 2. The conversion table 231 also indicates that the socket S2 is used when a diagnostic message transmitted and received by the ECU 3B, which is connected to the internal connection terminal T2 and uses the second protocol P22 for communication with the relay device 2, is transmitted and received between the external tool 4 and the relay device 2.

[0030] The ECU addresses of the sockets S1 and S2 are both set to the same value. In this example, LA=AA, which is one of the logical addresses assigned to the external tool 4, is used. In the following, the connection established between the external tool 4 and the relay device 2 via the socket S1 is denoted by C1, and the connection established between the external tool 4 and the relay device 2 via the socket S2 is denoted by C2. In other words, the conversion table 231 shown in Fig. 3 is set so that the connection C1 is used for communication with the ECU 3A using the second protocol P21, and the connection C2 is used for communication with the ECU 3B using the second protocol P22.

[0031] [1-3. Operation] The operation of the external tool 4 when transmitting a diagnostic message to the ECU 3A using the second protocol P21 and the ECU 3B using the second protocol P22 will be described with reference to the sequence diagram of FIG.

[0032] The external tool 4 and the relay device 2 are connected by two connections C1 and C2 using two sockets S1 and S2, and are configured to enable communication using the first protocol P1 over each connection. Of the two logical addresses LA possessed by the external tool 4, LA=AA is associated with connection C1, and LA=BB is associated with connection C2. The relay device 2 and ECU 3A are configured to enable communication using the second protocol P21, and the relay device and ECU 3B are configured to enable communication using the second protocol P22. Hereinafter, when sending and receiving a diagnostic message, the logical address representing the destination device used in the upper protocol is denoted as TA, and the logical address representing the source device is denoted as SA.

[0033] As shown in Figure 4, in S10, when the external tool 4 sends a diagnostic message to ECU 3A, it sends the diagnostic message with TA=FF and SA=AA set to the relay device 2 via connection C1 linked to logical address LA=AA.

[0034] In S11, the relay device 2 converts the SA indicated in the diagnostic message received from the external tool 4 according to the conversion table 231. Specifically, since the relay device 2 receives the diagnostic message via the connection C1, it converts the SA from the tool address AA to the ECU address AA. In other words, in this case, the value of SA remains the same before and after the conversion.

[0035] In S12, the relay device 2 transmits the address-converted diagnostic message to the ECU 3A identified by the TA of the diagnostic message by outputting the address-converted diagnostic message via the internal connection terminal T1 indicated in the speed-related information.

[0036] In S13, when the external tool 4 sends a diagnostic message to ECU3B, it sends the diagnostic message with TA=GG and SA=BB set to the relay device 2 via the connection C2 linked to the logical address LA=BB.

[0037] In S14, the relay device 2 converts the SA indicated in the diagnostic message received from the external tool 4 according to the conversion table 231. Specifically, since the relay device 2 receives the diagnostic message via connection C2, it converts SA from the tool address BB to the ECU address AA. That is, in this case, the value of SA is different before and after the conversion.

[0038] In S15, the relay device 2 transmits the address-converted diagnostic message to the ECU 3B identified by the TA of the diagnostic message by outputting the address-converted diagnostic message via the internal connection terminal T2 indicated in the speed-related information.

[0039] Next, the operation when the ECU 3A using the second protocol P21 and the ECU 3B using the second protocol P22 transmit a diagnostic message to the external tool 4 will be described with reference to the sequence diagram of FIG.

[0040] In S20, when the ECU 3A transmits a diagnostic message to the external tool 4, the ECU 3A transmits the diagnostic message to the relay device 2 with TA=AA and SA=FF set. In S21, the relay device 2 converts TA indicated in the diagnostic message received from the ECU 3A according to the conversion table 231. Specifically, since the relay device 2 receives the diagnostic message via the internal connection terminal T1, TA is converted from AA, which is an ECU address, to AA, which is a tool address. In other words, in this case, the value of TA remains the same before and after the conversion.

[0041] In S22, the relay device 2 transmits the address-converted diagnostic message to the external tool 4 via the connection C1 linked to the internal connection terminal T1 as speed-related information in the conversion table 231.

[0042] In S23, when the ECU 3B transmits a diagnostic message to the external tool 4, the ECU 3B transmits the diagnostic message to the relay device 2 with TA=AA and SA=GG. In S24, the relay device 2 converts TA indicated in the diagnostic message received from ECU 3B in accordance with the conversion table 231. Specifically, since the relay device 2 receives the diagnostic message via the internal connection terminal T2, TA is converted from AA, which is an ECU address, to BB, which is a tool address. That is, in this case, the value of TA is different before and after the conversion.

[0043] In S25, the relay device 2 transmits the address-converted diagnostic message to the external tool 4 via the connection C2 linked to the internal connection terminal T2 as speed-related information in the conversion table 231.

[0044] [1-4. Terminology] In this embodiment, the external tool 4 corresponds to the first electronic device of the present disclosure, and each ECU 3A, 3B belonging to the ECU group 3 corresponds to the second electronic device of the present disclosure. In this embodiment, the tool address corresponds to the external address of the present disclosure, and the ECU address corresponds to the internal address of the present disclosure. In this embodiment, the internal connection terminals T1, T2 correspond to information specifying a physical path of the present disclosure, and the logical address LA corresponds to address information of the present disclosure. The connections C1, C2 in this embodiment correspond to connections of the present disclosure. [1-5.Effects] According to the first embodiment described above in detail, the following effects are achieved.

[0045] (1a) The relay device 2 uses multiple sockets S1, S2 for communication with the external tool 4 depending on the type of the second protocol P2, which is used for communication with the ECUs 3A, 3B and is classified based on communication speed. Therefore, the relay device 2 can prevent communication between the external tool 4 and the relay device 2 from being delayed by communication with the ECU 3B, which uses the second protocol P22, which has a slow communication speed, causing communication with the ECU 3A, which uses the second protocol P21, which has a fast communication speed.

[0046] The reason why communication delays are suppressed is as follows: As shown in Figure 6, it is assumed that ECU 3A using the second protocol P21 (i.e., Ethernet) and ECU 3B using the second protocol P22 (i.e., DoCAN) start communication with the external tool 4 almost simultaneously. Also, it is assumed that a diagnostic message from ECU 3A is completed in one frame, whereas a diagnostic message from ECU 3B requires several tens of frames.

[0047] In FIG. 6, the upper part shows a case where one connection can be used for communication between the external tool 4 and the relay device 2, and the lower part shows a case where two connections can be used. The relay device 2 transfers the received frames from ECU 3A to the external tool 4 frame by frame, and transfers the diagnostic message (i.e., DoCAN message) from ECU 3B to the external tool 4 by combining multiple frames of data into one diagnostic message (i.e., DoIP message).

[0048] Reception from ECU 3B starts first, but before reception of the multiple DoCAN messages (e.g., six) required to send the first DoIP message is completed, reception of the diagnostic message, which is completed in one frame, from ECU 3A is completed. At this time, because the connection with the external tool 4 is unused, a DoIP message based on the diagnostic message from ECU 3A is sent to the external tool 4 whether there is one connection or two connections.

[0049] After that, the first DoIP message based on the series of DoCAN messages from ECU 3B is transmitted to the external tool 4. Then, in the case where there is one connection, the connection between the relay device 2 and the external tool 4 is occupied by ECU 3B until all DoIP messages based on the series of DoCAN frames transmitted from ECU 3B are received by the external tool 4. Therefore, while the connection is occupied by ECU 3B, a diagnostic message received from ECU 3A cannot be immediately transmitted to the external tool 4, and is in a transmission waiting state until the occupation of the connection by ECU 3B is released.

[0050] In contrast, the relay device 2 that transmits and receives DoIP messages to and from the external tool 4 using different connections C1 and C2 for each type of second protocol P2 is as follows: That is, even if transmission of DoIP messages based on a series of DoCAN messages received from ECU 3B is ongoing, a DoIP message based on a diagnosis message received from ECU 3A can be transmitted to the external tool 4 using connection C2, which is different from connection C1 currently being used by ECU 3B. That is, transmission from ECU 3A to the external tool 4 using the second protocol P21, which has a higher communication speed, can be performed without waiting for completion of transmission from ECU 3B to the external tool 4 using the second protocol P22, which has a lower communication speed.

[0051] (1b) In the relay device 2, the logical address LA indicating the external tool 4 is different between the tool address and the ECU address, and the ECU address is set to be common to all ECUs 3A and 3B. Therefore, the ECUs 3A and 3B can communicate with the external tool 4 using the common ECU address without being aware of how to use the multiple logical addresses LA (i.e., tool addresses) assigned to the external tool 4.

[0052] [2. Second Embodiment] [2-1. Differences from the first embodiment] The second embodiment has the same basic configuration as the first embodiment, so differences will be described below. Note that the same reference numerals as those in the first embodiment indicate the same configuration, and reference will be made to the preceding description.

[0053] The first embodiment described above uses a preset conversion table 231. In contrast, the second embodiment differs from the first embodiment in that the conversion table 231 is rewritable.

[0054] [2-2. Operation] The operation when the conversion table 231 is rewritable will be described with reference to the sequence diagram of FIG.

[0055] In the initial state of the conversion table 231, all items except the tool address indicating the external tool 4 are set, and the rule address may be in an unset state or may have some initial value written in. In other words, the type of the second protocol P2 and the connections C1 and C2 are associated in advance in the conversion table 231, and the association with the logical address indicating the external tool 4 can be set arbitrarily.

[0056] 7, in S30, when the external tool 4 wants to change the correspondence between the logical addresses AA and BB assigned to itself and the connections C1 and C2, it transmits a request message (Diagnostic Request) to the relay device 2. For example, when the external tool 4 wants to use logical address LA=BB for communication with ECU 3B that uses the second protocol P22, it transmits a request message in which TA=GG and SA=BB are set to the relay device 2 using the connection C2 linked to the second protocol P22.

[0057] In S31, the relay device 2 updates the contents of the conversion table 231 in accordance with the request message received from the external tool 4. Specifically, the relay device 2 rewrites the tool address of the external tool 4 associated with the connection C2 that received the request message to the value (i.e., BB) indicated in SA of the request message. Thereafter, the logical address BB is used for communication between the external tool 4 and ECU 3B. The contents of the processing executed after updating the conversion table 231 in S31 are the same as those described in S14.

[0058] In S32, the relay device 2 transmits the address-converted request message to the ECU 3B in the same manner as described in S15. In S33, the ECU 3B transmits to the relay device 2 a response message (Diagnostic Response) in which TA=AA and SA=GG are set in response to the received request message.

[0059] In S34, the relay device 2 converts the TA indicated in the response message in the same manner as described in S24. In S35, the relay device 2 transmits the address-converted response message to the external tool 4 in the same manner as described in S25.

[0060] Thereafter, if it is desired to change the logical address LA used for communication with ECU3B to AA, in S36 the external tool 4 sends a request message with TA=GG and SA=AA to the relay device 2 via the connection C2 linked to the second protocol P22.

[0061] In S37, the relay device 2 updates the contents of the conversion table 231 in the same manner as described in S31. In this case, the tool address associated with the connection C2 is rewritten to AA, which is the value indicated in SA of the request message. Thereafter, the logical address AA is used for communication between the external tool 4 and ECU 3B. The contents of the processing executed after updating the conversion table 231 in S37 are the same as those described in S14.

[0062] The contents of the processes in S38 to S41 are the same as those explained in S32 to S35. [2-3. Effects] According to the second embodiment described above in detail, in addition to the effects (1a) to (1c) of the first embodiment described above, the following effect is also achieved.

[0063] (2a) According to this embodiment, the correspondence between the connections C1 and C2 associated with the type of the second protocol P2 and the logical addresses AA and BB assigned to the external tool 4 can be set and changed as desired.

[0064] 3. Other Embodiments Although the embodiments of the present disclosure have been described above, the present disclosure is not limited to the above-described embodiments and can be implemented in various modified forms.

[0065] (3a) In the above embodiment, two types of second protocols P21 and P22 are mixed. However, three or more types of second protocols P2 may be mixed. For example, as shown in FIG. 8, when four second protocols P21 to P24 are mixed, four logical addresses AA, BB, CC, and DD are assigned to the external tool 4, and four sockets S1 to S4 are provided in the connection unit 21 of the relay device 2. The connections C1 to C4 established by the sockets S1 to S4 are associated with the second protocols P21 to P24, respectively. In other words, even if the communication speeds are different between Ethernets or between CANs, different connections may be used. Here, the system is configured to support all four types of second protocols P21 to P24, but it may also be configured to support any two or three of these. It may also be configured to support protocols other than the second protocols P21 to P24.

[0066] (3b) In the above embodiment, one of the logical addresses LA (i.e., tool-to-tool addresses) assigned to the external tool 4 is used as the ECU address, but a logical address LA different from the tool-to-tool address may be used as the ECU address. Furthermore, the ECU address does not need to be the same for all types of the second protocol P2, and may be different for each type of second protocol.

[0067] (3c) In the above embodiment, the speed-related information is information about the internal connection terminals T1 and T2 that received the diagnostic message. However, the speed-related information may also be the SA included in the diagnostic message. In this case, the ECU that sent the diagnostic message can be identified from the SA, and the type of second protocol P2 used by the ECU can be identified. For example, if the second protocol P2 includes Ethernet protocols with different speeds, the speed-related information may include information about lower protocols such as TCP / UDP port numbers, IP addresses, and MAC addresses. For example, if the second protocol P2 includes CAN, CAN FD, CAN XL, and other protocols with different speeds, the speed-related information may include CAN channel identification information (e.g., FDF bit) added to the CAN frame, CAN ID, and the like. FDF stands for FD Format indicator.

[0068] (3d) The relay device 2 and the method described herein may be implemented by a special-purpose computer configured by configuring a processor and memory programmed to execute one or more functions embodied in a computer program. Alternatively, the relay device 2 and the method described herein may be implemented by a special-purpose computer configured by configuring a processor with one or more dedicated hardware logic circuits. Alternatively, the relay device 2 and the method described herein may be implemented by one or more special-purpose computers configured by combining a processor and memory programmed to execute one or more functions with a processor configured with one or more hardware logic circuits. Furthermore, the computer program may be stored in a computer-readable, non-transitory tangible recording medium as instructions to be executed by a computer. The method for implementing the functions of each unit included in the relay device 2 does not necessarily need to include software; all of the functions may be implemented using one or more hardware components.

[0069] (3e) Multiple functions possessed by one component in the above embodiments may be realized by multiple components, or one function possessed by one component may be realized by multiple components. Also, multiple functions possessed by multiple components may be realized by one component, or one function realized by multiple components may be realized by one component. Also, part of the configuration of the above embodiments may be omitted. Also, at least part of the configuration of the above embodiments may be added to or substituted for the configuration of another of the above embodiments.

[0070] (3f) In addition to the relay device described above, the present disclosure can also be realized in various forms, such as a system including the relay device as a component, a program for causing a computer to function as the relay device, a non-transient physical recording medium such as a semiconductor memory on which this program is recorded, and a relay method.

[0071] [4. Technical Ideas Disclosed in the Present Specification] [Item 1] A relay device that relays data between a plurality of electronic devices, a protocol conversion unit (22) configured to convert between a first protocol used for communication with the first electronic device (4) and a second protocol used for communication with the second electronic device (3); an address conversion unit (23) configured to convert the external address indicated in a message from the first electronic device to the second electronic device into the internal address and to convert the internal address indicated in a message from the second electronic device to the first electronic device into the external address according to a conversion table (231) that links external addresses and internal addresses, which are address information used to indicate the first electronic device in an upper protocol, to each other; Equipped with A plurality of the external addresses are assigned to one of the first electronic devices, the conversion table is set so that a different external address is associated with each type of the second protocol identified by the speed-related information; The speed-related information is information used to identify the type of the second protocol based on a difference in communication speed. Relay device.

[0072] [Item 2] The relay device according to item 1, a connection unit (21) configured to set a plurality of lower protocol connections used in a lower layer of the first protocol than the upper protocol, the lower protocol connections being used for connection with one of the first electronic devices, each lower protocol connection being associated with a different external address; and configured to selectively use the lower-level connection established by the connection unit according to the speed-related information. Relay device.

[0073] [Item 3] The relay device according to item 1 or 2, The speed-related information is configured to use either information specifying a physical path to which the second electronic device is connected or information of a lower protocol used in a layer below the upper protocol in the second protocol. Relay device.

[0074] [Item 4] Item 3. The relay device according to item 3, The information on the lower protocol includes any one of a TCP / UDP port number, an IP address, a MAC address, a CAN ID, and CAN channel identification information. Relay device.

[0075] [Item 5] Item 5. The relay device according to any one of items 1 to 5, The conversion table is set so that all the inward addresses associated with the same first electronic device have the same value. Relay device.

[0076] [Item 6] Item 5. The relay device according to any one of items 1 to 5, The address conversion unit is configured to update the contents of the conversion table according to the external address indicating the source indicated in the message of the higher-level protocol received from the first electronic device and information specifying the type of the second protocol used at the destination. Relay device.

[0077] [Item 7] Item 6: A relay device according to any one of items 1 to 6, the upper protocol in the first protocol includes DoIP; a lower protocol used in the first protocol at a layer below the upper protocol includes TCP; Relay device.

[0078] [Item 8] Item 7: A relay device according to any one of items 1 to 7, The second protocol includes any one of DoCAN, UDS, and Ethernet. Relay device. [Explanation of symbols]

[0079] 1...In-vehicle system, 2...Relay device, 3...ECU group, 3A, 3B...ECU, 4...External tool, 21...Connection section, 22...Protocol conversion section, 22A, 22B...Individual conversion section, 23...Address conversion section, 231...Conversion table, C1 to C4...Connection, S1 to S4...Socket, T0...External connection terminal, T1, T2...Internal connection terminal.

Claims

1. A relay device that relays data between a plurality of electronic devices, a protocol conversion unit (22) configured to convert between a first protocol used for communication with the first electronic device (4) and a second protocol used for communication with the second electronic device (3); an address conversion unit (23) configured to convert the external address indicated in a message from the first electronic device to the second electronic device into the internal address and to convert the internal address indicated in a message from the second electronic device to the first electronic device into the external address, according to a conversion table (231) that links external addresses and internal addresses, which are address information used to indicate the first electronic device in a higher-level protocol, to each other; Equipped with A plurality of the external addresses are assigned to one of the first electronic devices, the conversion table is set so that a different external address is associated with each type of the second protocol identified by the speed-related information; The speed-related information is information used to identify the type of the second protocol based on a difference in communication speed. Relay device.

2. The relay device according to claim 1, a connection unit (21) configured to set a plurality of lower protocol connections used in a lower layer of the first protocol than the upper protocol, the lower protocol connections being used for connection with one of the first electronic devices, each lower protocol connection being associated with a different external address; and configured to selectively use the lower connection established by the connection unit according to the speed-related information. Relay device.

3. The relay device according to claim 1, The speed-related information is configured to use either information specifying a physical path to which the second electronic device is connected or information of a lower protocol used in a layer below the upper protocol in the second protocol. Relay device.

4. The relay device according to claim 3, The information on the lower protocol includes any one of a TCP / UDP port number, an IP address, a MAC address, a CAN ID, and a CAN channel identification information. Relay device.

5. The relay device according to claim 1, The conversion table is set so that all the inward addresses associated with the same first electronic device have the same value. Relay device.

6. The relay device according to claim 1, The address conversion unit is configured to update the content of the conversion table in accordance with the external address indicating the source indicated in the message of the higher-level protocol received from the first electronic device and information specifying the type of the second protocol used at the destination. Relay device.

7. The relay device according to claim 1, the upper protocol in the first protocol includes DoIP; a lower protocol used in the first protocol at a layer lower than the upper protocol includes TCP; Relay device.

8. The relay device according to claim 1, the second protocol includes any one of DoCAN, UDS, and Ethernet; Relay device.

9. A data relay method for relaying data between a plurality of electronic devices, comprising: Converting between a first protocol used for communication with the first electronic device (4) and a second protocol used for communication with the second electronic device (3), and vice versa; According to a conversion table (231) that links together an external address and an internal address, which are address information used to indicate the first electronic device in an upper protocol, converting the external address indicated in a message from the first electronic device to the second electronic device into the internal address, and converting the internal address indicated in a message from the second electronic device to the first electronic device into the external address; Including, A plurality of the external addresses are assigned to one of the first electronic devices, the conversion table is set so that a different external address is associated with each type of the second protocol identified by the speed-related information; The speed-related information is information used to identify the type of the second protocol based on a difference in communication speed. Data relay method.

10. A program for causing a computer to function as a relay device that relays data between a plurality of electronic devices, The relay device a protocol conversion unit (22) configured to convert between a first protocol used for communication with the first electronic device (4) and a second protocol used for communication with the second electronic device (3); an address conversion unit (23) configured to convert the external address indicated in a message from the first electronic device to the second electronic device into the internal address and to convert the internal address indicated in a message from the second electronic device to the first electronic device into the external address, according to a conversion table (231) that links external addresses and internal addresses, which are address information used to indicate the first electronic device in a higher-level protocol, to each other; Equipped with A plurality of the external addresses are assigned to one of the first electronic devices, the conversion table is set so that a different external address is associated with each type of the second protocol identified by the speed-related information; The speed-related information is information used to identify the type of the second protocol based on a difference in communication speed. program.

Citation Information

Patent Citations

  • repeater

    JP2014078801A