WO2014122711A1 - On-board relay device - Google Patents

On-board relay device Download PDF

Info

Publication number
WO2014122711A1
WO2014122711A1 PCT/JP2013/007523 JP2013007523W WO2014122711A1 WO 2014122711 A1 WO2014122711 A1 WO 2014122711A1 JP 2013007523 W JP2013007523 W JP 2013007523W WO 2014122711 A1 WO2014122711 A1 WO 2014122711A1
Authority
WO
WIPO (PCT)
Prior art keywords
relay
vehicle
unit
identification information
ecu
Prior art date
Application number
PCT/JP2013/007523
Other languages
French (fr)
Japanese (ja)
Inventor
豪 榎崎
充啓 夏目
Original Assignee
株式会社デンソー
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社デンソー filed Critical 株式会社デンソー
Publication of WO2014122711A1 publication Critical patent/WO2014122711A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/64Hybrid switching systems
    • H04L12/6418Hybrid transport

Definitions

  • This disclosure relates to an in-vehicle relay device that relays data to the in-vehicle device.
  • in-vehicle devices are mounted on vehicles, but these in-vehicle devices are classified according to their functions, uses, etc., and a plurality of in-vehicle devices having the same type of functions, uses, etc. are, for example, CAN, An in-vehicle network conforming to a communication protocol such as LIN is formed.
  • each in-vehicle network is connected to a relay device, and in-vehicle devices connected to different in-vehicle networks communicate via the relay device. It is also known that a fault diagnosis of an in-vehicle device is performed by connecting an external device for failure diagnosis to the relay device, and the external device and the in-vehicle device communicate via the relay device.
  • the gateway described in Patent Document 1 includes a gateway control unit having information in which events corresponding to relayed messages, execution timings of the events, and the like are registered, separately from the CPU that performs overall control of the device itself. Prepare. When the gateway control unit receives the message, the gateway control unit executes an event corresponding to the message based on the information at the registered execution timing, thereby reducing the processing load on the CPU and relaying the message at high speed. Done.
  • the relay device has the identification information of each in-vehicle device, the identification information of the in-vehicle network to which the in-vehicle device is connected, etc., and based on these information, between the in-vehicle devices connected to different in-vehicle networks Alternatively, the communication between the external device and the in-vehicle device is relayed.
  • the present disclosure has been made in view of the above points, and an object thereof is to provide an in-vehicle relay device capable of easily adding or replacing an in-vehicle device.
  • the in-vehicle relay device includes a communication unit, a storage unit, a specifying unit, an instruction unit, a registration unit, a generation unit, and a communication unit.
  • the communication unit communicates with each in-vehicle device of a plurality of in-vehicle devices constituting a plurality of in-vehicle networks provided in the vehicle or with an external device provided outside the vehicle.
  • the storage unit stores correspondence information registered in association with logical addresses assigned to each of a plurality of in-vehicle devices and identification information for identifying each of the plurality of in-vehicle devices. ing.
  • the specifying unit When the specifying unit receives relay request data including the target logical address from the in-vehicle device or the external device via the communication unit, the target logical address is the same as one of the plurality of logical addresses registered in the correspondence information. Determine whether. If the specifying unit determines that the target logical address is the same as one of the plurality of logical addresses registered in the correspondence information, the identification information associated with one of the plurality of logical addresses that are the same as the target logical address Is identified. When the specifying unit fails to specify the identification information, the instruction unit broadcasts the instruction data to the plurality of in-vehicle devices via the communication unit.
  • the instruction data is data that instructs one of a plurality of in-vehicle devices to transmit response data including identification information of the target in-vehicle device to the target in-vehicle device to which the target logical address is assigned.
  • the registration unit receives response data corresponding to the instruction data from the target in-vehicle device via the communication unit, the target in-vehicle device identification information included in the response data and the target logical address included in the relay request data Are registered in association with the correspondence information.
  • the specifying unit specifies the identification information
  • the generation unit generates relay data corresponding to the target in-vehicle device identified by the specified identification information, based on the specified identification information and the relay request data.
  • the generation unit further includes the target in-vehicle device based on the identification information included in the response data received from the target in-vehicle device in response to the transmission of the instruction data and the relay request data when the identification unit fails to specify the identification information. Generate relay data corresponding to.
  • the transmission unit transmits the relay data to the target in-vehicle device via the communication unit.
  • the other in-vehicle device is connected to the newly added or replaced in-vehicle device. Even if the physical address, communication protocol, and the like are not known, if the logical address of the destination in-vehicle device is known, data can be transmitted / received via the in-vehicle relay device. Therefore, it is possible to easily add or replace the in-vehicle device.
  • FIG. 1 is a block diagram illustrating a configuration of a gateway according to an embodiment of the present disclosure.
  • FIG. 2 is a block diagram showing the configuration of the routing table.
  • FIG. 3 is an explanatory diagram showing a hierarchical structure of communication functions such as a gateway when application level relay is performed.
  • FIG. 4 is an explanatory diagram showing a hierarchical structure of communication functions such as gateways when network level relaying is performed.
  • FIG. 5 is an explanatory diagram showing the structure of the relay request frame.
  • FIG. 6 is a flowchart of the relay process.
  • FIG. 7 is a flowchart of external communication processing.
  • FIG. 1 is a block diagram illustrating a configuration of a gateway according to an embodiment of the present disclosure.
  • FIG. 2 is a block diagram showing the configuration of the routing table.
  • FIG. 3 is an explanatory diagram showing a hierarchical structure of communication functions such as a gateway when application level relay is performed.
  • FIG. 4 is an explanatory diagram showing
  • FIG. 8 is an explanatory diagram showing the structure of an address resolution instruction frame and an address resolution response frame compliant with CAN when relaying at the application level is performed.
  • FIG. 9 is a flowchart for address resolution when relaying is performed between an external device connected to each in-vehicle network conforming to CAN and the ECU when relaying at an application level is performed.
  • FIG. 10 is an explanatory diagram showing the structure of an address resolution instruction frame and an address resolution response frame compliant with CAN when network level relaying is performed.
  • FIG. 11 is a flowchart for address resolution when relaying is performed between an external device connected to each in-vehicle network compliant with CAN and the ECU when network level relaying is performed.
  • FIG. 9 is a flowchart for address resolution when relaying is performed between an external device connected to each in-vehicle network conforming to CAN and the ECU when relaying at an application level is performed.
  • FIG. 10 is an explanatory diagram showing the structure of an address resolution instruction frame and an
  • FIG. 12 is an explanatory diagram showing the structure of an address resolution instruction frame and an address resolution response frame compliant with LIN when application level relay is performed.
  • FIG. 13 is an explanatory diagram showing the structure of an address resolution instruction frame and an address resolution response frame compliant with FlexRay when application level relay is performed.
  • FIG. 14 is a flowchart for address resolution when relaying is performed between an ECU and an external device connected to each in-vehicle network conforming to different communication protocols.
  • the in-vehicle gateway 10 of the present embodiment is connected to a plurality of in-vehicle networks 40 compliant with a communication protocol such as Controller Area Network (CAN), Local Interconnect Network (LIN), and the like between the ECUs 30 connected to the in-vehicle network 40. It is configured to relay communication (see FIG. 1).
  • the in-vehicle gateway 10 is also referred to as a gateway (GW) 10 for short.
  • the gateway 10 may be connected to a plurality of in-vehicle networks 40 that conform to the same communication protocol.
  • the gateway 10 can communicate with, for example, a smartphone equipped with a failure diagnosis application of the ECU 30 or an external device (EXT DEVICE) 20 configured as a failure diagnosis tool or the like.
  • the external device 20 can perform a failure diagnosis of the ECU 30 by communicating with the ECU 30 via the gateway 10.
  • the external device 20 may communicate with the gateway 10 by wireless communication conforming to a communication protocol such as wireless Local Area Network (LAN), or may be temporarily connected to the in-vehicle network 40, and the in-vehicle network 40 may be You may communicate with the gateway 10 via.
  • the external device 20 may be configured to be accessible to a wireless communication network, and may communicate with the gateway 10 via the wireless communication network.
  • the gateway 10 includes a central processing unit (CPU) 11, a random access memory (RAM) 12, a read only memory (ROM) 13, a communication unit (COMM) 17, a telematics communication unit (TELEMATICS COMM) 16, and the like. Are connected by an internal bus 14.
  • CPU central processing unit
  • RAM random access memory
  • ROM read only memory
  • COMM communication unit
  • TELEMATICS COMM telematics communication unit
  • the CPU 11 operates according to a program stored in the ROM 13 and controls the gateway 10 in an integrated manner.
  • a communication processing unit (COMM PROCESS) 15 for controlling the communication unit 17 is provided.
  • the telematics communication unit 16 is a part for accessing the wireless communication network, and communicates with the external device 20 via the wireless communication network.
  • the communication unit 17 includes, as an example, portions 17a to 17c that perform wireless communication in accordance with wireless LAN (WIRELESS LAN), WiFi, Bluetooth (registered trademark), and the like. Wireless communication is performed.
  • the communication unit 17 includes, for example, parts 17d to 17i that perform communication compliant with CAN, LIN, Media Oriented Systems Transport (MOST), Ethernet (registered trademark), FlexRay, Universal Serial Bus (USB), and the like. ing. By these parts, communication is performed with the ECU 30 configuring the in-vehicle network 40 and the external device 20 temporarily connected to the in-vehicle network 40.
  • CPU11 communicates with ECU30 connected to the external apparatus 20 and the vehicle-mounted network 40 via the communication part 17 by operate
  • a unique logical address is set for each ECU 30 and the external device 20.
  • the relay destination is a logical address. Is specified. It should be noted that logical addresses corresponding to a plurality of ECUs 30 may be provided. In such a case, the logical addresses are designated as relay destinations, so that the corresponding ECUs 30 are relayed simultaneously.
  • the gateway 10 has a routing table indicating a correspondence relationship between a logical address and identification information (for example, a physical address) regarding the ECU 30 or the external device 20 in which the logical address is set. .
  • the routing table is stored in the ROM 13 and the RAM 12, and the gateway 10 searches the routing table to identify information related to the in-vehicle network 40 and the ECU 30 that are relay destinations.
  • the gateway 10 performs address resolution and is necessary for relaying to the ECU 30 or the external device 20 corresponding to the logical address. Information is acquired (details will be described later).
  • ⁇ About routing table> In the routing table 50, an item indicating the “logical address” of each ECU 30 or the external device 20 is provided. Corresponding to the “logical address”, “relay availability information”, “relay buffer size”, “relay type”, “ECU identification information”, “communication protocol”, “in-vehicle network identification information”, “transmission I” Items such as “/ F”, “relay destination buffer size”, and “history information” are provided (see FIG. 2).
  • “Relay enable / disable information” is an item indicating the logical address of the ECU 30 or the external device 20 that is permitted to communicate with the ECU 30 or the like indicated by the corresponding logical address.
  • this item for example, communication from the external device 20 configured as a smartphone possessed by a general user to the ECU 30 such as an airbag is prohibited, and as a result, for example, inappropriate such as stopping the airbag function from the smartphone. Processing is prevented.
  • relay buffer size indicates the size of the relay buffer used when the gateway 10 relays communication to the ECU 30 or the like indicated by the corresponding logical address.
  • Ethernet registered trademark
  • the “relay buffer size” indicates the size of the relay buffer used for such accumulation relay.
  • the “relay type” is an item indicating a method for relaying to the ECU indicated by the logical address corresponding to the gateway 10.
  • a method in addition to the above-described accumulation relay, a method (sequential relay) in which each time a frame is received from the relay source, the frame is modified as necessary and transmitted to the in-vehicle network 40 or the like of the relay destination is considered. It is done. Whether the relay method is the accumulation relay or the sequential relay is determined based on, for example, the communication speed of the in-vehicle network 40 that is the relay destination.
  • ECU identification information is an item indicating identification information (for example, physical address) related to the ECU 30 or the like indicated by the corresponding logical address.
  • the item includes, for example, information necessary for communication such as a CAN-ID used at the time of transmission to the ECU 30 or the like or a response from the ECU 30 or the like. Used to allocate.
  • the “communication protocol” indicates a communication protocol of the in-vehicle network 40 to which the ECU 30 or the like indicated by the corresponding logical address is connected, or a communication protocol when performing wireless communication with the external device 20 indicated by the logical address.
  • in-vehicle network identification information indicates identification information of the in-vehicle network 40 to which the ECU 30 or the like indicated by the corresponding logical address is connected.
  • the “transmission I / F” is a relay when the communication protocol of the in-vehicle network 40 to which the ECU 30 or the like (relay destination ECU 30 or the like) indicated by the corresponding logical address is connected and the relay in-vehicle network 40 is different. A frame conversion method is shown.
  • the “relay destination buffer size” indicates the communication buffer size provided in the ECU 30 or the like corresponding to the logical address.
  • the gateway 10 determines the data length of the frame relayed to the ECU 30 in consideration of the buffer size.
  • “History information” indicates a record of relay to the ECU 30 or the like corresponding to the logical address.
  • the “history information” may be stored in the RAM 12 or a rewritable nonvolatile memory (not shown) (flash memory or the like).
  • the routing table 50 includes a portion (preset table) stored in the ROM 13 (or a flash memory (not shown)) and a portion (cache table) stored in the RAM 12 (or a flash memory (not shown)). Exists.
  • the logical addresses of the ECU 30 and the external device 20 that are scheduled to communicate are registered in the preset table.
  • the logical address of the ECU 30 and the like newly connected to the in-vehicle network 40 is registered in the cache table by address resolution described later.
  • the communication function is hierarchized into an application layer (AP), a transport layer (TP), a network layer (NW), a data link layer (DL), and a physical layer (PH) (see FIGS. 3 and 4).
  • AP application layer
  • TP transport layer
  • NW network layer
  • DL data link layer
  • PH physical layer
  • the gateway 10 can perform relaying by two types of storage relays and sequential relays. However, when relaying by each method is performed, processing performed in each layer of the communication function Are partly different.
  • the accumulation relay is performed (see FIG. 3).
  • the accumulation relay is mainly performed when relaying communication of the ECU 30 or the external device 20 connected to the in-vehicle network 40 conforming to a different communication protocol. (Of course, it may be performed when relaying communication between the ECU 30 and the external device 20 connected to the in-vehicle network 40 compliant with the same communication protocol).
  • accumulation relay is also mainly performed when relaying communication between the external device 20 that communicates with the gateway 10 and the ECU 30 via a wireless LAN, a wireless communication network, or the like.
  • accumulation relay When accumulation relay is performed, relay and address resolution are performed at the center of the AP layer (in other words, accumulation relay is an application-level relay).
  • the communication unit 17 functions as a DL layer and a physical layer
  • the communication processing unit 15 functions as a TP layer and an NW layer.
  • the gateway 10 is provided with a GW control unit (GW CONTROL) 11a and an address resolution unit (ADS SOLV) 11b as programs for controlling the CPU 11, and these function as an AP layer.
  • GW CONTROL GW control unit
  • ADS SOLV address resolution unit
  • the ECU 30 includes a communication processing unit 33 (communication unit 33) that controls the communication unit 34 by the communication unit 34 (COMM) that performs communication conforming to the communication protocol of the in-vehicle network 40 to which the device is connected functioning as the DL layer and physical layer.
  • COMM PROCESS functions as the TP layer and NW layer.
  • the ECU 30 is provided with a server unit (SERVER) 31 and an address resolution unit (ADS SOLV) 32 which are programs for controlling the CPU and function as an AP layer.
  • the server unit 31 communicates with another ECU 30 and the external device 20 via the gateway 10, and the address resolution unit 32 performs the above-described processing for address resolution.
  • the external device 20 includes a communication processing unit (COMM) 22 that performs communication conforming to a predetermined communication protocol and functions as a DL layer and a physical layer, and a communication processing unit (COMM PROCESS) 22 that controls the communication unit 23. It functions as a TP layer and NW layer.
  • a client unit (CLIENT) 21 that is a program for controlling the CPU of the external device 20 and functions as an AP layer is provided. The client unit 21 communicates with the ECU 30 via the gateway 10, A failure diagnosis of the ECU 30 is performed.
  • the GW control unit 11a of the gateway 10 receives these relay request frames via the communication unit 17 and the communication processing unit 15.
  • the data is stored in a buffer provided in the RAM 12.
  • the GW control unit 11a based on the logical address set as the relay destination in the relay request frame, from the routing table 50 to the physical address of the relay destination ECU 30 and the in-vehicle network 40 The identification information and the like are searched. Based on the search result, a relay frame corresponding to the relay destination is generated and sent to the in-vehicle network 40 to which the relay destination ECU 30 is connected via the communication processing unit 15 and the communication unit 17.
  • the address resolution unit 11b performs the above-described processing for address resolution.
  • the sequential relay is mainly performed when relaying communication between the ECU 30 and the external device 20 connected to the in-vehicle network 40 compliant with the same communication protocol (of course, the in-vehicle network compliant with different communication protocols).
  • 40 may be performed when relaying communication between the ECU 30 connected to 40 and the external device 20).
  • FIG. 4 shows, as an example, a case where communication between the external device 20 connected to a different in-vehicle network 40 compliant with CAN and the ECU 30 is relayed.
  • sequential relay When sequential relay is performed, relay and address resolution are performed mainly in the NW layer, TP layer, and AP layer (in other words, sequential relay can be said to be relay at the network level).
  • the communication unit 17 functions as a DL layer and a physical layer.
  • the gateway 10 is provided with a router control unit (ROUTER CONTROL) 15a and an address resolution unit (ADS SOLV) 15b, which are composed of a program for controlling the CPU 11 and a communication processing unit 15. It functions as a TP layer and NW layer.
  • ROUTER CONTROL router control unit
  • ADS SOLV address resolution unit
  • the communication unit 34 functions as a DL layer and a physical layer
  • the communication processing unit 33 functions as a TP layer and an NW layer
  • the server unit 31 functions as an AP layer.
  • an address resolution unit (ADS SOLV) 35 including a program for controlling the CPU and a communication processing unit 33 is provided.
  • the address resolution unit 35 functions as an AP layer, a TP layer, and an NW layer. The above-described processing for address resolution is performed.
  • the external device 20 has a configuration similar to that in the case where accumulation relay is performed.
  • the router control unit 15a of the gateway 10 receives the relay request frame via the communication unit 17. Further, the router control unit 15a searches the routing table 50 for identification information of the ECU 30 and the in-vehicle network 40 from the routing table 50 based on the logical address set as the transmission destination in the relay request frame.
  • the router control unit 15a modifies the relay request frame as necessary based on the search result, generates a relay frame, and transmits the relay frame to the in-vehicle network 40 to which the ECU 30 as the transmission destination is connected via the communication unit 17. To do.
  • the in-vehicle network 40 is compliant with CAN, it may be possible to convert the CAN-ID according to the transmission destination.
  • the address resolution unit 15b performs the above-described processing for address resolution.
  • the relay request frame 60 transmitted from the relay ECU 30 or the like to the gateway 10 when relaying by the gateway 10 is generally composed of a protocol dependent unit 61, a source address 62, a target address 63, a message 64, and the like. (See FIG. 5).
  • the protocol dependent unit 61 is data for transmission from the ECU 30 or the like of the relay source (transmission source of the relay request frame 60) to the gateway 10, and is determined according to the communication protocol between these devices.
  • the source address 62 is data indicating a logical address of the relay source ECU 30 or the external device 20.
  • the target address 63 is data indicating a logical address of the relay destination ECU 30 or the external device 20.
  • the target address is also called a target logical address.
  • the message 64 is data indicating the contents of instructions to the relay destination ECU 30 or the like.
  • a transmission request for data stored in a failure code or a specified address is used as a message.
  • a response to the failure diagnosis is sent from the ECU 30 to the external device 20
  • a failure code or data read in response to an instruction from the external device 20 may be used as a message.
  • each part is expressed as S100, for example.
  • each part can be divided into a plurality of sub-parts, while the plurality of parts can be combined into one part.
  • each part configured in this manner can be referred to as a device, a module, and a means.
  • the CPU 11 of the gateway 10 waits for reception of the relay request frame 60 from the ECU 30 or the external device 20. It is assumed that the relay request frame 60 is received from the in-vehicle network 40, received via wireless communication, or received from the wireless communication network via the telematics communication unit 16. Then, when the CPU 11 receives the relay request frame 60, the process proceeds to S105.
  • the CPU 11 specifies the source address 62 of the received relay request frame 60 as a logical address of the relay source ECU 30 and the like, and specifies the target address 63 as a logical address of the relay destination ECU 30 and the like. Then, the CPU 11 searches the routing table 50 for the logical address of the relay destination.
  • the CPU 11 determines whether or not the search of the logical address of the relay destination has succeeded. If the search is successful (S110: Yes), the process proceeds to S130, and if the search has failed (S110). : No), the process proceeds to S115.
  • the CPU 11 broadcasts an address resolution instruction frame (details will be described later) to all ECUs 30 and external devices 20 connected to the gateway 10 via the in-vehicle network 40 or wireless communication.
  • This address resolution instruction frame contains the logical address of the relay destination, and instructs the ECU 30 or the like indicated by the logical address to transmit identification information of the own device to the gateway 10.
  • the identification information may be a physical address of the ECU 30 indicated by the logical address of the relay destination. Further, when the communication protocol of the in-vehicle network 40 to which the ECU 30 is connected is CAN, it may be a CAN-ID used for transmission to the ECU 30 or for a response.
  • a configuration may be adopted in which the in-vehicle network 40, the ECU 30, and the like that are targets for address resolution are determined in advance, and address resolution instruction frames are broadcasted for these.
  • the CPU 11 determines whether or not an address resolution response frame including the identification information of the ECU 30 is received from the ECU 30 indicated by the logical address of the relay destination, and when an affirmative determination is obtained (S120). : Yes), the process proceeds to S125.
  • the CPU 11 newly registers the logical address of the relay destination in the routing table 50 (cache table), and is included in the received address resolution response frame as “ECU identification information” corresponding to the logical address. Registered identification information.
  • the CPU 11 identifies the identification information and communication protocol of the in-vehicle network 40 that has received the address resolution response frame, and registers them as “in-vehicle network identification information” and “communication protocol” corresponding to the logical address of the relay destination.
  • the CPU 11 determines a relay buffer size that can be used when relaying communication to the ECU 30 or the like indicated by the logical address of the relay destination, and registers it as a “relay buffer size” corresponding to the logical address.
  • the CPU 11 determines the relay method and frame conversion method based on the communication speed of the in-vehicle network 40 to which the ECU 30 or the like indicated by the relay destination logical address is connected, and the “relay type”, corresponding to the logical address, Register as “Communication I / F”. Note that the CPU 11 may communicate with the ECU 30 or the like and determine a relay method or a frame conversion method based on information acquired from the ECU 30 or the like.
  • the CPU 11 communicates with the ECU 30 or the like indicated by the logical address of the relay destination, acquires a logical address indicating the ECU 30 or the like permitted to communicate with the ECU 30 or the like, and has a communication buffer size provided in the ECU 30 or the like. (Of course, these pieces of information may be included in the address resolution response frame).
  • the acquired logical address and buffer size are registered as “relay availability information” and “relay destination buffer size” corresponding to the logical address.
  • the CPU 11 In subsequent S130, the CPU 11 generates a new relay frame from the received relay request frame based on the information registered in the routing table 50 corresponding to the logical address of the relay destination, and then transmits the relay frame to the relay destination. To the ECU 30 (S135), and the relay process is terminated. If an address resolution response frame is received, the CPU 11 may generate a relay frame based on the address resolution response frame, the received relay request frame, or the like.
  • the CPU 11 determines whether the logical address of the relay source ECU 30 or the like is registered in the “relay enable / disable information” of the relay destination logical address, and if not, ends the relay process. The reception of the next relay request frame 60 is awaited.
  • the CPU 11 when the logical address of the relay source is registered, the CPU 11 refers to the “relay type” corresponding to the logical address of the relay destination, and determines the relay method such as whether the relay method is accumulation relay or sequential relay. Determine.
  • the CPU 11 relays sequentially regardless of the relay method indicated by the “relay type”. You may choose to do.
  • the CPU 11 refers to “ECU identification information”, “communication protocol”, “in-vehicle network identification information”, “transmission I / F”, and “relay destination buffer size” corresponding to the logical address of the relay destination. Then, based on the information indicated by these items, the CPU 11 identifies a relay frame generation method corresponding to the communication protocol of the relay destination ECU 30 or the in-vehicle network 40 from the received relay request frame.
  • the relay method is accumulation relay
  • a new relay frame is generated based on the received relay request frame in accordance with the generation method, and the relay destination ECU 30 or the like The transmission of the relay frame to is started.
  • the CPU 11 every time the relay request frame is received, the CPU 11 generates a new relay frame based on the relay request frame according to the above generation method, and transmits it to the relay destination ECU 30 or the like. At this time, the CPU 11 may transmit the received relay request frame as it is to the relay destination ECU 30.
  • the CPU 11 interrupts the relay and shifts the process to S100.
  • the CPU 11 measures the data size of the relayed frame and the time required for relaying. When the relaying is completed, these pieces of information are used as “history information” corresponding to the logical address of the relay destination. After that, the process proceeds to S100.
  • the ECU 30 and the external device 20 transmit data to the relay destination by transmitting to the gateway 10 a relay request frame in which the logical addresses of the ECU 30 and the external device 20 serving as the relay destination are set. Can do. For this reason, the ECU 30 or the like communicates with other ECUs 30 or the like via the gateway 10 as long as it knows the logical address even if it does not know the physical address or communication protocol of the relay destination ECU 30 or the like. be able to.
  • the gateway 10 can relay data to the ECU 30 or the like even if the gateway 10 does not grasp the identification information regarding the ECU 30 or the like of the transmission destination.
  • the communication is performed via the gateway 10. It can be carried out.
  • the external device 20 knows the logical address of the newly added ECU 30, it can communicate with the ECU 30 via the gateway 10 to perform failure diagnosis of the ECU 30. .
  • the external device 20 activates an in-vehicle cooperation application for performing failure diagnosis, various settings, and the like of the ECU 30, etc., and proceeds to S205.
  • the external device 20 displays abstract vehicle functions and diagnostic items such as an engine, a brake, and an air conditioner on a display, and accepts selection of these functions and the like via a touch panel or the like.
  • Each function or the like is associated with a logical address of one or a plurality of ECUs 30 related thereto, and a target ECU 30 for failure diagnosis is set by accepting selection of the function or the like.
  • the external device 20 accepts an input of a measure (for example, failure diagnosis contents or various setting changes) that the user intends to perform on the function or the like.
  • the external device 20 In subsequent S210, the external device 20 generates a relay request frame 60 to be transmitted to the target ECU 30 based on the input content from the user. That is, the external device 20 generates the protocol dependence unit 61 based on the communication protocol with the gateway 10. The external device 20 sets the logical address of the target ECU 30 as the target address 63 and sets the logical address of its own device as the source address 62.
  • the external device 20 generates a message 64 (for example, a request for transmitting a data stored in a failure code or a specified address, a request for changing a set value of the ECU 30) corresponding to the input action. .
  • the external device 20 generates a relay request frame 60 based on these, and transmits the relay request frame 60 to the gateway 10.
  • the external device 20 waits to receive a relay frame as a response from the target ECU 30 via the gateway 10.
  • the external device 20 displays processing corresponding to the content of the message in the relay frame (for example, processing for displaying a fault code and read data, and a result of changing the set value of the ECU 30). And the process proceeds to S205.
  • the external device 20 can communicate with the ECU 30 via the gateway 10 as long as it knows the logical address even if it does not know the physical address and communication protocol of the ECU 30. Furthermore, even when the ECU 30 is added or exchanged and the physical address of the ECU 30 or the ID of the frame used for communication changes, the address resolution is performed by the gateway 10, so the external device 20 can add the ECU 30, etc. Communication can be performed in the same manner as before.
  • the external device 20 for failure diagnosis can communicate with the ECU 30 regardless of the manufacturer, the vehicle type, and the type of the vehicle type, and the external device 20 can be used properly according to the manufacturer or the like. It is possible to perform fault diagnosis generically without using different apps.
  • the external device 20 for failure diagnosis can provide a failure diagnosis function based on abstract vehicle functions and diagnosis items, as in the above-described external communication processing. For this reason, even if the user does not have advanced in-vehicle network knowledge such as the physical address of the ECU 30 and the ID of the frame used for failure diagnosis, the user can easily perform failure diagnosis of the target using the external device 20. be able to.
  • a smartphone as the external device 20
  • a general user can easily perform a failure diagnosis.
  • an ID indicating broadcast transmission is set as the CAN-ID 301.
  • the data field is composed of N_PCI (Network Protocol Control Information) 302, SID (Service ID) 303, transmission destination logical address 304, transmission source logical address 305, and option 306 (see FIG. 8).
  • N_PCI 302 indicates the type of frame such as SF (Single Frame) or FF (First Frame), and SID 303 indicates the content of the instruction by the address resolution instruction frame 300. Further, the transmission destination logical address 304 indicates a logical address of the relay destination ECU 30 or the like, the transmission source logical address 305 indicates a logical address of the relay source ECU 30 or the like, and the option 306 indicates various information related to address resolution. Show.
  • an ID indicating that the gateway 10 is the transmission destination is set as the CAN-ID 311.
  • the data field includes N_PCI 312, RSID (Response Service ID) 313, Type 314, Request CAN-ID 315, Response CAN-ID 316, and Option 317.
  • RSID 313 indicates the response content by the address resolution response frame 310
  • Type 314 indicates the communication protocol of the in-vehicle network 40 as a relay destination.
  • the request CAN-ID 315 indicates a CAN-ID used for transmission to the relay destination ECU 30 or the like
  • the response CAN-ID 316 indicates a CAN-ID used for a response from the relay destination ECU 30 or the like.
  • a CAN-ID for failure diagnosis of the ECU 30 is set as the request CAN-ID 315 and the response CAN-ID 316.
  • the external device 20 (logical address is 0xE403 as an example) transmits a relay request frame to the gateway 10 (logical address is 0x1000 as an example) in order to transmit data to the AECU 30a (logical address is 0x100A as an example).
  • the logical address is binary data or an object having a defined structure, but is described as binary data in this example.
  • a relay request frame configured as SF is transmitted.
  • the relay request frame configured as FF is transmitted a plurality of times. That is, the relay request frame configured as FF is first transmitted from the external device 20 to the gateway 10, and FC (Flow Control) is transmitted from the gateway 10 to the external device 20 as a response thereto. Thereafter, a relay request frame configured as a CF is transmitted from the external device 20 to the gateway 10, and an FC is returned from the gateway 10 to the external device 20. Thereafter, until the transmission is completed, the external device 20 and the gateway 10 Alternately transmit CF (relay request frame) and FC.
  • CF Consecutive Frame
  • the gateway 10 When the gateway 10 receives the relay request frame, the gateway 10 searches the routing table 50 for the logical address of the relay destination AECU 30a by the relay processing described above (S405), and if the search fails, processing for address resolution is performed. I do.
  • the gateway 10 broadcasts an address resolution instruction frame to all connected in-vehicle networks 40 and waits for reception of an address resolution response frame from the relay destination AECU 30a (S410).
  • the above-described address resolution instruction frame 300 is broadcasted to the in-vehicle network 40 compliant with CAN.
  • the ECU 30 other than the AECU 30a receives the address resolution instruction frame, it ignores the address resolution instruction frame because the destination logical address does not indicate its own logical address.
  • the gateway 10 When the gateway 10 receives the address resolution response frame 310 from the AECU 30a, the gateway 10 registers the logical address, identification information, and the like of the AECU 30a in the routing table 50 (cache table) (S415).
  • the gateway 10 may perform processing for address resolution after completion of reception of the relay request frame from the external device 20, or may be performed in parallel with reception of the relay request frame.
  • the gateway 10 completes reception of the relay request frame from the external device 20, and when registration of the AECU 30a is completed, the gateway 10 generates a relay frame corresponding to the AECU 30a from the received relay request frame, and sends the relay frame to the AECU 30a. Transmit (S420).
  • the relay frames configured as FF and CF are transmitted a plurality of times.
  • the AECU 30a transmits a relay request frame as a response using the external device 20 as a relay destination (S425).
  • the gateway 10 When the reception of these relay request frames is completed, the gateway 10 generates a relay frame corresponding to the external device 20 from the relay request frame received with reference to the routing table 50, and transmits the relay frame to the external device 20. (S430).
  • a relay request frame configured as FF or CF is transmitted a plurality of times.
  • the gateway 10 when relaying communication between the ECU 30 and the like connected to each in-vehicle network 40 that complies with a communication protocol other than CAN at the application level, the gateway 10 similarly performs address resolution.
  • an ID indicating broadcast transmission is set as the CAN-ID 321.
  • the data field includes N_PCI 322 (4 bits) in which data indicating an address resolution instruction (for example, 1111b) is set, a transmission destination logical address 323, a transmission source logical address 324, and an option 325 (see FIG. 10). .
  • an ID that can be received by the gateway 10 is set as the CAN-ID 331.
  • the data field includes N_PCI 332 (4 bits) in which data indicating an address resolution response (for example, 1110b) is set, a request CAN-ID 333, a response CAN-ID 334, and an option 335.
  • N_PCI 322 and 332 indicate the type of frame such as SF, FF, etc.
  • an address resolution instruction and an address resolution response are provided as one of the types.
  • the transmission destination logical address 323, the transmission source logical address 324, the request CAN-ID 333, the response CAN-ID 334, and the options 325 and 335 are the same components as when relaying is performed at the application level.
  • the external device 20 transmits a relay request frame configured as FF to the gateway 10 in order to transmit data exceeding 8 bytes to the AECU 30a.
  • the gateway 10 When the gateway 10 receives the relay request frame, the gateway 10 searches the routing table 50 for the logical address of the relay destination AECU 30 by the relay processing described above (S505), and if the search fails, performs processing for address resolution. Do.
  • the gateway 10 broadcasts an address resolution instruction frame to all the in-vehicle networks 40 and waits for reception of an address resolution response frame 330 from the relay destination AECU 30a (S510). Note that the above-described address resolution instruction frame 320 is broadcasted to the in-vehicle network 40 compliant with CAN.
  • the ECU 30 other than the AECU 30a receives the address resolution instruction frame, it ignores the address resolution instruction frame because the destination logical address does not indicate its own logical address.
  • the gateway 10 When the gateway 10 receives the address resolution response frame 330 from the AECU 30a, the gateway 10 registers the logical address, identification information, and the like of the AECU 30a in the routing table 50 (S515).
  • the gateway 10 In subsequent S520, the gateway 10 generates a relay frame (FF) corresponding to the AECU 30a from the received relay request frame, and transmits the relay frame to the AECU 30a.
  • FF relay frame
  • the gateway 10 receives the FC from the AECU 30a as a response to the relay frame, the gateway 10 generates an FC (relay frame) corresponding to the external device 20 that is the relay source, and transmits the FC to the external device 20.
  • the external device 20 that has received the FC transmits a relay request frame configured as a CF to the gateway 10.
  • the gateway 10 receives the relay request frame, the gateway 10 generates a relay frame (CF) corresponding to the AECU 30a from the relay request frame, and transmits the relay frame to the AECU 30a.
  • CF relay frame
  • the gateway 10 alternately relays the FC from the AECU 30a and the relay request frame (CF) from the external device 20 until the data transmission by the external device 20 is completed.
  • FC the relay request frame
  • the AECU 30a starts transmission of response data exceeding 8 bytes to the external device 20 after the completion of reception of the relay frame (S525).
  • the AECU 30a first transmits a relay request frame configured as FF to the gateway 10 with the AECU 30a as a relay destination.
  • the gateway 10 When the gateway 10 receives the relay request frame, the gateway 10 generates a relay frame (FF) corresponding to the external device 20 from the relay request frame, and transmits the relay frame to the external device 20.
  • the gateway 10 receives an FC from the external device 20 as a response to the relay frame, the gateway 10 generates an FC (relay frame) corresponding to the relay source AECU 30a, and transmits the FC to the AECU 30a.
  • FF relay frame
  • FC relay frame
  • the AECU 30 a that has received the FC transmits a relay request frame configured as a CF to the gateway 10.
  • the gateway 10 receives the relay request frame, the gateway 10 generates a relay frame (CF) corresponding to the external device 20 from the relay request frame and transmits the relay frame (CF) to the external device 20.
  • CF relay frame
  • the gateway 10 alternately relays the FC from the external device 20 and the relay request frame (CF) from the AECU 30a until the transmission by the AECU 30a is completed.
  • FC relay request frame
  • the external device 20 or the AECU 30a transmits data of 8 bytes or less
  • the external device 20 or the like transmits one relay request frame configured as SF. In the same way, relaying is performed after address resolution is performed as necessary.
  • the gateway 10 when relaying communication between the ECUs 30 and the like connected to each in-vehicle network 40 compliant with a communication protocol other than CAN at the network level, the gateway 10 similarly performs address resolution.
  • the address resolution instruction frame 300 and the address resolution response frame 310 shown in FIG. 8 are used.
  • an ID indicating an address resolution instruction (for example, 0x3C) is set in the ID field 341.
  • the data field includes a node address 342, PCI (Protocol Control Information) 343, SID 344, transmission destination logical address 345, transmission source logical address 346, and option 347.
  • PCI Protocol Control Information
  • the node address 342 is set to broadcast (for example, 0x7E), the PCI 343 indicates the type of frame such as SF, FF, etc., and the SID 344 indicates the content of the instruction by the address resolution instruction frame 340. Further, the transmission destination logical address 345 indicates the logical address of the relay destination ECU 30 and the like, the transmission source logical address 346 indicates the logical address of the relay source ECU 30 and the like, and the option 347 displays various information related to address resolution. Show.
  • 0x3D that is an ID indicating an address resolution response is set in the ID field 351.
  • the data field includes a node address 352, a PCI 353, an RSID 354, a relay destination node address 355, and an option 356.
  • the node address 352 is set with an ID (for example, 0x70) indicating the gateway 10, the RSID 354 indicates the response content by the address resolution response frame 350, and the relay destination node address 355 is the node address of the relay destination ECU 30 or the like. Indicates.
  • 0x100 which is an ID indicating an address resolution instruction is set in the frame ID 361.
  • the data field is composed of TA (Target Address) 362, SA (Source Address) 363, PCI 364, transmission destination logical address 365, transmission source logical address 366, and the like.
  • TA 362 is set with an ID indicating broadcast
  • SA 363 is set with an ID that can be received by the gateway 10
  • PCI 364 indicates a frame type such as SF (Start Frame), CF, or the like.
  • the transmission destination logical address 365 indicates a logical address of the relay destination ECU 30 and the like
  • the transmission source logical address 366 indicates a logical address of the relay source ECU 30 and the like.
  • 0x101 which is an ID indicating an address resolution response is set in the frame ID 371, and the data field is composed of TA372, SA373, PCI374 and the like.
  • the TA 372 is set with an ID that can be received by the gateway 10, and the SA 373 is set with the physical address of the transmission source of the address resolution response frame 370 (in other words, the physical address of the relay destination ECU 30 or the like).
  • the external device 20 transmits a relay request frame to the gateway 10 to transmit data to the AECU 30a.
  • the relay request frame is transmitted once or a plurality of times according to the data size.
  • the gateway 10 searches the routing table 50 for the logical address of the relay destination AECU 30a by the relay processing described above (S605). I do.
  • the gateway 10 broadcasts an address resolution instruction frame to all connected in-vehicle networks 40, and waits for reception of an address resolution response frame from the relay destination AECU 30a (S610).
  • the above-described address resolution instruction frames 300, 340, and 360 are broadcasted to the in-vehicle network 40 that conforms to CAN, LIN, and FlexRay, respectively.
  • the ECU 30 other than the AECU 30a receives the address resolution instruction frame, it ignores the address resolution instruction frame because the destination logical address does not indicate its own logical address.
  • the gateway 10 when the gateway 10 receives the address resolution response frame from the AECU 30a, the gateway 10 registers the logical address, identification information, and the like of the AECU 30a in the routing table 50 (S615).
  • the gateway 10 completes reception of the relay request frame from the external device 20, and when registration of the AECU 30a is completed, the gateway 10 generates a relay frame corresponding to the AECU 30a from the received relay request frame, and sends the relay frame to the AECU 30a. Transmit (S620). At this time, the relay frame is transmitted once or a plurality of times according to the data size to be relayed, the communication protocol of the in-vehicle network 40 as the relay destination, and the like.
  • the AECU 30a transmits a relay request frame as a response using the external device 20 as a relay destination (S625).
  • the gateway 10 When the reception of these relay request frames is completed, the gateway 10 generates a relay frame corresponding to the external device 20 from the received relay request frame, and transmits the relay frame to the external device 20 (S630).
  • relaying and address resolution are performed between the external device 20 and the ECU 30 connected to the same in-vehicle network 40 and between the ECUs 30 in the same manner as in the second specific example.
  • Ethernet is used as the communication protocol of the in-vehicle network 40
  • ARP Address Resolution Protocol
  • Address resolution may be performed by By doing so, it is possible to divert existing resources, and it is possible to improve reliability while suppressing development costs.
  • ARP assumes address resolution of a PC or the like
  • the frame configuration and procedure used are more complicated than address resolution of this embodiment.
  • address resolution is performed by a simple configuration frame or procedure as in this embodiment. It is considered preferable to do so.
  • a relay buffer is secured in advance for each of a plurality of in-vehicle networks connected to the gateway.
  • a relay buffer corresponding to the in-vehicle network as a relay destination is used. It has become the composition which uses. For this reason, as the number of in-vehicle networks increases, the size of the relay buffer to be secured in advance increases, and there is a problem that the capacity of the RAM is depleted.
  • the gateway 10 of the present embodiment when a relay area common to each in-vehicle network 40 is provided and relaying is performed, a relay having a size corresponding to the communication protocol of the relay-mounted in-vehicle network 40 is performed from the relay area.
  • a configuration may be adopted in which the buffer for use is dynamically secured. By doing so, the RAM capacity required for relaying can be saved.
  • the gateway 10 of the present embodiment is configured to be communicable with the external device 20, it may be configured to relay communication between the ECUs 30 without communicating with the external device 20. Even if it has such a structure, the same effect can be acquired.
  • the gateway 10 corresponds to an in-vehicle relay device
  • the ECU 30 corresponds to an in-vehicle device
  • the communication processing unit 15, the telematics communication unit 16, and the communication unit 17 of the gateway 10 correspond to a communication unit
  • the RAM 12 and the ROM 13 correspond to a storage unit.
  • routing table 50 corresponds to correspondence information
  • the relay request frame 60 corresponds to relay request data
  • the relay frame corresponds to relay data
  • the address resolution instruction frames 300, 320, 340, and 360 correspond to instruction data
  • the address resolution response frames 310, 330, 350, and 370 correspond to response data.
  • S105 of the relay process corresponds to a specifying unit
  • S115 corresponds to an instruction unit
  • S125 corresponds to a registration unit
  • S130 corresponds to a generation unit
  • S135 corresponds to a transmission unit.
  • the above disclosure includes the following aspects.
  • the in-vehicle relay device 10 includes communication units 15 to 17, storage units 12 and 13, a specification unit S105, an instruction unit S115, a registration unit S125, a generation unit S130, and a communication unit S135.
  • the communication units 15 to 17 communicate with each in-vehicle device of the plurality of in-vehicle devices 30 constituting the plurality of in-vehicle networks 40 provided in the vehicle or with the external device 20 provided outside the vehicle.
  • a logical address assigned to each part of the plurality of in-vehicle devices 30 and identification information for identifying each part of the plurality of in-vehicle devices 30 are registered in association with each other. Correspondence information 50 is stored.
  • the specifying unit S105 When the specifying unit S105 receives the relay request data 60 including the target logical address from the in-vehicle device 30 or the external device 20 via the communication units 15 to 17, a plurality of target logical addresses registered in the correspondence information 50 are received. Determine if it is the same as one of the logical addresses. If the identifying unit S105 determines that the target logical address is the same as one of the plurality of logical addresses registered in the correspondence information 50, the identifying unit S105 associates the target logical address with one of the plurality of logical addresses that are the same as the target logical address. Identify identification information.
  • the instruction unit S115 broadcasts the instruction data 300, 320, 340, 360 to the plurality of in-vehicle devices 30 via the communication units 15-17.
  • the instruction data 300, 320, 340, 360 is response data 310, 330, 350 including identification information of the target in-vehicle device with respect to the target in-vehicle device to which the target logical address is assigned.
  • 370 is data instructing to transmit 370 to the communication units 15 to 17.
  • the registration unit S125 When the registration unit S125 receives response data 310, 330, 350, 370 corresponding to the instruction data 300, 320, 340, 360 from the target in-vehicle device via the communication units 15-17, the response data 310, 330, 350, The identification information of the target in-vehicle device included in 370 and the target logical address included in the relay request data 60 are registered in association with the correspondence information 50.
  • the identification unit S105 identifies the identification information
  • the generation unit S130 generates relay data corresponding to the target in-vehicle device identified by the identified identification information based on the identified identification information and the relay request data 60. .
  • the generating unit S130 adds the response data 310, 330, 350, 370 received from the target in-vehicle device in response to the transmission of the instruction data 300, 320, 340, 360. Based on the included identification information and the relay request data 60, relay data corresponding to the target in-vehicle device is generated.
  • the transmission unit S135 transmits the relay data to the target in-vehicle device via the communication units 15-17.
  • the in-vehicle device 30 and the external device 20 transmit the relay request data 60 in which the logical addresses of the in-vehicle device 30 and the external device 20 that are transmission destinations are set to the in-vehicle relay device 10.
  • data can be transmitted to the in-vehicle device 30 as the transmission destination.
  • the in-vehicle device 30 does not know the physical address or communication protocol of the destination in-vehicle device 30 or the like, as long as it knows the logical address, the in-vehicle device 30 etc. It is possible to communicate with the in-vehicle device 30 and the like.
  • the in-vehicle relay device 10 broadcasts instruction data 300, 320, 340, 360 to resolve the address.
  • the identification information related to the in-vehicle device 30 corresponding to the target logical address is registered in the correspondence information 50.
  • the in-vehicle relay device 10 can relay data to the in-vehicle device 30 or the like without knowing the identification information regarding the destination in-vehicle device 30 or the like.
  • the other in-vehicle device 30 grasps the logical address of the newly added in-vehicle device 30. If so, data can be transmitted and received via the in-vehicle relay device 10. Similarly, for the external device 20, if the logical address of the newly added in-vehicle device 30 is grasped, data is transmitted / received to / from the in-vehicle device 30 via the in-vehicle relay device 10, and A failure diagnosis of the device 30 can be performed. Therefore, according to the in-vehicle relay device 10, it is possible to easily add or replace the in-vehicle device.
  • the relay request data 60 may be data transmitted from one of the plurality of in-vehicle devices 30 to another in-vehicle device 30. Further, the relay request data 60 is transmitted from the external device 20 temporarily connected to the communication units 15 to 17 to one of the plurality of in-vehicle devices 30 in order to perform one failure diagnosis of the plurality of in-vehicle devices 30. It may be data.

Abstract

An on-board relay device (10) is provided with: a communication unit (15 to 17), a storage unit (12, 13), an identification unit (S105), an instruction unit (S115), a registration unit (S125), a generation unit (S130), and a communication unit (S135). The communication unit performs communications with an on-board device or an external device. The storage unit stores associating information associating a logic address of the on-board device with identification information. The identification unit, upon reception of relay request data including a target logic address, determines whether the target logic address is registered in the associating information, and identifies the identification information associated with the target logic address. If the identifying of the identification information is unsuccessful, the instruction unit broadcasts instruction data to a target on-board device instructing the device to transmit response data including identification information. The generation unit generates relay data on the basis of the identified identification information or the identification information included in the response data, and of the relay request data.

Description

車載用中継装置In-vehicle relay device 関連出願の相互参照Cross-reference of related applications
 本開示は、2013年2月5日に出願された日本出願番号2013-020499号に基づくもので、ここにその記載内容を援用する。 This disclosure is based on Japanese Patent Application No. 2013-020499 filed on February 5, 2013, the contents of which are incorporated herein.
 本開示は、車載装置へのデータの中継を行う車載用中継装置に関する。 This disclosure relates to an in-vehicle relay device that relays data to the in-vehicle device.
 近年では、車両には多くの車載装置が搭載されているが、これらの車載装置はその機能,用途等に応じて分類され、同種の機能,用途等を有する複数の車載装置は、例えばCAN,LIN等の通信プロトコルに準拠した車載ネットワークを形成している。 In recent years, many in-vehicle devices are mounted on vehicles, but these in-vehicle devices are classified according to their functions, uses, etc., and a plurality of in-vehicle devices having the same type of functions, uses, etc. are, for example, CAN, An in-vehicle network conforming to a communication protocol such as LIN is formed.
 そして、各車載ネットワークは中継装置に接続されており、異なる車載ネットワークに接続された車載装置は、中継装置を経由して通信を行う。また、中継装置に故障診断用の外部装置を接続し、中継装置を経由して外部装置と車載装置とが通信を行うことで、車載装置の故障診断を行うことが知られている。 And each in-vehicle network is connected to a relay device, and in-vehicle devices connected to different in-vehicle networks communicate via the relay device. It is also known that a fault diagnosis of an in-vehicle device is performed by connecting an external device for failure diagnosis to the relay device, and the external device and the in-vehicle device communicate via the relay device.
 ここで、特許文献1に記載のゲートウェイは、自装置を統括制御するCPUとは別に、中継されるメッセージに対応するイベントや、該イベントの実行タイミング等が登録された情報を有するゲートウェイ制御ユニットを備える。そして、ゲートウェイ制御ユニットは、メッセージを受信すると、該情報に基づき該メッセージに対応するイベントを登録された実行タイミングにて実行し、これにより、CPUの処理負荷を低減させつつ高速にメッセージの中継が行われる。 Here, the gateway described in Patent Document 1 includes a gateway control unit having information in which events corresponding to relayed messages, execution timings of the events, and the like are registered, separately from the CPU that performs overall control of the device itself. Prepare. When the gateway control unit receives the message, the gateway control unit executes an event corresponding to the message based on the information at the registered execution timing, thereby reducing the processing load on the CPU and relaying the message at high speed. Done.
 ところで、中継装置は、各車載装置の識別情報や、該車載装置が接続されている車載ネットワークの識別情報等を有しており、これらの情報に基づき、異なる車載ネットワークに接続された車載装置間、或いは、外部装置と車載装置との間の通信を中継する。 By the way, the relay device has the identification information of each in-vehicle device, the identification information of the in-vehicle network to which the in-vehicle device is connected, etc., and based on these information, between the in-vehicle devices connected to different in-vehicle networks Alternatively, the communication between the external device and the in-vehicle device is relayed.
 したがって、車載装置の交換や追加がなされた場合には、交換等された新たな車載装置の識別情報や、該車載装置が接続されている車載ネットワークの識別情報を中継装置に設定する必要があり、車載装置の交換や追加を容易に行うことができないという問題があった。 Therefore, when an in-vehicle device is replaced or added, it is necessary to set the identification information of the replaced in-vehicle device or the identification information of the in-vehicle network to which the in-vehicle device is connected to the relay device. However, there is a problem that replacement or addition of the in-vehicle device cannot be easily performed.
特表2009-527168号公報Special table 2009-527168
 本開示は、上記点に鑑みてなされたものであり、車載装置の追加や交換を容易に行うことが可能となる車載用中継装置を提供することを目的とする。 The present disclosure has been made in view of the above points, and an object thereof is to provide an in-vehicle relay device capable of easily adding or replacing an in-vehicle device.
 本開示の一態様による車載用中継装置は、通信部、記憶部、特定部、指示部、登録部、生成部と通信部を備える。通信部は、車両に設けられた複数の車載ネットワークを構成する複数の車載装置の各車載装置、或いは、車両の外部に設けられた外部装置と通信を行う。記憶部は、複数の車載装置の一部の各々に割当てられた論理アドレスと、複数の車載装置の一部の各々を識別するための識別情報が対応付けて登録されている対応情報を記憶している。特定部は、通信部を介して、車載装置或いは外部装置から、ターゲット論理アドレスを含む中継要求データを受信すると、ターゲット論理アドレスが対応情報に登録されている複数の論理アドレスの一つと同じであるかを判定する。特定部は、ターゲット論理アドレスが対応情報に登録されている複数の論理アドレスの一つと同じであると判定すると、ターゲット論理アドレスと同じである複数の論理アドレスの一つに対応付けられた識別情報を特定する。指示部は、特定部が識別情報の特定に失敗した場合、指示データを、通信部を介して複数の車載装置にブロードキャスト送信する。指示データは、複数の車載装置の一つでありターゲット論理アドレスが割当てられたターゲット車載装置に対してターゲット車載装置の識別情報を含む応答データを通信部に送信するよう指示するデータである。登録部は、通信部を介してターゲット車載装置から指示データに応じた応答データを受信すると、応答データに含まれているターゲット車載装置の識別情報と、中継要求データに含まれているターゲット論理アドレスとを、対応情報に対応付けて登録する。生成部は、特定部が識別情報を特定した場合、特定された識別情報と、中継要求データとに基づき、特定された識別情報により識別したターゲット車載装置に対応する中継データを生成する。生成部は、さらに、特定部が識別情報の特定に失敗した場合、指示データの送信に応じてターゲット車載装置から受信した応答データに含まれる識別情報と、中継要求データとに基づき、ターゲット車載装置に対応する中継データを生成する。送信部は、通信部を介して、中継データを、ターゲット車載装置に送信する。 The in-vehicle relay device according to one aspect of the present disclosure includes a communication unit, a storage unit, a specifying unit, an instruction unit, a registration unit, a generation unit, and a communication unit. The communication unit communicates with each in-vehicle device of a plurality of in-vehicle devices constituting a plurality of in-vehicle networks provided in the vehicle or with an external device provided outside the vehicle. The storage unit stores correspondence information registered in association with logical addresses assigned to each of a plurality of in-vehicle devices and identification information for identifying each of the plurality of in-vehicle devices. ing. When the specifying unit receives relay request data including the target logical address from the in-vehicle device or the external device via the communication unit, the target logical address is the same as one of the plurality of logical addresses registered in the correspondence information. Determine whether. If the specifying unit determines that the target logical address is the same as one of the plurality of logical addresses registered in the correspondence information, the identification information associated with one of the plurality of logical addresses that are the same as the target logical address Is identified. When the specifying unit fails to specify the identification information, the instruction unit broadcasts the instruction data to the plurality of in-vehicle devices via the communication unit. The instruction data is data that instructs one of a plurality of in-vehicle devices to transmit response data including identification information of the target in-vehicle device to the target in-vehicle device to which the target logical address is assigned. When the registration unit receives response data corresponding to the instruction data from the target in-vehicle device via the communication unit, the target in-vehicle device identification information included in the response data and the target logical address included in the relay request data Are registered in association with the correspondence information. When the specifying unit specifies the identification information, the generation unit generates relay data corresponding to the target in-vehicle device identified by the specified identification information, based on the specified identification information and the relay request data. The generation unit further includes the target in-vehicle device based on the identification information included in the response data received from the target in-vehicle device in response to the transmission of the instruction data and the relay request data when the identification unit fails to specify the identification information. Generate relay data corresponding to. The transmission unit transmits the relay data to the target in-vehicle device via the communication unit.
 上記車両用中継装置によると、車載装置が新たに追加された場合や、車載装置が交換された場合であっても、他の車載装置は、新たに追加又は交換された送信先の車載装置の物理アドレスや通信プロトコル等を把握していなくても、送信先の車載装置の論理アドレスを把握していれば、車載用中継装置を介してデータの送受信を行うことができる。従って、車載装置の追加や交換を容易に行うことが可能となる。 According to the above-described vehicle relay device, even when the in-vehicle device is newly added or the in-vehicle device is replaced, the other in-vehicle device is connected to the newly added or replaced in-vehicle device. Even if the physical address, communication protocol, and the like are not known, if the logical address of the destination in-vehicle device is known, data can be transmitted / received via the in-vehicle relay device. Therefore, it is possible to easily add or replace the in-vehicle device.
 本開示についての上記目的およびその他の目的、特徴や利点は、添付の図面を参照しながら下記の詳細な記述により、より明確になる。その図面は、
図1は、本開示の一実施形態によるゲートウェイの構成を示すブロック図であり、 図2は、ルーティングテーブルの構成を示すブロック図であり、 図3は、アプリケーションレベルの中継が行われる場合のゲートウェイ等の通信機能の階層構造を示す説明図であり、 図4は、ネットワークレベルの中継が行われる場合のゲートウェイ等の通信機能の階層構造を示す説明図であり、 図5は、中継要求フレームの構造を示す説明図であり、 図6は、中継処理のフローチャートであり、 図7は、外部通信処理のフローチャートであり、 図8は、アプリケーションレベルの中継が行われる場合の、CANに準拠したアドレス解決指示フレーム,アドレス解決応答フレームの構造を示す説明図であり、 図9は、アプリケーションレベルの中継が行われる場合における、CANに準拠した各車載ネットワークに接続された外部装置とECUとの間で中継が行われる際のアドレス解決についてのフローチャートであり、 図10は、ネットワークレベルの中継が行われる場合の、CANに準拠したアドレス解決指示フレーム,アドレス解決応答フレームの構造を示す説明図であり、 図11は、ネットワークレベルの中継が行われる場合における、CANに準拠した各車載ネットワークに接続された外部装置とECUとの間で中継が行われる際のアドレス解決についてのフローチャートであり、 図12は、アプリケーションレベルの中継が行われる場合の、LINに準拠したアドレス解決指示フレーム,アドレス解決応答フレームの構造を示す説明図であり、 図13は、アプリケーションレベルの中継が行われる場合の、FlexRayに準拠したアドレス解決指示フレーム,アドレス解決応答フレームの構造を示す説明図であり、 図14は、異なる通信プロトコルに準拠した各車載ネットワークに接続された外部装置とECUとの間で中継が行われる際のアドレス解決についてのフローチャートである。
The above and other objects, features and advantages of the present disclosure will become more apparent from the following detailed description with reference to the accompanying drawings. The drawing
FIG. 1 is a block diagram illustrating a configuration of a gateway according to an embodiment of the present disclosure. FIG. 2 is a block diagram showing the configuration of the routing table. FIG. 3 is an explanatory diagram showing a hierarchical structure of communication functions such as a gateway when application level relay is performed. FIG. 4 is an explanatory diagram showing a hierarchical structure of communication functions such as gateways when network level relaying is performed. FIG. 5 is an explanatory diagram showing the structure of the relay request frame. FIG. 6 is a flowchart of the relay process. FIG. 7 is a flowchart of external communication processing. FIG. 8 is an explanatory diagram showing the structure of an address resolution instruction frame and an address resolution response frame compliant with CAN when relaying at the application level is performed. FIG. 9 is a flowchart for address resolution when relaying is performed between an external device connected to each in-vehicle network conforming to CAN and the ECU when relaying at an application level is performed. FIG. 10 is an explanatory diagram showing the structure of an address resolution instruction frame and an address resolution response frame compliant with CAN when network level relaying is performed. FIG. 11 is a flowchart for address resolution when relaying is performed between an external device connected to each in-vehicle network compliant with CAN and the ECU when network level relaying is performed. FIG. 12 is an explanatory diagram showing the structure of an address resolution instruction frame and an address resolution response frame compliant with LIN when application level relay is performed. FIG. 13 is an explanatory diagram showing the structure of an address resolution instruction frame and an address resolution response frame compliant with FlexRay when application level relay is performed. FIG. 14 is a flowchart for address resolution when relaying is performed between an ECU and an external device connected to each in-vehicle network conforming to different communication protocols.
 以下、本開示の実施形態について図面を用いて説明する。なお、本開示の実施の形態は、下記の実施形態に何ら限定されることはなく、本開示の技術的範囲に属する限り種々の形態を採りうる。 Hereinafter, embodiments of the present disclosure will be described with reference to the drawings. Embodiments of the present disclosure are not limited to the following embodiments, and various forms can be adopted as long as they belong to the technical scope of the present disclosure.
 [構成の説明]
 <ゲートウェイについて>
 本実施形態の車載用のゲートウェイ10は、Controller Area Network(CAN),Local Interconnect Network(LIN)等の通信プロトコルに準拠した複数の車載ネットワーク40に接続され、車載ネットワーク40に接続されたECU30間の通信を中継するよう構成されている(図1参照)。以下、車載用のゲートウェイ10は、略してゲートウェイ(GW)10とも称する。なお、ゲートウェイ10は、同一の通信プロトコルに準拠した複数の車載ネットワーク40に接続されていても良い。
[Description of configuration]
<About the gateway>
The in-vehicle gateway 10 of the present embodiment is connected to a plurality of in-vehicle networks 40 compliant with a communication protocol such as Controller Area Network (CAN), Local Interconnect Network (LIN), and the like between the ECUs 30 connected to the in-vehicle network 40. It is configured to relay communication (see FIG. 1). Hereinafter, the in-vehicle gateway 10 is also referred to as a gateway (GW) 10 for short. The gateway 10 may be connected to a plurality of in-vehicle networks 40 that conform to the same communication protocol.
 また、ゲートウェイ10は、例えば、ECU30の故障診断用のアプリケーションを搭載したスマートフォンや、故障診断用ツール等として構成された外部装置(EXT DEVICE)20と通信を行うことができる。そして、外部装置20は、ゲートウェイ10を経由してECU30と通信を行うことで、ECU30の故障診断等を行うことが可能となっている。 In addition, the gateway 10 can communicate with, for example, a smartphone equipped with a failure diagnosis application of the ECU 30 or an external device (EXT DEVICE) 20 configured as a failure diagnosis tool or the like. The external device 20 can perform a failure diagnosis of the ECU 30 by communicating with the ECU 30 via the gateway 10.
 なお、外部装置20は、無線Local Area Network(LAN)等の通信プロトコルに準拠した無線通信によりゲートウェイ10と通信を行っても良いし、車載ネットワーク40に一時的に接続され、該車載ネットワーク40を介してゲートウェイ10と通信を行っても良い。また、外部装置20は、無線通信網にアクセス可能に構成され、無線通信網を介してゲートウェイ10と通信を行っても良い。 The external device 20 may communicate with the gateway 10 by wireless communication conforming to a communication protocol such as wireless Local Area Network (LAN), or may be temporarily connected to the in-vehicle network 40, and the in-vehicle network 40 may be You may communicate with the gateway 10 via. The external device 20 may be configured to be accessible to a wireless communication network, and may communicate with the gateway 10 via the wireless communication network.
 ゲートウェイ10は、Central Processing Unit(CPU)11,Random Access Memory(RAM)12,Read Only Memory(ROM)13,通信部(COMM)17,テレマティクス用通信部(TELEMATICS COMM)16等から構成され、これらは、内部バス14により接続されている。 The gateway 10 includes a central processing unit (CPU) 11, a random access memory (RAM) 12, a read only memory (ROM) 13, a communication unit (COMM) 17, a telematics communication unit (TELEMATICS COMM) 16, and the like. Are connected by an internal bus 14.
 CPU11は、ROM13に記憶されているプログラムに従って動作し、ゲートウェイ10を統括制御する。なお、該プログラムの一つとして、通信部17を制御するための通信処理部(COMM PROCESS)15が設けられている。 The CPU 11 operates according to a program stored in the ROM 13 and controls the gateway 10 in an integrated manner. As one of the programs, a communication processing unit (COMM PROCESS) 15 for controlling the communication unit 17 is provided.
 また、テレマティクス用通信部16は、無線通信網にアクセスするための部位であり、該部位により、無線通信網を介して外部装置20と通信が行われる。 The telematics communication unit 16 is a part for accessing the wireless communication network, and communicates with the external device 20 via the wireless communication network.
 また、通信部17は、一例として、無線LAN(WIRELESS LAN),WiFi,Bluetooth(登録商標)等に準拠した無線通信を行う部位17a~17cを有しており、これらの部位により外部装置20と無線通信が行われる。また、通信部17は、一例として、CAN,LIN,Media Oriented Systems Transport(MOST),Ethernet(登録商標),FlexRay,Universal Serial Bus(USB)等に準拠した通信を行う部位17d~17iを有している。これらの部位により、車載ネットワーク40を構成するECU30や、車載ネットワーク40に一時的に接続された外部装置20と通信が行われる。 In addition, the communication unit 17 includes, as an example, portions 17a to 17c that perform wireless communication in accordance with wireless LAN (WIRELESS LAN), WiFi, Bluetooth (registered trademark), and the like. Wireless communication is performed. In addition, the communication unit 17 includes, for example, parts 17d to 17i that perform communication compliant with CAN, LIN, Media Oriented Systems Transport (MOST), Ethernet (registered trademark), FlexRay, Universal Serial Bus (USB), and the like. ing. By these parts, communication is performed with the ECU 30 configuring the in-vehicle network 40 and the external device 20 temporarily connected to the in-vehicle network 40.
 そして、CPU11は、通信処理部15に従い動作することで、通信部17を介して、外部装置20や車載ネットワーク40に接続されたECU30と通信を行う。 And CPU11 communicates with ECU30 connected to the external apparatus 20 and the vehicle-mounted network 40 via the communication part 17 by operate | moving according to the communication process part 15. FIG.
 また、本実施形態では、各ECU30,外部装置20には固有の論理アドレスが設定されており、ECU30及び外部装置20は、ゲートウェイ10を介して通信を行う場合等には、論理アドレスにより中継先を指定する構成となっている。なお、複数のECU30に対応する論理アドレスが設けられていても良く、このような場合には、該論理アドレスを中継先として指定することで、対応する複数のECU30に同時に中継がなされる。 In the present embodiment, a unique logical address is set for each ECU 30 and the external device 20. When the ECU 30 and the external device 20 communicate via the gateway 10, the relay destination is a logical address. Is specified. It should be noted that logical addresses corresponding to a plurality of ECUs 30 may be provided. In such a case, the logical addresses are designated as relay destinations, so that the corresponding ECUs 30 are relayed simultaneously.
 このような中継を行うため、ゲートウェイ10は、論理アドレスと、該論理アドレスが設定されたECU30或いは外部装置20に関する識別情報(例えば物理アドレス)等との対応関係を示すルーティングテーブルを有している。ルーティングテーブルは、ROM13及びRAM12に記憶されており、ゲートウェイ10では、該ルーティングテーブルを検索することで、中継先となる車載ネットワーク40やECU30等に関する情報が特定される。 In order to perform such relaying, the gateway 10 has a routing table indicating a correspondence relationship between a logical address and identification information (for example, a physical address) regarding the ECU 30 or the external device 20 in which the logical address is set. . The routing table is stored in the ROM 13 and the RAM 12, and the gateway 10 searches the routing table to identify information related to the in-vehicle network 40 and the ECU 30 that are relay destinations.
 さらに、ゲートウェイ10は、ルーティングテーブルに登録されていない論理アドレスが中継先となっている場合には、アドレス解決を行い、該論理アドレスに対応するECU30或いは外部装置20に中継を行うために必要な情報を取得する(詳細は後述する)。 Furthermore, when a logical address that is not registered in the routing table is a relay destination, the gateway 10 performs address resolution and is necessary for relaying to the ECU 30 or the external device 20 corresponding to the logical address. Information is acquired (details will be described later).
 <ルーティングテーブルついて>
 ルーティングテーブル50には、各ECU30或いは外部装置20の「論理アドレス」を示す項目が設けられている。そして、「論理アドレス」に対応して、「中継可否情報」,「中継用バッファサイズ」,「中継タイプ」,「ECU識別情報」,「通信プロトコル」,「車載ネットワーク識別情報」,「送信I/F」,「中継先バッファサイズ」,「履歴情報」等の項目が設けられている(図2参照)。
<About routing table>
In the routing table 50, an item indicating the “logical address” of each ECU 30 or the external device 20 is provided. Corresponding to the “logical address”, “relay availability information”, “relay buffer size”, “relay type”, “ECU identification information”, “communication protocol”, “in-vehicle network identification information”, “transmission I” Items such as “/ F”, “relay destination buffer size”, and “history information” are provided (see FIG. 2).
 「中継可否情報」とは、対応する論理アドレスが示すECU30等との通信が許可されたECU30や外部装置20の論理アドレスを示す項目である。該項目により、例えば、一般ユーザが所持するスマートフォンとして構成された外部装置20からエアバック等のECU30への通信が禁止され、その結果、例えば、スマートフォンからエアバックの機能を停止させるような不適切な処理が防止される。 “Relay enable / disable information” is an item indicating the logical address of the ECU 30 or the external device 20 that is permitted to communicate with the ECU 30 or the like indicated by the corresponding logical address. By this item, for example, communication from the external device 20 configured as a smartphone possessed by a general user to the ECU 30 such as an airbag is prohibited, and as a result, for example, inappropriate such as stopping the airbag function from the smartphone. Processing is prevented.
 また、「中継用バッファサイズ」とは、ゲートウェイ10が、対応する論理アドレスが示すECU30等への通信を中継する際に用いる中継用バッファのサイズを示す。 Further, “relay buffer size” indicates the size of the relay buffer used when the gateway 10 relays communication to the ECU 30 or the like indicated by the corresponding logical address.
 具体的に説明すると、例えば、イーサネット(登録商標)はCANよりも通信速度が速く、1フレームのデータ長も大きい。このため、イーサネットに接続されたECU30からCANに接続されたECU30への中継を行う場合、中継元から受信したデータを一旦バッファし、該データを分割して順次中継する蓄積中継を行う必要がある。「中継用バッファサイズ」とは、このような蓄積中継等に用いる中継用バッファのサイズを示す。 More specifically, for example, Ethernet (registered trademark) has a higher communication speed than CAN, and the data length of one frame is also large. For this reason, when relaying from the ECU 30 connected to the Ethernet to the ECU 30 connected to the CAN, it is necessary to temporarily store the data received from the relay source, and perform accumulation relay that divides the data and sequentially relays the data. . The “relay buffer size” indicates the size of the relay buffer used for such accumulation relay.
 また、「中継タイプ」とは、ゲートウェイ10が対応する論理アドレスが示すECUに中継を行う際の方式を示す項目である。 Also, the “relay type” is an item indicating a method for relaying to the ECU indicated by the logical address corresponding to the gateway 10.
 中継方式としては、上述した蓄積中継のほか、中継元からフレームを受信する度に、必要に応じて該フレームに改変を加えて中継先の車載ネットワーク40等に送出する方式(逐次中継)が考えられる。中継方式を蓄積中継とするか逐次中継とするかは、例えば、中継先となる車載ネットワーク40等の通信速度等に基づき決定される。 As a relay method, in addition to the above-described accumulation relay, a method (sequential relay) in which each time a frame is received from the relay source, the frame is modified as necessary and transmitted to the in-vehicle network 40 or the like of the relay destination is considered. It is done. Whether the relay method is the accumulation relay or the sequential relay is determined based on, for example, the communication speed of the in-vehicle network 40 that is the relay destination.
 また、「ECU識別情報」とは、対応する論理アドレスが示すECU30等に関する識別情報(例えば物理アドレス)を示す項目である。なお、該ECU30等がCANに接続されている場合には、該項目は、例えば、該ECU30等への送信時や、該ECU30等からの応答時に用いられるCAN-ID等通信上必要な情報を引き当てるために使用する。 Further, “ECU identification information” is an item indicating identification information (for example, physical address) related to the ECU 30 or the like indicated by the corresponding logical address. When the ECU 30 or the like is connected to the CAN, the item includes, for example, information necessary for communication such as a CAN-ID used at the time of transmission to the ECU 30 or the like or a response from the ECU 30 or the like. Used to allocate.
 また、「通信プロトコル」とは、対応する論理アドレスが示すECU30等が接続されている車載ネットワーク40の通信プロトコルや、該論理アドレスが示す外部装置20と無線通信を行う際の通信プロトコルを示す。 The “communication protocol” indicates a communication protocol of the in-vehicle network 40 to which the ECU 30 or the like indicated by the corresponding logical address is connected, or a communication protocol when performing wireless communication with the external device 20 indicated by the logical address.
 また、「車載ネットワーク識別情報」とは、対応する論理アドレスが示すECU30等が接続されている車載ネットワーク40の識別情報を示す。 Also, “in-vehicle network identification information” indicates identification information of the in-vehicle network 40 to which the ECU 30 or the like indicated by the corresponding logical address is connected.
 また、「送信I/F」とは、対応する論理アドレスが示すECU30等(中継先のECU30等)が接続されている車載ネットワーク40と中継元の車載ネットワーク40の通信プロトコルが異なる場合における、中継するフレームの変換方法を示す。 The “transmission I / F” is a relay when the communication protocol of the in-vehicle network 40 to which the ECU 30 or the like (relay destination ECU 30 or the like) indicated by the corresponding logical address is connected and the relay in-vehicle network 40 is different. A frame conversion method is shown.
 また、「中継先バッファサイズ」とは、論理アドレスに対応するECU30等が備える通信用のバッファサイズを示す。ゲートウェイ10は、該ECU30への中継を行う場合には、該バッファサイズを考慮して該ECU30に中継するフレームのデータ長等を決定する。 Also, the “relay destination buffer size” indicates the communication buffer size provided in the ECU 30 or the like corresponding to the logical address. When relaying to the ECU 30, the gateway 10 determines the data length of the frame relayed to the ECU 30 in consideration of the buffer size.
 また、「履歴情報」とは、論理アドレスに対応するECU30等への中継の記録を示す。「履歴情報」は、RAM12や、図示しない書き換え可能な不揮発性メモリ(フラッシュメモリ等)に保存することが考えられる。 “History information” indicates a record of relay to the ECU 30 or the like corresponding to the logical address. The “history information” may be stored in the RAM 12 or a rewritable nonvolatile memory (not shown) (flash memory or the like).
 なお、ルーティングテーブル50には、ROM13(或いは、図示しないフラッシュメモリ等)に保存されている部分(プリセットテーブル)と、RAM12(或いは、図示しないフラッシュメモリ等)に保存されている部分(キャッシュテーブル)が存在する。 The routing table 50 includes a portion (preset table) stored in the ROM 13 (or a flash memory (not shown)) and a portion (cache table) stored in the RAM 12 (or a flash memory (not shown)). Exists.
 そして、通信を行うことが予定されているECU30や外部装置20の論理アドレス等は、プリセットテーブルに登録されている。一方、車載ネットワーク40に新たに接続されたECU30等の論理アドレス等は、後述するアドレス解決によりキャッシュテーブルに登録される。 The logical addresses of the ECU 30 and the external device 20 that are scheduled to communicate are registered in the preset table. On the other hand, the logical address of the ECU 30 and the like newly connected to the in-vehicle network 40 is registered in the cache table by address resolution described later.
 また、複数のECU30を示す論理アドレスについては、該論理アドレスに対応する各項目に、これらのECU30に関する情報が登録されている。 Further, for the logical addresses indicating the plurality of ECUs 30, information related to these ECUs 30 is registered in each item corresponding to the logical addresses.
 <ゲートウェイ等の通信機能について>
 次に、ゲートウェイ10,ECU30,外部装置20における通信機能について説明する。該通信機能は、アプリケーション層(AP),トランスポート層(TP),ネットワーク層(NW),データリンク層(DL),物理層(PH)に階層化される(図3,4参照)。以下、アプリケーション層は、AP層ともいい、トランスポート層は、TP層ともいい、ネットワーク層は、NW層ともいい、データリンク層は、DL層ともいう。
<About communication functions such as gateways>
Next, communication functions in the gateway 10, the ECU 30, and the external device 20 will be described. The communication function is hierarchized into an application layer (AP), a transport layer (TP), a network layer (NW), a data link layer (DL), and a physical layer (PH) (see FIGS. 3 and 4). Hereinafter, the application layer is also referred to as an AP layer, the transport layer is also referred to as a TP layer, the network layer is also referred to as an NW layer, and the data link layer is also referred to as a DL layer.
 また、上述したように、ゲートウェイ10は、蓄積中継と逐次中継の2種類の方式により中継を行うことができるが、各方式の中継がなされる場合には、通信機能の各階層で行われる処理が一部異なるものとなる。 In addition, as described above, the gateway 10 can perform relaying by two types of storage relays and sequential relays. However, when relaying by each method is performed, processing performed in each layer of the communication function Are partly different.
 まず、蓄積中継が行われる場合であるが(図3参照)、蓄積中継は、主に、異なる通信プロトコルに準拠した車載ネットワーク40に接続されたECU30や外部装置20の通信を中継する場合に行われる(無論、同一の通信プロトコルに準拠した車載ネットワーク40に接続されたECU30や外部装置20の通信を中継する場合に行われる場合もある)。また、このほかにも、無線LANや無線通信網等を介してゲートウェイ10と通信を行う外部装置20とECU30との間の通信を中継する場合にも、主に蓄積中継が行われる。 First, the accumulation relay is performed (see FIG. 3). The accumulation relay is mainly performed when relaying communication of the ECU 30 or the external device 20 connected to the in-vehicle network 40 conforming to a different communication protocol. (Of course, it may be performed when relaying communication between the ECU 30 and the external device 20 connected to the in-vehicle network 40 compliant with the same communication protocol). In addition to this, accumulation relay is also mainly performed when relaying communication between the external device 20 that communicates with the gateway 10 and the ECU 30 via a wireless LAN, a wireless communication network, or the like.
 蓄積中継が行われる場合には、AP層中心に中継やアドレス解決が行われる(換言すれば、蓄積中継は、アプリケーションレベルでの中継と言える)。 When accumulation relay is performed, relay and address resolution are performed at the center of the AP layer (in other words, accumulation relay is an application-level relay).
 すなわち、ゲートウェイ10では、通信部17がDL層,物理層として機能し、通信処理部15がTP層,NW層として機能する。また、ゲートウェイ10には、CPU11を制御するプログラムとしてGW制御部(GW CONTROL)11a,アドレス解決部(ADS SOLV)11bが設けられており、これらがAP層として機能する。 That is, in the gateway 10, the communication unit 17 functions as a DL layer and a physical layer, and the communication processing unit 15 functions as a TP layer and an NW layer. The gateway 10 is provided with a GW control unit (GW CONTROL) 11a and an address resolution unit (ADS SOLV) 11b as programs for controlling the CPU 11, and these function as an AP layer.
 一方、ECU30は、自装置が接続された車載ネットワーク40の通信プロトコルに準拠した通信を行う通信部34(COMM)がDL層,物理層として機能し、通信部34を制御する通信処理部33(COMM PROCESS)がTP層,NW層として機能する。また、ECU30には、CPUを制御するプログラムであって、AP層として機能するサーバ部(SERVER)31,アドレス解決部(ADS SOLV)32が設けられている。サーバ部31は、ゲートウェイ10を経由して他のECU30や外部装置20と通信を行い、アドレス解決部32は、上述したアドレス解決のための処理を行う。 On the other hand, the ECU 30 includes a communication processing unit 33 (communication unit 33) that controls the communication unit 34 by the communication unit 34 (COMM) that performs communication conforming to the communication protocol of the in-vehicle network 40 to which the device is connected functioning as the DL layer and physical layer. COMM PROCESS) functions as the TP layer and NW layer. In addition, the ECU 30 is provided with a server unit (SERVER) 31 and an address resolution unit (ADS SOLV) 32 which are programs for controlling the CPU and function as an AP layer. The server unit 31 communicates with another ECU 30 and the external device 20 via the gateway 10, and the address resolution unit 32 performs the above-described processing for address resolution.
 また、外部装置20は、予め定められた通信プロトコルに準拠した通信を行う通信部(COMM)23がDL層,物理層として機能し、通信部23を制御する通信処理部(COMM PROCESS)22がTP層,NW層として機能する。また、外部装置20のCPUを制御するプログラムであって、AP層として機能するクライアント部(CLIENT)21が設けられ、該クライアント部21は、ゲートウェイ10を経由してECU30と通信を行うことで、ECU30の故障診断等を行う。 In addition, the external device 20 includes a communication processing unit (COMM) 22 that performs communication conforming to a predetermined communication protocol and functions as a DL layer and a physical layer, and a communication processing unit (COMM PROCESS) 22 that controls the communication unit 23. It functions as a TP layer and NW layer. Further, a client unit (CLIENT) 21 that is a program for controlling the CPU of the external device 20 and functions as an AP layer is provided. The client unit 21 communicates with the ECU 30 via the gateway 10, A failure diagnosis of the ECU 30 is performed.
 そして、外部装置20やECU30からゲートウェイ10に中継要求フレームの送信が開始されると、ゲートウェイ10のGW制御部11aは、通信部17,通信処理部15を介してこれらの中継要求フレームを受信し、RAM12に設けられたバッファに保存する。 When transmission of relay request frames from the external device 20 or the ECU 30 to the gateway 10 is started, the GW control unit 11a of the gateway 10 receives these relay request frames via the communication unit 17 and the communication processing unit 15. The data is stored in a buffer provided in the RAM 12.
 その後、全ての中継要求フレームの受信を完了すると、GW制御部11aは、該中継要求フレームに中継先として設定された論理アドレスに基づき、ルーティングテーブル50から中継先のECU30の物理アドレスや車載ネットワーク40の識別情報等を検索する。そして、検索結果に基づき、中継先に対応する中継フレームを生成し、通信処理部15,通信部17を介して、中継先のECU30が接続された車載ネットワーク40に送出する。 Thereafter, when the reception of all relay request frames is completed, the GW control unit 11a, based on the logical address set as the relay destination in the relay request frame, from the routing table 50 to the physical address of the relay destination ECU 30 and the in-vehicle network 40 The identification information and the like are searched. Based on the search result, a relay frame corresponding to the relay destination is generated and sent to the in-vehicle network 40 to which the relay destination ECU 30 is connected via the communication processing unit 15 and the communication unit 17.
 また、アドレス解決部11bは、上述したアドレス解決のための処理を行う。 In addition, the address resolution unit 11b performs the above-described processing for address resolution.
 これに対し、逐次中継は、主に、同一の通信プロトコルに準拠した車載ネットワーク40に接続されたECU30や外部装置20の通信を中継する場合に行われる(無論、異なる通信プロトコルに準拠した車載ネットワーク40に接続されたECU30や外部装置20間の通信を中継する場合に行われても良い)。なお、図4は、一例として、CANに準拠した異なる車載ネットワーク40に接続された外部装置20とECU30との間の通信を中継する場合を示している。 On the other hand, the sequential relay is mainly performed when relaying communication between the ECU 30 and the external device 20 connected to the in-vehicle network 40 compliant with the same communication protocol (of course, the in-vehicle network compliant with different communication protocols). 40 may be performed when relaying communication between the ECU 30 connected to 40 and the external device 20). FIG. 4 shows, as an example, a case where communication between the external device 20 connected to a different in-vehicle network 40 compliant with CAN and the ECU 30 is relayed.
 逐次中継が行われる場合には、NW層,TP層,AP層を中心に中継やアドレス解決が行われる(換言すれば、逐次中継は、ネットワークレベルでの中継と言える)。 When sequential relay is performed, relay and address resolution are performed mainly in the NW layer, TP layer, and AP layer (in other words, sequential relay can be said to be relay at the network level).
 すなわち、ゲートウェイ10では、通信部17がDL層,物理層として機能する。また、ゲートウェイ10には、CPU11を制御するプログラムと通信処理部15とから構成されるルータ制御部(ROUTER CONTROL)15a,アドレス解決部(ADS SOLV)15bが設けられており、これらがAP層,TP層,NW層として機能する。 That is, in the gateway 10, the communication unit 17 functions as a DL layer and a physical layer. In addition, the gateway 10 is provided with a router control unit (ROUTER CONTROL) 15a and an address resolution unit (ADS SOLV) 15b, which are composed of a program for controlling the CPU 11 and a communication processing unit 15. It functions as a TP layer and NW layer.
 一方、ECU30は、通信部34がDL層,物理層として機能し、通信処理部33がTP層,NW層として機能し、サーバ部31がAP層として機能する。また、CPUを制御するプログラムと、通信処理部33とから構成されるアドレス解決部(ADS SOLV)35が設けられており、該アドレス解決部35は、AP層,TP層,NW層として機能し、上述したアドレス解決のための処理を行う。 On the other hand, in the ECU 30, the communication unit 34 functions as a DL layer and a physical layer, the communication processing unit 33 functions as a TP layer and an NW layer, and the server unit 31 functions as an AP layer. In addition, an address resolution unit (ADS SOLV) 35 including a program for controlling the CPU and a communication processing unit 33 is provided. The address resolution unit 35 functions as an AP layer, a TP layer, and an NW layer. The above-described processing for address resolution is performed.
 なお、外部装置20は、蓄積中継が行われる場合と同様の構成を有している。 Note that the external device 20 has a configuration similar to that in the case where accumulation relay is performed.
 そして、外部装置20やECU30からゲートウェイ10に中継要求フレームの送信が開始されると、ゲートウェイ10のルータ制御部15aは、通信部17を介して該中継要求フレームを受信する。また、ルータ制御部15aは、該中継要求フレームに送信先として設定された論理アドレスに基づき、ルーティングテーブル50から送信先のECU30や車載ネットワーク40の識別情報等を検索する。 Then, when transmission of the relay request frame from the external device 20 or the ECU 30 to the gateway 10 is started, the router control unit 15a of the gateway 10 receives the relay request frame via the communication unit 17. Further, the router control unit 15a searches the routing table 50 for identification information of the ECU 30 and the in-vehicle network 40 from the routing table 50 based on the logical address set as the transmission destination in the relay request frame.
 さらに、ルータ制御部15aは、必要に応じて検索結果に基づき該中継要求フレームに改変を加え、中継フレームを生成し、通信部17を介して送信先のECU30が接続された車載ネットワーク40に送信する。なお、該改変の具体例としては、車載ネットワーク40がCANに準拠している場合であれば、送信先に応じてCAN-IDを変換すること等が考えられる。 Further, the router control unit 15a modifies the relay request frame as necessary based on the search result, generates a relay frame, and transmits the relay frame to the in-vehicle network 40 to which the ECU 30 as the transmission destination is connected via the communication unit 17. To do. As a specific example of the modification, if the in-vehicle network 40 is compliant with CAN, it may be possible to convert the CAN-ID according to the transmission destination.
 また、アドレス解決部15bは、上述したアドレス解決のための処理を行う。 Further, the address resolution unit 15b performs the above-described processing for address resolution.
 <中継要求フレームについて>
 ゲートウェイ10による中継の際、中継元のECU30等からゲートウェイ10に送信される中継要求フレーム60は、概略的には、プロトコル依存部61,ソースアドレス62,ターゲットアドレス63,メッセージ64等から構成されている(図5参照)。
<Relay request frame>
The relay request frame 60 transmitted from the relay ECU 30 or the like to the gateway 10 when relaying by the gateway 10 is generally composed of a protocol dependent unit 61, a source address 62, a target address 63, a message 64, and the like. (See FIG. 5).
 プロトコル依存部61は、中継元(中継要求フレーム60の送信元)のECU30等からゲートウェイ10に送信を行うためのデータであり、これらの装置間の通信プロトコルに応じて定められる。 The protocol dependent unit 61 is data for transmission from the ECU 30 or the like of the relay source (transmission source of the relay request frame 60) to the gateway 10, and is determined according to the communication protocol between these devices.
 また、ソースアドレス62は、中継元のECU30或いは外部装置20の論理アドレスを示すデータである。 The source address 62 is data indicating a logical address of the relay source ECU 30 or the external device 20.
 また、ターゲットアドレス63は、中継先のECU30或いは外部装置20の論理アドレスを示すデータである。ターゲットアドレスは、ターゲット論理アドレスともいう。 The target address 63 is data indicating a logical address of the relay destination ECU 30 or the external device 20. The target address is also called a target logical address.
 また、メッセージ64は、中継先のECU30等に対する指示内容等を示すデータである。具体的には、例えば、外部装置20からECU30の故障診断を指示する場合であれば、故障コードや指定したアドレスに保存されたデータの送信要求をメッセージとすることが考えられる。また、例えば、ECU30から外部装置20に対し故障診断に対する応答を行う場合であれば、故障コードや、該外部装置20からの指示に応じて読み出したデータをメッセージとすることが考えられる。 Further, the message 64 is data indicating the contents of instructions to the relay destination ECU 30 or the like. Specifically, for example, in the case of instructing a failure diagnosis of the ECU 30 from the external device 20, it is conceivable that a transmission request for data stored in a failure code or a specified address is used as a message. Further, for example, when a response to the failure diagnosis is sent from the ECU 30 to the external device 20, a failure code or data read in response to an instruction from the external device 20 may be used as a message.
 [動作の説明]
 <中継処理について>
 次に、ゲートウェイ10がECU30間、或いは、ECU30,外部装置20間の通信を中継する中継処理について、図6に記載のフローチャートを用いて説明する。なお、本処理は、ゲートウェイ10の起動時に開始され、中継要求フレームを受信する度に実行される。
[Description of operation]
<About relay processing>
Next, a relay process in which the gateway 10 relays communication between the ECUs 30 or between the ECU 30 and the external device 20 will be described with reference to a flowchart shown in FIG. This process is started when the gateway 10 is activated and is executed every time a relay request frame is received.
 ここで、この出願に記載されるフローチャート、あるいは、フローチャートの処理は、複数の部(あるいはステップと言及される)から構成され、各部は、たとえば、S100と表現される。さらに、各部は、複数のサブ部に分割されることができる、一方、複数の部が合わさって一つの部にすることも可能である。さらに、このように構成される各部は、デバイス、モジュール、ミーンズとして言及されることができる。 Here, the flowchart or the process of the flowchart described in this application is configured by a plurality of parts (or referred to as steps), and each part is expressed as S100, for example. Furthermore, each part can be divided into a plurality of sub-parts, while the plurality of parts can be combined into one part. Furthermore, each part configured in this manner can be referred to as a device, a module, and a means.
 S100では、ゲートウェイ10のCPU11は、ECU30や外部装置20からの中継要求フレーム60の受信を待つ。なお、中継要求フレーム60は、車載ネットワーク40から受信する場合や、無線通信を介して受信する場合や、テレマティクス用通信部16を介して無線通信網から受信する場合が想定される。そして、CPU11は、中継要求フレーム60を受信すると、S105に処理を移行する。 In S100, the CPU 11 of the gateway 10 waits for reception of the relay request frame 60 from the ECU 30 or the external device 20. It is assumed that the relay request frame 60 is received from the in-vehicle network 40, received via wireless communication, or received from the wireless communication network via the telematics communication unit 16. Then, when the CPU 11 receives the relay request frame 60, the process proceeds to S105.
 S105では、CPU11は、受信した中継要求フレーム60のソースアドレス62を、中継元のECU30等の論理アドレスとして特定すると共に、ターゲットアドレス63を、中継先のECU30等の論理アドレスとして特定する。そして、CPU11は、中継先の論理アドレスをルーティングテーブル50から検索する。 In S105, the CPU 11 specifies the source address 62 of the received relay request frame 60 as a logical address of the relay source ECU 30 and the like, and specifies the target address 63 as a logical address of the relay destination ECU 30 and the like. Then, the CPU 11 searches the routing table 50 for the logical address of the relay destination.
 続くS110では、CPU11は、中継先の論理アドレスの検索に成功したか否かを判定し、成功した場合には(S110:Yes)、S130に処理を移行すると共に、失敗した場合には(S110:No)、S115に処理を移行する。 In subsequent S110, the CPU 11 determines whether or not the search of the logical address of the relay destination has succeeded. If the search is successful (S110: Yes), the process proceeds to S130, and if the search has failed (S110). : No), the process proceeds to S115.
 S115では、CPU11は、車載ネットワーク40や無線通信を介して当該ゲートウェイ10に接続されている全てのECU30や外部装置20を対象として、アドレス解決指示フレーム(詳細は後述する)をブロードキャスト送信する。このアドレス解決指示フレームには、中継先の論理アドレスが含まれており、該論理アドレスが示すECU30等に対し、当該ゲートウェイ10に自装置の識別情報等を送信することを指示するものである。 In S115, the CPU 11 broadcasts an address resolution instruction frame (details will be described later) to all ECUs 30 and external devices 20 connected to the gateway 10 via the in-vehicle network 40 or wireless communication. This address resolution instruction frame contains the logical address of the relay destination, and instructs the ECU 30 or the like indicated by the logical address to transmit identification information of the own device to the gateway 10.
 なお、この識別情報とは、中継先の論理アドレスが示すECU30の物理アドレスであっても良い。また、該ECU30が接続された車載ネットワーク40の通信プロトコルがCANである場合には、該ECU30への送信や応答に用いられるCAN-IDであっても良い。 The identification information may be a physical address of the ECU 30 indicated by the logical address of the relay destination. Further, when the communication protocol of the in-vehicle network 40 to which the ECU 30 is connected is CAN, it may be a CAN-ID used for transmission to the ECU 30 or for a response.
 また、アドレス解決の対象となる車載ネットワーク40やECU30等を予め定めておき、これらを対象としてアドレス解決指示フレームをブロードキャスト送信する構成としても良い。 In addition, a configuration may be adopted in which the in-vehicle network 40, the ECU 30, and the like that are targets for address resolution are determined in advance, and address resolution instruction frames are broadcasted for these.
 続くS120では、CPU11は、中継先の論理アドレスが示すECU30から、該ECU30の識別情報等を含むアドレス解決応答フレームを受信したか否かを判定し、肯定判定が得られた場合には(S120:Yes)、S125に処理を移行する。 In subsequent S120, the CPU 11 determines whether or not an address resolution response frame including the identification information of the ECU 30 is received from the ECU 30 indicated by the logical address of the relay destination, and when an affirmative determination is obtained (S120). : Yes), the process proceeds to S125.
 一方、アドレス解決指示フレームの送信後、制限時間が経過してもアドレス解決応答フレームを受信できない場合には(S120:No)、CPU11は、中継を中止する。 On the other hand, if the address resolution response frame cannot be received even after the time limit has elapsed after the address resolution instruction frame is transmitted (S120: No), the CPU 11 stops relaying.
 S125では、CPU11は、ルーティングテーブル50(キャッシュテーブル)に、中継先の論理アドレスを新たに登録すると共に、該論理アドレスに対応する「ECU識別情報」として、受信したアドレス解決応答フレームに含まれている識別情報を登録する。 In S125, the CPU 11 newly registers the logical address of the relay destination in the routing table 50 (cache table), and is included in the received address resolution response frame as “ECU identification information” corresponding to the logical address. Registered identification information.
 また、CPU11は、アドレス解決応答フレームを受信した車載ネットワーク40の識別情報と通信プロトコルを特定し、中継先の論理アドレスに対応する「車載ネットワーク識別情報」,「通信プロトコル」として登録する。 Further, the CPU 11 identifies the identification information and communication protocol of the in-vehicle network 40 that has received the address resolution response frame, and registers them as “in-vehicle network identification information” and “communication protocol” corresponding to the logical address of the relay destination.
 また、CPU11は、中継先の論理アドレスが示すECU30等への通信を中継する際に用いることができる中継用バッファサイズを決定し、該論理アドレスに対応する「中継用バッファサイズ」として登録する。 Further, the CPU 11 determines a relay buffer size that can be used when relaying communication to the ECU 30 or the like indicated by the logical address of the relay destination, and registers it as a “relay buffer size” corresponding to the logical address.
 また、CPU11は、中継先の論理アドレスが示すECU30等が接続された車載ネットワーク40の通信速度等に基づき、中継方式やフレームの変換方法を決定し、該論理アドレスに対応する「中継タイプ」,「通信I/F」として登録する。なお、CPU11は、該ECU30等と通信を行い、該ECU30等から取得した情報に基づき、中継方式やフレームの変換方法を決定しても良い。 Further, the CPU 11 determines the relay method and frame conversion method based on the communication speed of the in-vehicle network 40 to which the ECU 30 or the like indicated by the relay destination logical address is connected, and the “relay type”, corresponding to the logical address, Register as “Communication I / F”. Note that the CPU 11 may communicate with the ECU 30 or the like and determine a relay method or a frame conversion method based on information acquired from the ECU 30 or the like.
 さらに、CPU11は、中継先の論理アドレスが示すECU30等と通信を行い、該ECU30等との通信が許可されたECU30等を示す論理アドレスを取得すると共に、該ECU30等が備える通信用のバッファサイズを取得する(無論、これらの情報は、アドレス解決応答フレームに含まれていても良い)。そして、取得した論理アドレス,バッファサイズを、該論理アドレスに対応する「中継可否情報」,「中継先バッファサイズ」として登録する。 Further, the CPU 11 communicates with the ECU 30 or the like indicated by the logical address of the relay destination, acquires a logical address indicating the ECU 30 or the like permitted to communicate with the ECU 30 or the like, and has a communication buffer size provided in the ECU 30 or the like. (Of course, these pieces of information may be included in the address resolution response frame). The acquired logical address and buffer size are registered as “relay availability information” and “relay destination buffer size” corresponding to the logical address.
 続くS130では、CPU11は、ルーティングテーブル50に中継先の論理アドレスに対応して登録されている情報に基づき、受信した中継要求フレームから新たな中継フレームを生成し、その後、該中継フレームを中継先のECU30等に送信し(S135)、中継処理を終了する。なお、アドレス解決応答フレームを受信した場合であれば、CPU11は、アドレス解決応答フレームや受信した中継要求フレーム等に基づき、中継フレームを生成しても良い。 In subsequent S130, the CPU 11 generates a new relay frame from the received relay request frame based on the information registered in the routing table 50 corresponding to the logical address of the relay destination, and then transmits the relay frame to the relay destination. To the ECU 30 (S135), and the relay process is terminated. If an address resolution response frame is received, the CPU 11 may generate a relay frame based on the address resolution response frame, the received relay request frame, or the like.
 具体的には、CPU11は、中継元のECU30等の論理アドレスが、中継先の論理アドレスの「中継可否情報」に登録されているか判定し、登録されていない場合には、中継処理を終了し、次の中継要求フレーム60の受信を待つ。 Specifically, the CPU 11 determines whether the logical address of the relay source ECU 30 or the like is registered in the “relay enable / disable information” of the relay destination logical address, and if not, ends the relay process. The reception of the next relay request frame 60 is awaited.
 一方、中継元の論理アドレスが登録されている場合には、CPU11は、中継先の論理アドレスに対応する「中継タイプ」を参照し、中継方式が蓄積中継か逐次中継か等の中継の仕方を判別する。なお、CPU11は、同一の通信プロトコルに準拠した2つの車載ネットワーク40に接続されているECU30等の間の通信を中継する場合には、「中継タイプ」が示す中継方式に関らず、逐次中継を行うことを選択しても良い。 On the other hand, when the logical address of the relay source is registered, the CPU 11 refers to the “relay type” corresponding to the logical address of the relay destination, and determines the relay method such as whether the relay method is accumulation relay or sequential relay. Determine. When relaying communication between the ECUs 30 and the like connected to the two in-vehicle networks 40 conforming to the same communication protocol, the CPU 11 relays sequentially regardless of the relay method indicated by the “relay type”. You may choose to do.
 また、CPU11は、中継先の論理アドレスに対応する「ECU識別情報」,「通信プロトコル」,「車載ネットワーク識別情報」,「送信I/F」,「中継先バッファサイズ」を参照する。そして、CPU11は、これらの項目が示す情報に基づき、受信した中継要求フレームから中継先のECU30や車載ネットワーク40の通信プロトコル等に対応する中継フレームの生成方法を特定する。 Also, the CPU 11 refers to “ECU identification information”, “communication protocol”, “in-vehicle network identification information”, “transmission I / F”, and “relay destination buffer size” corresponding to the logical address of the relay destination. Then, based on the information indicated by these items, the CPU 11 identifies a relay frame generation method corresponding to the communication protocol of the relay destination ECU 30 or the in-vehicle network 40 from the received relay request frame.
 そして、中継方式が蓄積中継である場合には、全ての中継要求フレームの受信が完了した後に、上記生成方法に従い、受信した中継要求フレームに基づき新たな中継フレームを生成し、中継先のECU30等への該中継フレームの送信を開始する。 When the relay method is accumulation relay, after the reception of all relay request frames is completed, a new relay frame is generated based on the received relay request frame in accordance with the generation method, and the relay destination ECU 30 or the like The transmission of the relay frame to is started.
 一方、逐次中継である場合には、CPU11は、中継要求フレームを受信する度に、上記生成方法に従い該中継要求フレームに基づき新たな中継フレームを生成し、中継先のECU30等に送信する。このとき、CPU11は、受信した中継要求フレームを、そのまま中継先のECU30に送信するということも考えられる。 On the other hand, in the case of sequential relay, every time the relay request frame is received, the CPU 11 generates a new relay frame based on the relay request frame according to the above generation method, and transmits it to the relay destination ECU 30 or the like. At this time, the CPU 11 may transmit the received relay request frame as it is to the relay destination ECU 30.
 なお、使用している中継用バッファのサイズが「中継用バッファサイズ」が示すバッファのサイズに達した場合には、CPU11は、中継を中断してS100に処理を移行する。 If the size of the relay buffer being used reaches the buffer size indicated by the “relay buffer size”, the CPU 11 interrupts the relay and shifts the process to S100.
 また、中継がなされる間、CPU11は、中継したフレームのデータサイズや、中継に要した時間を計測し、中継が終了すると、これらの情報を中継先の論理アドレスに対応する「履歴情報」として登録し、その後、S100に処理を移行する。 During relaying, the CPU 11 measures the data size of the relayed frame and the time required for relaying. When the relaying is completed, these pieces of information are used as “history information” corresponding to the logical address of the relay destination. After that, the process proceeds to S100.
 このような中継処理により、ECU30や外部装置20は、中継先となるECU30や外部装置20の論理アドレスが設定された中継要求フレームをゲートウェイ10に送信することで、中継先にデータを送信することができる。このため、ECU30等は、中継先のECU30等の物理アドレスや通信プロトコル等を把握していなくても、論理アドレスさえ把握していれば、ゲートウェイ10を経由して他のECU30等と通信を行うことができる。 By such relay processing, the ECU 30 and the external device 20 transmit data to the relay destination by transmitting to the gateway 10 a relay request frame in which the logical addresses of the ECU 30 and the external device 20 serving as the relay destination are set. Can do. For this reason, the ECU 30 or the like communicates with other ECUs 30 or the like via the gateway 10 as long as it knows the logical address even if it does not know the physical address or communication protocol of the relay destination ECU 30 or the like. be able to.
 また、ゲートウェイ10のルーティングテーブル50に論理アドレスが登録されてない場合には、ゲートウェイ10ではアドレス解決がなされ、該論理アドレスに対応するECU30等に関する識別情報がルーティングテーブル50に登録される。これにより、ゲートウェイ10は、送信先のECU30等に関する識別情報を把握していなくても、該ECU30等にデータを中継することができる。 Further, when the logical address is not registered in the routing table 50 of the gateway 10, the address is resolved in the gateway 10, and the identification information related to the ECU 30 or the like corresponding to the logical address is registered in the routing table 50. Thereby, the gateway 10 can relay data to the ECU 30 or the like even if the gateway 10 does not grasp the identification information regarding the ECU 30 or the like of the transmission destination.
 このため、ECU30が新たに追加された場合や交換された場合であっても、他のECU30は、新たに追加等されたECU30の論理アドレスを把握していれば、ゲートウェイ10を介して通信を行うことができる。また、外部装置20についても同様に、新たに追加等されたECU30の論理アドレスを把握していれば、ゲートウェイ10を介して該ECU30と通信を行い、該ECU30の故障診断等を行うことができる。 For this reason, even when the ECU 30 is newly added or replaced, as long as the other ECU 30 knows the logical address of the newly added ECU 30, the communication is performed via the gateway 10. It can be carried out. Similarly, if the external device 20 knows the logical address of the newly added ECU 30, it can communicate with the ECU 30 via the gateway 10 to perform failure diagnosis of the ECU 30. .
 したがって、本実施形態のゲートウェイ10を用いることで、ECU30の追加や交換を容易に行うことが可能となる。 Therefore, it is possible to easily add or replace the ECU 30 by using the gateway 10 of the present embodiment.
 <外部通信処理について>
 次に、故障診断用の外部装置20がゲートウェイ10を経由してECU30と通信を行い、ECU30の故障診断等を行う外部通信処理について、図7に記載のフローチャートを用いて説明する。なお、本処理は、外部装置20にてユーザからの指示に応じて開始される。
<External communication processing>
Next, external communication processing in which the external device 20 for failure diagnosis communicates with the ECU 30 via the gateway 10 and performs failure diagnosis of the ECU 30 will be described with reference to a flowchart shown in FIG. This process is started in response to an instruction from the user at the external device 20.
 S200では、外部装置20は、ECU30等の故障診断や各種設定等を行うための車載連携アプリを起動し、S205に処理を移行する。 In S200, the external device 20 activates an in-vehicle cooperation application for performing failure diagnosis, various settings, and the like of the ECU 30, etc., and proceeds to S205.
 S205では、外部装置20は、エンジン,ブレーキ,エアコン等といった抽象的な車両の機能や診断項目をディスプレイに表示し、タッチパネル等を介してこれらの機能等の選択を受け付ける。各機能等には、これに関連する1または複数のECU30の論理アドレスが対応付けられており、機能等の選択を受け付けることで、故障診断のターゲットECU30が設定される。また、機能等の選択を受け付けた後には、外部装置20は、該機能等に対してユーザが行おうとする処置(例えば、故障診断の内容や各種設定変更)の入力を受け付ける。 In S205, the external device 20 displays abstract vehicle functions and diagnostic items such as an engine, a brake, and an air conditioner on a display, and accepts selection of these functions and the like via a touch panel or the like. Each function or the like is associated with a logical address of one or a plurality of ECUs 30 related thereto, and a target ECU 30 for failure diagnosis is set by accepting selection of the function or the like. In addition, after accepting selection of a function or the like, the external device 20 accepts an input of a measure (for example, failure diagnosis contents or various setting changes) that the user intends to perform on the function or the like.
 続くS210では、外部装置20は、ユーザからの入力内容に基づき、ターゲットECU30に送信する中継要求フレーム60を生成する。すなわち、外部装置20は、ゲートウェイ10との間の通信プロトコルに基づき、プロトコル依存部61を生成する。また、外部装置20は、ターゲットECU30の論理アドレスをターゲットアドレス63として設定すると共に、自装置の論理アドレスをソースアドレス62として設定する。 In subsequent S210, the external device 20 generates a relay request frame 60 to be transmitted to the target ECU 30 based on the input content from the user. That is, the external device 20 generates the protocol dependence unit 61 based on the communication protocol with the gateway 10. The external device 20 sets the logical address of the target ECU 30 as the target address 63 and sets the logical address of its own device as the source address 62.
 さらに、外部装置20は、入力された処置に対応する内容のメッセージ64(例えば、故障コードや指定したアドレスに保存されているデータの送信要求や、ECU30の設定値の変更要求等)を生成する。そして、外部装置20は、これらに基づき中継要求フレーム60を生成すると共に、該中継要求フレーム60をゲートウェイ10に送信する。 Furthermore, the external device 20 generates a message 64 (for example, a request for transmitting a data stored in a failure code or a specified address, a request for changing a set value of the ECU 30) corresponding to the input action. . The external device 20 generates a relay request frame 60 based on these, and transmits the relay request frame 60 to the gateway 10.
 続くS215では、外部装置20は、ゲートウェイ10経由でターゲットECU30からの応答となる中継フレームを受信するのを待つ。そして、該中継フレームを受信すると、外部装置20は、該中継フレームのメッセージの内容に応じた処理(例えば、故障コードや読み出したデータを表示する処理や、ECU30の設定値の変更の結果を表示する処理)を行い、S205に処理を移行する。 In the subsequent S215, the external device 20 waits to receive a relay frame as a response from the target ECU 30 via the gateway 10. When the relay frame is received, the external device 20 displays processing corresponding to the content of the message in the relay frame (for example, processing for displaying a fault code and read data, and a result of changing the set value of the ECU 30). And the process proceeds to S205.
 上述したように、外部装置20は、ECU30の物理アドレスや通信プロトコル等を把握していなくても、論理アドレスさえ把握していれば、ゲートウェイ10を経由してECU30と通信を行うことができる。さらに、ECU30が追加或いは交換され、ECU30の物理アドレスや通信に用いられるフレームのID等が変わった場合であっても、ゲートウェイ10によりアドレス解決が行われるため、外部装置20は、ECU30の追加等が行われる以前と同様に通信を行うことができる。 As described above, the external device 20 can communicate with the ECU 30 via the gateway 10 as long as it knows the logical address even if it does not know the physical address and communication protocol of the ECU 30. Furthermore, even when the ECU 30 is added or exchanged and the physical address of the ECU 30 or the ID of the frame used for communication changes, the address resolution is performed by the gateway 10, so the external device 20 can add the ECU 30, etc. Communication can be performed in the same manner as before.
 このため、故障診断用の外部装置20は、メーカや車種、さらには車種の型に関り無くECU30と通信を行うことができ、メーカ等に応じて外部装置20を使い分けたり、故障診断用のアプリを使い分けること無く、汎用的に故障診断を行うことが可能となる。 Therefore, the external device 20 for failure diagnosis can communicate with the ECU 30 regardless of the manufacturer, the vehicle type, and the type of the vehicle type, and the external device 20 can be used properly according to the manufacturer or the like. It is possible to perform fault diagnosis generically without using different apps.
 したがって、故障診断用の外部装置20は、上述した外部通信処理のように、抽象的な車両の機能や診断項目に基づく故障診断機能を提供することが可能となる。このため、ユーザは、ECU30の物理アドレスや故障診断に用いられるフレームのID等、高度な車載ネットワークの知識を有していなくても、外部装置20を用いて容易にその対象と故障診断を行うことができる。 Therefore, the external device 20 for failure diagnosis can provide a failure diagnosis function based on abstract vehicle functions and diagnosis items, as in the above-described external communication processing. For this reason, even if the user does not have advanced in-vehicle network knowledge such as the physical address of the ECU 30 and the ID of the frame used for failure diagnosis, the user can easily perform failure diagnosis of the target using the external device 20. be able to.
 さらに、外部装置20としてスマートフォンを用いることで、一般ユーザでも容易に故障診断を行うことができる。 Furthermore, by using a smartphone as the external device 20, a general user can easily perform a failure diagnosis.
 [アドレス解決の具体例について]
 <具体例1>
 まず、蓄積中継が行われる場合(アプリケーションレベルで中継が行われる場合)に、例えばCANに準拠した車載ネットワーク40に接続されたECU30等のアドレス解決を行う処理の具体例の1つについて説明する。
[Specific examples of address resolution]
<Specific example 1>
First, one example of a process for performing address resolution of the ECU 30 connected to the in-vehicle network 40 compliant with CAN, for example, when accumulation relay is performed (when relay is performed at the application level) will be described.
 このような場合のアドレス解決指示フレーム300は、CAN-ID301としてブロードキャスト送信を示すIDが設定される。また、データフィールドは、N_PCI(Network Protocol Control Information)302,SID(Service ID)303,送信先論理アドレス304,送信元論理アドレス305,オプション306から構成される(図8参照)。 In the address resolution instruction frame 300 in such a case, an ID indicating broadcast transmission is set as the CAN-ID 301. Further, the data field is composed of N_PCI (Network Protocol Control Information) 302, SID (Service ID) 303, transmission destination logical address 304, transmission source logical address 305, and option 306 (see FIG. 8).
 N_PCI302は、SF(Single Frame),FF(First Frame)等といったフレームの種別を示し、SID303は、当該アドレス解決指示フレーム300による指示内容等を示す。また、送信先論理アドレス304は、中継先のECU30等の論理アドレスを示し、送信元論理アドレス305は、中継元のECU30等の論理アドレスを示し、オプション306は、アドレス解決に関連する各種情報を示す。 N_PCI 302 indicates the type of frame such as SF (Single Frame) or FF (First Frame), and SID 303 indicates the content of the instruction by the address resolution instruction frame 300. Further, the transmission destination logical address 304 indicates a logical address of the relay destination ECU 30 or the like, the transmission source logical address 305 indicates a logical address of the relay source ECU 30 or the like, and the option 306 indicates various information related to address resolution. Show.
 また、アドレス解決応答フレーム310は、CAN-ID311としてゲートウェイ10を送信先とすることを示すIDが設定される。また、データフィールドには、N_PCI312,RSID(Response Service ID)313,Type314,要求CAN-ID315,応答CAN-ID316,オプション317から構成される。 In the address resolution response frame 310, an ID indicating that the gateway 10 is the transmission destination is set as the CAN-ID 311. The data field includes N_PCI 312, RSID (Response Service ID) 313, Type 314, Request CAN-ID 315, Response CAN-ID 316, and Option 317.
 RSID313は、当該アドレス解決応答フレーム310による応答内容等を示し、Type314は、中継先の車載ネットワーク40の通信プロトコルを示す。また、要求CAN-ID315は、中継先のECU30等への送信に用いられるCAN-IDを示し、応答CAN-ID316は中継先のECU30等からの応答に用いられるCAN-IDを示す。 RSID 313 indicates the response content by the address resolution response frame 310, and Type 314 indicates the communication protocol of the in-vehicle network 40 as a relay destination. The request CAN-ID 315 indicates a CAN-ID used for transmission to the relay destination ECU 30 or the like, and the response CAN-ID 316 indicates a CAN-ID used for a response from the relay destination ECU 30 or the like.
 なお、例えば、中継先のECU30の故障診断がなされる場合であれば、要求CAN-ID315,応答CAN-ID316として、該ECU30の故障診断のためのCAN-IDが設定される。 Note that, for example, when a failure diagnosis of the relay destination ECU 30 is performed, a CAN-ID for failure diagnosis of the ECU 30 is set as the request CAN-ID 315 and the response CAN-ID 316.
 次に、CANに準拠した各車載ネットワーク40に接続された外部装置20とAECU30aとの間の通信を、ゲートウェイ10がアプリケーションレベルで中継する場合(蓄積中継が行われる場合)のアドレス解決の具体例について、図9に記載のフローチャートを用いて説明する。 Next, a specific example of address resolution when the gateway 10 relays communication between the external device 20 connected to each in-vehicle network 40 compliant with CAN and the ACECU 30a at the application level (when accumulation relay is performed). Will be described with reference to the flowchart shown in FIG.
 S400では、外部装置20(論理アドレスは例として0xE403)が、AECU30a(論理アドレスは例として0x100A)にデータを送信すべく、ゲートウェイ10(論理アドレスは例として0x1000)に中継要求フレームを送信する。論理アドレスは、バイナリデータもしくは構造が定義されたオブジェクトであるが、本例ではバイナリデータとて記載している。 In S400, the external device 20 (logical address is 0xE403 as an example) transmits a relay request frame to the gateway 10 (logical address is 0x1000 as an example) in order to transmit data to the AECU 30a (logical address is 0x100A as an example). The logical address is binary data or an object having a defined structure, but is described as binary data in this example.
 このとき、データサイズが8バイト以下の場合であれば、SFとして構成された中継要求フレームが送信される。 At this time, if the data size is 8 bytes or less, a relay request frame configured as SF is transmitted.
 一方、データサイズが8バイトより大きい場合には、FF,CF(Consecutive Frame)として構成された中継要求フレームが複数回にわたり送信される。すなわち、外部装置20からゲートウェイ10に対し、最初にFFとして構成された中継要求フレームが送信され、これに対する応答として、ゲートウェイ10から外部装置20にFC(Flow Control)が送信される。その後、外部装置20からゲートウェイ10にCFとして構成された中継要求フレームが送信されると共に、ゲートウェイ10から外部装置20にFCが応答され、以後、送信が完了するまで、外部装置20とゲートウェイ10とは交互にCF(中継要求フレーム)とFCを送信する。 On the other hand, when the data size is larger than 8 bytes, the relay request frame configured as FF, CF (Consecutive Frame) is transmitted a plurality of times. That is, the relay request frame configured as FF is first transmitted from the external device 20 to the gateway 10, and FC (Flow Control) is transmitted from the gateway 10 to the external device 20 as a response thereto. Thereafter, a relay request frame configured as a CF is transmitted from the external device 20 to the gateway 10, and an FC is returned from the gateway 10 to the external device 20. Thereafter, until the transmission is completed, the external device 20 and the gateway 10 Alternately transmit CF (relay request frame) and FC.
 そして、ゲートウェイ10は、中継要求フレームを受信すると、上述した中継処理によりルーティングテーブル50から中継先のAECU30aの論理アドレスを検索し(S405)、検索に失敗した場合には、アドレス解決のための処理を行う。 When the gateway 10 receives the relay request frame, the gateway 10 searches the routing table 50 for the logical address of the relay destination AECU 30a by the relay processing described above (S405), and if the search fails, processing for address resolution is performed. I do.
 具体的には、ゲートウェイ10は、接続されている全ての車載ネットワーク40に、アドレス解決指示フレームをブロードキャスト送信し、中継先のAECU30aからのアドレス解決応答フレームの受信を待つ(S410)。なお、CANに準拠した車載ネットワーク40には、上述したアドレス解決指示フレーム300がブロードキャスト送信される。 Specifically, the gateway 10 broadcasts an address resolution instruction frame to all connected in-vehicle networks 40 and waits for reception of an address resolution response frame from the relay destination AECU 30a (S410). Note that the above-described address resolution instruction frame 300 is broadcasted to the in-vehicle network 40 compliant with CAN.
 このとき、AECU30a以外の他のECU30等は、アドレス解決指示フレームを受信しても、送信先論理アドレスが自装置の論理アドレスを示していないため、該アドレス解決指示フレームを無視する。 At this time, even if the ECU 30 other than the AECU 30a receives the address resolution instruction frame, it ignores the address resolution instruction frame because the destination logical address does not indicate its own logical address.
 そして、ゲートウェイ10は、AECU30aからアドレス解決応答フレーム310を受信すると、AECU30aの論理アドレスや識別情報等をルーティングテーブル50(キャッシュテーブル)に登録する(S415)。 When the gateway 10 receives the address resolution response frame 310 from the AECU 30a, the gateway 10 registers the logical address, identification information, and the like of the AECU 30a in the routing table 50 (cache table) (S415).
 なお、ゲートウェイ10は、アドレス解決のための処理を、外部装置20からの中継要求フレームの受信完了後に行っても良いし、中継要求フレームの受信と並行して行っても良い。 Note that the gateway 10 may perform processing for address resolution after completion of reception of the relay request frame from the external device 20, or may be performed in parallel with reception of the relay request frame.
 その後、ゲートウェイ10は、外部装置20からの中継要求フレームの受信が完了すると共に、AECU30aの登録が完了すると、受信した中継要求フレームからAECU30aに対応する中継フレームを生成し、該中継フレームをAECU30aに送信する(S420)。なお、中継フレームが複数である場合には、同様にして、FF,CFとして構成された中継フレームが複数回にわたり送信される。 After that, the gateway 10 completes reception of the relay request frame from the external device 20, and when registration of the AECU 30a is completed, the gateway 10 generates a relay frame corresponding to the AECU 30a from the received relay request frame, and sends the relay frame to the AECU 30a. Transmit (S420). When there are a plurality of relay frames, similarly, the relay frames configured as FF and CF are transmitted a plurality of times.
 その後、AECU30aは、外部装置20を中継先として、応答となる中継要求フレームを送信したとする(S425)。ゲートウェイ10は、これらの中継要求フレームの受信が完了すると、ルーティングテーブル50を参照して受信した中継要求フレームから外部装置20に対応する中継フレームを生成し、該中継フレームを外部装置20に送信する(S430)。 Thereafter, it is assumed that the AECU 30a transmits a relay request frame as a response using the external device 20 as a relay destination (S425). When the reception of these relay request frames is completed, the gateway 10 generates a relay frame corresponding to the external device 20 from the relay request frame received with reference to the routing table 50, and transmits the relay frame to the external device 20. (S430).
 なお、中継要求フレームや中継フレームが複数である場合には、同様にして、FF,CFとして構成された中継要求フレーム等が複数回にわたり送信される。 In addition, when there are a plurality of relay request frames and relay frames, similarly, a relay request frame configured as FF or CF is transmitted a plurality of times.
 また、CAN以外の通信プロトコルに準拠した各車載ネットワーク40に接続されたECU30等の間の通信をアプリケーションレベルで中継する場合においても、ゲートウェイ10は、同様にしてアドレス解決を行う。 In addition, when relaying communication between the ECU 30 and the like connected to each in-vehicle network 40 that complies with a communication protocol other than CAN at the application level, the gateway 10 similarly performs address resolution.
 <具体例2>
 次に、逐次中継が行われる場合(ネットワークレベルで中継が行われる場合)に、例えばCANに準拠した車載ネットワーク40に接続されたECU30等のアドレス解決を行う処理について説明する。
<Specific example 2>
Next, when sequential relaying is performed (when relaying is performed at the network level), for example, processing for performing address resolution of the ECU 30 or the like connected to the in-vehicle network 40 compliant with CAN will be described.
 このような場合のアドレス解決指示フレーム320は、CAN-ID321としてブロードキャスト送信を示すIDが設定される。また、データフィールドは、アドレス解決指示を示すデータ(例として1111b)が設定されたN_PCI322(4ビット),送信先論理アドレス323,送信元論理アドレス324,オプション325から構成される(図10参照)。 In the address resolution instruction frame 320 in such a case, an ID indicating broadcast transmission is set as the CAN-ID 321. The data field includes N_PCI 322 (4 bits) in which data indicating an address resolution instruction (for example, 1111b) is set, a transmission destination logical address 323, a transmission source logical address 324, and an option 325 (see FIG. 10). .
 また、アドレス解決応答フレーム330は、CAN-ID331としてゲートウェイ10が受信できるIDが設定される。また、データフィールドには、アドレス解決応答を示すデータ(例として1110b)が設定されたN_PCI332(4ビット),要求CAN-ID333,応答CAN-ID334,オプション335から構成される。 In the address resolution response frame 330, an ID that can be received by the gateway 10 is set as the CAN-ID 331. The data field includes N_PCI 332 (4 bits) in which data indicating an address resolution response (for example, 1110b) is set, a request CAN-ID 333, a response CAN-ID 334, and an option 335.
 N_PCI322,332は、SF,FF等のフレームの種別を示すものであるが、ネットワークレベルの中継が行われる場合、該種別の1つとしてアドレス解決指示やアドレス解決応答が設けられている。 N_PCI 322 and 332 indicate the type of frame such as SF, FF, etc. When network level relaying is performed, an address resolution instruction and an address resolution response are provided as one of the types.
 なお、送信先論理アドレス323,送信元論理アドレス324,要求CAN-ID333,応答CAN-ID334,オプション325,335は、アプリケーションレベルで中継が行われる場合と同様の構成要素である。 It should be noted that the transmission destination logical address 323, the transmission source logical address 324, the request CAN-ID 333, the response CAN-ID 334, and the options 325 and 335 are the same components as when relaying is performed at the application level.
 次に、CANに準拠した各車載ネットワーク40に接続された外部装置20とAECU30aとの間の通信を、ゲートウェイ10がネットワークレベルで中継する場合のアドレス解決の具体例について、図11に記載のフローチャートを用いて説明する。 Next, a specific example of address resolution when the gateway 10 relays communication between the external device 20 connected to each in-vehicle network 40 compliant with CAN and the ACECU 30a at the network level is a flowchart shown in FIG. Will be described.
 S500では、外部装置20が、AECU30aに8バイトを越えるデータを送信すべく、ゲートウェイ10にFFとして構成された中継要求フレームを送信する。 In S500, the external device 20 transmits a relay request frame configured as FF to the gateway 10 in order to transmit data exceeding 8 bytes to the AECU 30a.
 ゲートウェイ10は、該中継要求フレームを受信すると、上述した中継処理によりルーティングテーブル50から中継先のAECU30の論理アドレスを検索し(S505)、検索に失敗した場合には、アドレス解決のための処理を行う。 When the gateway 10 receives the relay request frame, the gateway 10 searches the routing table 50 for the logical address of the relay destination AECU 30 by the relay processing described above (S505), and if the search fails, performs processing for address resolution. Do.
 具体的には、ゲートウェイ10は、全ての車載ネットワーク40にアドレス解決指示フレームをブロードキャスト送信し、中継先のAECU30aからのアドレス解決応答フレーム330の受信を待つ(S510)。なお、CANに準拠した車載ネットワーク40には、上述したアドレス解決指示フレーム320がブロードキャスト送信される。 Specifically, the gateway 10 broadcasts an address resolution instruction frame to all the in-vehicle networks 40 and waits for reception of an address resolution response frame 330 from the relay destination AECU 30a (S510). Note that the above-described address resolution instruction frame 320 is broadcasted to the in-vehicle network 40 compliant with CAN.
 このとき、AECU30a以外の他のECU30等は、アドレス解決指示フレームを受信しても、送信先論理アドレスが自装置の論理アドレスを示していないため、該アドレス解決指示フレームを無視する。 At this time, even if the ECU 30 other than the AECU 30a receives the address resolution instruction frame, it ignores the address resolution instruction frame because the destination logical address does not indicate its own logical address.
 そして、ゲートウェイ10は、AECU30aからアドレス解決応答フレーム330を受信すると、AECU30aの論理アドレスや識別情報等をルーティングテーブル50に登録する(S515)。 When the gateway 10 receives the address resolution response frame 330 from the AECU 30a, the gateway 10 registers the logical address, identification information, and the like of the AECU 30a in the routing table 50 (S515).
 これに続くS520では、ゲートウェイ10は、受信した中継要求フレームからAECU30aに対応する中継フレーム(FF)を生成し、該中継フレームをAECU30aに送信する。そして、ゲートウェイ10は、該中継フレームの応答としてAECU30aからFCを受信すると、該FCを中継元の外部装置20に対応するFC(中継フレーム)を生成し、該FCを外部装置20に送信する。 In subsequent S520, the gateway 10 generates a relay frame (FF) corresponding to the AECU 30a from the received relay request frame, and transmits the relay frame to the AECU 30a. When the gateway 10 receives the FC from the AECU 30a as a response to the relay frame, the gateway 10 generates an FC (relay frame) corresponding to the external device 20 that is the relay source, and transmits the FC to the external device 20.
 さらに、FCを受信した外部装置20は、CFとして構成された中継要求フレームをゲートウェイ10に送信する。ゲートウェイ10は、該中継要求フレームを受信すると、該中継要求フレームからAECU30aに対応する中継フレーム(CF)を生成し、該中継フレームをAECU30aに送信する。 Furthermore, the external device 20 that has received the FC transmits a relay request frame configured as a CF to the gateway 10. When the gateway 10 receives the relay request frame, the gateway 10 generates a relay frame (CF) corresponding to the AECU 30a from the relay request frame, and transmits the relay frame to the AECU 30a.
 これ以降、ゲートウェイ10は、外部装置20によるデータの送信が完了するまで、AECU30aからのFCの中継と、外部装置20からの中継要求フレーム(CF)の中継を交互に行う。 Thereafter, the gateway 10 alternately relays the FC from the AECU 30a and the relay request frame (CF) from the external device 20 until the data transmission by the external device 20 is completed.
 そして、AECU30aは、中継フレームの受信完了後、外部装置20に対し、8バイトを越える応答データの送信を開始したとする(S525)。AECU30aは、最初に、AECU30aを中継先として、ゲートウェイ10にFFとして構成された中継要求フレームを送信する。 Then, it is assumed that the AECU 30a starts transmission of response data exceeding 8 bytes to the external device 20 after the completion of reception of the relay frame (S525). The AECU 30a first transmits a relay request frame configured as FF to the gateway 10 with the AECU 30a as a relay destination.
 ゲートウェイ10は、中継要求フレームを受信すると、該中継要求フレームから外部装置20に対応する中継フレーム(FF)を生成し、該中継フレームを外部装置20に送信する。そして、ゲートウェイ10は、該中継フレームの応答として外部装置20からFCを受信すると、該FCを中継元のAECU30aに対応するFC(中継フレーム)を生成し、AECU30aに送信する。 When the gateway 10 receives the relay request frame, the gateway 10 generates a relay frame (FF) corresponding to the external device 20 from the relay request frame, and transmits the relay frame to the external device 20. When the gateway 10 receives an FC from the external device 20 as a response to the relay frame, the gateway 10 generates an FC (relay frame) corresponding to the relay source AECU 30a, and transmits the FC to the AECU 30a.
 一方、FCを受信したAECU30aは、CFとして構成された中継要求フレームをゲートウェイ10に送信する。ゲートウェイ10は、該中継要求フレームを受信すると、該中継要求フレームから外部装置20に対応する中継フレーム(CF)を生成し、外部装置20に送信する。 On the other hand, the AECU 30 a that has received the FC transmits a relay request frame configured as a CF to the gateway 10. When the gateway 10 receives the relay request frame, the gateway 10 generates a relay frame (CF) corresponding to the external device 20 from the relay request frame and transmits the relay frame (CF) to the external device 20.
 これ以降、ゲートウェイ10は、AECU30aによる送信が完了するまで、外部装置20からのFCの中継と、AECU30aからの中継要求フレーム(CF)の中継を交互に行う。 Thereafter, the gateway 10 alternately relays the FC from the external device 20 and the relay request frame (CF) from the AECU 30a until the transmission by the AECU 30a is completed.
 なお、外部装置20やAECU30aが8バイト以下のデータを送信する場合には、外部装置20等は、SFとして構成された1つの中継要求フレームが送信されるが、このような場合も、ゲートウェイ10は、同様にして必要に応じてアドレス解決を行った後に中継を行う。 When the external device 20 or the AECU 30a transmits data of 8 bytes or less, the external device 20 or the like transmits one relay request frame configured as SF. In the same way, relaying is performed after address resolution is performed as necessary.
 また、CAN以外の通信プロトコルに準拠した各車載ネットワーク40に接続されたECU30等の間の通信をネットワークレベルで中継する場合においても、ゲートウェイ10は、同様にしてアドレス解決を行う。 Also, when relaying communication between the ECUs 30 and the like connected to each in-vehicle network 40 compliant with a communication protocol other than CAN at the network level, the gateway 10 similarly performs address resolution.
 <具体例3>
 次に、異なる通信プロトコルに準拠した車載ネットワーク40に接続されたECU30等の間で中継が行われる場合のアドレス解決について説明する。このような場合には、一般的にアプリケーションレベルの中継を行うことが考えられる(無論、ネットワークレベルの中継が行われても良い)。
<Specific example 3>
Next, address resolution when relaying is performed between the ECU 30 and the like connected to the in-vehicle network 40 conforming to different communication protocols will be described. In such a case, it is generally considered to perform application level relay (of course, network level relay may be performed).
 このような場合、中継先の車載ネットワーク40がCANに準拠している場合には、図8に記載のアドレス解決指示フレーム300,アドレス解決応答フレーム310が用いられる。 In such a case, when the relay destination in-vehicle network 40 conforms to CAN, the address resolution instruction frame 300 and the address resolution response frame 310 shown in FIG. 8 are used.
 また、中継先の車載ネットワーク40がLINに準拠している場合には、次のようなアドレス解決指示フレーム340,アドレス解決応答フレーム350が用いられる(図12)。 When the relay destination in-vehicle network 40 is compliant with LIN, the following address resolution instruction frame 340 and address resolution response frame 350 are used (FIG. 12).
 すなわち、アドレス解決指示フレーム340は、IDフィールド341にアドレス解決指示を示すID(例として0x3C)が設定される。また、データフィールドは、ノードアドレス342,PCI(Protocol Control Information)343,SID344,送信先論理アドレス345,送信元論理アドレス346,オプション347から構成される。 That is, in the address resolution instruction frame 340, an ID indicating an address resolution instruction (for example, 0x3C) is set in the ID field 341. The data field includes a node address 342, PCI (Protocol Control Information) 343, SID 344, transmission destination logical address 345, transmission source logical address 346, and option 347.
 ノードアドレス342は、ブロードキャスト(例として0x7E)が設定され、PCI343は、SF,FF等といったフレームの種別を示し、SID344は、当該アドレス解決指示フレーム340による指示内容等を示す。また、送信先論理アドレス345は、中継先のECU30等の論理アドレスを示し、送信元論理アドレス346は、中継元のECU30等の論理アドレスを示し、オプション347は、アドレス解決に関連する各種情報を示す。 The node address 342 is set to broadcast (for example, 0x7E), the PCI 343 indicates the type of frame such as SF, FF, etc., and the SID 344 indicates the content of the instruction by the address resolution instruction frame 340. Further, the transmission destination logical address 345 indicates the logical address of the relay destination ECU 30 and the like, the transmission source logical address 346 indicates the logical address of the relay source ECU 30 and the like, and the option 347 displays various information related to address resolution. Show.
 また、アドレス解決応答フレーム350は、IDフィールド351にアドレス解決応答を示すIDである0x3Dが設定される。また、データフィールドは、ノードアドレス352,PCI353,RSID354,中継先ノードアドレス355,オプション356から構成される。 In the address resolution response frame 350, 0x3D that is an ID indicating an address resolution response is set in the ID field 351. The data field includes a node address 352, a PCI 353, an RSID 354, a relay destination node address 355, and an option 356.
 ノードアドレス352は、ゲートウェイ10を示すID(例として0x70)が設定され、RSID354は、当該アドレス解決応答フレーム350による応答内容等を示し、中継先ノードアドレス355は、中継先のECU30等のノードアドレスを示す。 The node address 352 is set with an ID (for example, 0x70) indicating the gateway 10, the RSID 354 indicates the response content by the address resolution response frame 350, and the relay destination node address 355 is the node address of the relay destination ECU 30 or the like. Indicates.
 また、中継先の車載ネットワーク40がFlexRayに準拠している場合には、次のようなアドレス解決指示フレーム360,アドレス解決応答フレーム370が用いられる(図13参照)。 Further, when the relay destination in-vehicle network 40 is compliant with FlexRay, the following address resolution instruction frame 360 and address resolution response frame 370 are used (see FIG. 13).
 すなわち、アドレス解決指示フレーム360は、フレームID361にアドレス解決指示を示すIDである0x100が設定される。また、データフィールドは、TA(Target Address)362,SA(Source Address)363,PCI364,送信先論理アドレス365,送信元論理アドレス366等から構成される。 That is, in the address resolution instruction frame 360, 0x100 which is an ID indicating an address resolution instruction is set in the frame ID 361. The data field is composed of TA (Target Address) 362, SA (Source Address) 363, PCI 364, transmission destination logical address 365, transmission source logical address 366, and the like.
 TA362は、ブロードキャストを示すIDが設定され、SA363はゲートウェイ10が受信できるIDが設定され、PCI364は、SF(Start Frame),CF等といったフレームの種別を示す。また、送信先論理アドレス365は、中継先のECU30等の論理アドレスを示し、送信元論理アドレス366は、中継元のECU30等の論理アドレスを示す。 TA 362 is set with an ID indicating broadcast, SA 363 is set with an ID that can be received by the gateway 10, and PCI 364 indicates a frame type such as SF (Start Frame), CF, or the like. The transmission destination logical address 365 indicates a logical address of the relay destination ECU 30 and the like, and the transmission source logical address 366 indicates a logical address of the relay source ECU 30 and the like.
 また、アドレス解決応答フレーム370は、フレームID371にアドレス解決応答を示すIDである0x101が設定され、データフィールドは、TA372,SA373,PCI374等から構成される。 Also, in the address resolution response frame 370, 0x101 which is an ID indicating an address resolution response is set in the frame ID 371, and the data field is composed of TA372, SA373, PCI374 and the like.
 TA372は、ゲートウェイ10が受信できるIDが設定され、SA373はアドレス解決応答フレーム370の送信元の物理アドレス(換言すれば、中継先のECU30等の物理アドレス)が設定される。 The TA 372 is set with an ID that can be received by the gateway 10, and the SA 373 is set with the physical address of the transmission source of the address resolution response frame 370 (in other words, the physical address of the relay destination ECU 30 or the like).
 次に、異なる通信プロトコルに準拠した各車載ネットワーク40に接続された外部装置20とAECU30aとの間で中継が行われる場合のアドレス解決の具体例について、図14に記載のフローチャートを用いて説明する。 Next, a specific example of address resolution when relaying is performed between the external device 20 connected to each in-vehicle network 40 conforming to a different communication protocol and the ACECU 30a will be described with reference to the flowchart shown in FIG. .
 S600では、外部装置20は、AECU30aにデータを送信すべく、ゲートウェイ10に中継要求フレームを送信する。このとき、データサイズに応じて、1回或いは複数回にわたり中継要求フレームが送信される。 In S600, the external device 20 transmits a relay request frame to the gateway 10 to transmit data to the AECU 30a. At this time, the relay request frame is transmitted once or a plurality of times according to the data size.
 一方、ゲートウェイ10は、中継要求フレームを受信すると、上述した中継処理によりルーティングテーブル50から中継先のAECU30aの論理アドレスを検索し(S605)、検索に失敗した場合には、アドレス解決のための処理を行う。 On the other hand, when the gateway 10 receives the relay request frame, the gateway 10 searches the routing table 50 for the logical address of the relay destination AECU 30a by the relay processing described above (S605). I do.
 具体的には、ゲートウェイ10は、接続されている全ての車載ネットワーク40に、アドレス解決指示フレームをブロードキャスト送信し、中継先のAECU30aからのアドレス解決応答フレームの受信を待つ(S610)。 Specifically, the gateway 10 broadcasts an address resolution instruction frame to all connected in-vehicle networks 40, and waits for reception of an address resolution response frame from the relay destination AECU 30a (S610).
 なお、CAN,LIN,FlexRayに準拠した車載ネットワーク40には、それぞれ、上述したアドレス解決指示フレーム300,340,360がブロードキャスト送信される。 The above-described address resolution instruction frames 300, 340, and 360 are broadcasted to the in-vehicle network 40 that conforms to CAN, LIN, and FlexRay, respectively.
 このとき、AECU30a以外の他のECU30等は、アドレス解決指示フレームを受信しても、送信先論理アドレスが自装置の論理アドレスを示していないため、該アドレス解決指示フレームを無視する。 At this time, even if the ECU 30 other than the AECU 30a receives the address resolution instruction frame, it ignores the address resolution instruction frame because the destination logical address does not indicate its own logical address.
 そして、ゲートウェイ10は、AECU30aからアドレス解決応答フレームを受信すると、AECU30aの論理アドレスや識別情報等をルーティングテーブル50に登録する(S615)。 Then, when the gateway 10 receives the address resolution response frame from the AECU 30a, the gateway 10 registers the logical address, identification information, and the like of the AECU 30a in the routing table 50 (S615).
 また、ゲートウェイ10は、外部装置20からの中継要求フレームの受信が完了すると共に、AECU30aの登録が完了すると、受信した中継要求フレームからAECU30aに対応する中継フレームを生成し、該中継フレームをAECU30aに送信する(S620)。このとき、中継されるデータサイズや、中継先の車載ネットワーク40の通信プロトコル等に応じて、1回或いは複数回にわたり中継フレームが送信される。 Further, the gateway 10 completes reception of the relay request frame from the external device 20, and when registration of the AECU 30a is completed, the gateway 10 generates a relay frame corresponding to the AECU 30a from the received relay request frame, and sends the relay frame to the AECU 30a. Transmit (S620). At this time, the relay frame is transmitted once or a plurality of times according to the data size to be relayed, the communication protocol of the in-vehicle network 40 as the relay destination, and the like.
 その後、AECU30aは、外部装置20を中継先として、応答となる中継要求フレームを送信したとする(S625)。ゲートウェイ10は、これらの中継要求フレームの受信が完了すると、受信した中継要求フレームから外部装置20に対応する中継フレームを生成し、該中継フレームを外部装置20に送信する(S630)。 Thereafter, it is assumed that the AECU 30a transmits a relay request frame as a response using the external device 20 as a relay destination (S625). When the reception of these relay request frames is completed, the gateway 10 generates a relay frame corresponding to the external device 20 from the received relay request frame, and transmits the relay frame to the external device 20 (S630).
 <その他>
 具体例1~3では、フローチャートにより異なる車載ネットワーク40に接続された外部装置20とECU30との間の通信が行われる場合の中継やアドレス解決について説明した。
<Others>
In specific examples 1 to 3, relaying and address resolution in the case where communication is performed between the external device 20 and the ECU 30 connected to different in-vehicle networks 40 according to the flowcharts have been described.
 しかし、異なる車載ネットワーク40に接続されたECU30間の通信が行われる場合や、無線通信等を介してゲートウェイ10と通信を行う外部装置20とECUとの間で通信が行われる場合も、同様にして中継やアドレス解決がなされる。 However, the same applies to the case where communication between the ECUs 30 connected to different in-vehicle networks 40 is performed, or the case where communication is performed between the external device 20 that communicates with the gateway 10 via wireless communication or the like and the ECU. Relay and address resolution.
 また、同一の車載ネットワーク40に接続された外部装置20とECU30との間や、ECU30間においては、具体例2と同様にして中継やアドレス解決がなされる。 Further, relaying and address resolution are performed between the external device 20 and the ECU 30 connected to the same in-vehicle network 40 and between the ECUs 30 in the same manner as in the second specific example.
 [他の実施形態]
 (1)車載ネットワーク40の通信プロトコルとしてイーサネットが用いられる場合が想定されるが、このような場合、PC等により構成されるネットワークにおけるアドレス解決を行うARP(Address Resolution Protocol)に準拠したフレームや手順によりアドレス解決を行っても良い。こうすることにより、既存のリソースを流用することができ、開発コストを抑えつつ、信頼性を向上させることが可能となる。
[Other Embodiments]
(1) Although it is assumed that Ethernet is used as the communication protocol of the in-vehicle network 40, in such a case, a frame or procedure conforming to ARP (Address Resolution Protocol) for performing address resolution in a network constituted by a PC or the like. Address resolution may be performed by By doing so, it is possible to divert existing resources, and it is possible to improve reliability while suppressing development costs.
 しかし、ARPは、PC等のアドレス解決を想定しているため、本実施形態のアドレス解決に比べ、用いられるフレームの構成や手順が複雑なものとなっている。このため、車載ネットワーク40の通信プロトコルとして、CAN,LIN等の車載用の通信プロトコルが主に用いられるという場合には、本実施形態のように、簡易的な構成のフレームや手順によりアドレス解決を行うのが好適であると考えられる。 However, since ARP assumes address resolution of a PC or the like, the frame configuration and procedure used are more complicated than address resolution of this embodiment. For this reason, when an in-vehicle communication protocol such as CAN or LIN is mainly used as the communication protocol of the in-vehicle network 40, address resolution is performed by a simple configuration frame or procedure as in this embodiment. It is considered preferable to do so.
 (2)また、従来、ゲートウェイでは、該ゲートウェイに接続された複数の車載ネットワーク毎に予め中継用バッファが確保されており、中継を行う際には、中継先の車載ネットワークに対応する中継用バッファを用いる構成となっていた。このため、車載ネットワークの数の増加に伴い予め確保すべき中継用バッファのサイズが増加し、RAMの容量が枯渇するという問題があった。 (2) Conventionally, in a gateway, a relay buffer is secured in advance for each of a plurality of in-vehicle networks connected to the gateway. When relaying, a relay buffer corresponding to the in-vehicle network as a relay destination is used. It has become the composition which uses. For this reason, as the number of in-vehicle networks increases, the size of the relay buffer to be secured in advance increases, and there is a problem that the capacity of the RAM is depleted.
 そこで、本実施形態のゲートウェイ10では、各車載ネットワーク40に共通の中継用領域を設け、中継を行う際、該中継用領域から、中継先の車載ネットワーク40の通信プロトコル等に応じたサイズの中継用バッファを動的に確保する構成としても良い。こうすることにより、中継に必要なRAM容量を節約することができる。 Therefore, in the gateway 10 of the present embodiment, when a relay area common to each in-vehicle network 40 is provided and relaying is performed, a relay having a size corresponding to the communication protocol of the relay-mounted in-vehicle network 40 is performed from the relay area. A configuration may be adopted in which the buffer for use is dynamically secured. By doing so, the RAM capacity required for relaying can be saved.
 (3)本実施形態のゲートウェイ10は、外部装置20と通信可能に構成されているが、外部装置20と通信を行うこと無く、ECU30間の通信を中継する構成としても良い。このような構成を有する場合であっても、同様の効果を得ることができる。 (3) Although the gateway 10 of the present embodiment is configured to be communicable with the external device 20, it may be configured to relay communication between the ECUs 30 without communicating with the external device 20. Even if it has such a structure, the same effect can be acquired.
 ゲートウェイ10が車載用中継装置に、ECU30が車載装置に相当し、ゲートウェイ10の通信処理部15,テレマティクス用通信部16,通信部17が通信部に、RAM12,ROM13が記憶部に相当する。 The gateway 10 corresponds to an in-vehicle relay device, the ECU 30 corresponds to an in-vehicle device, the communication processing unit 15, the telematics communication unit 16, and the communication unit 17 of the gateway 10 correspond to a communication unit, and the RAM 12 and the ROM 13 correspond to a storage unit.
 また、ルーティングテーブル50が対応情報に、中継要求フレーム60が中継要求データに、中継フレームが中継データに相当する。 Also, the routing table 50 corresponds to correspondence information, the relay request frame 60 corresponds to relay request data, and the relay frame corresponds to relay data.
 また、アドレス解決指示フレーム300,320,340,360が指示データに、アドレス解決応答フレーム310,330,350,370が応答データに相当する。 The address resolution instruction frames 300, 320, 340, and 360 correspond to instruction data, and the address resolution response frames 310, 330, 350, and 370 correspond to response data.
 また、中継処理のS105が特定部に、S115が指示部に、S125が登録部に、S130が生成部に、S135が送信部に相当する。 Also, S105 of the relay process corresponds to a specifying unit, S115 corresponds to an instruction unit, S125 corresponds to a registration unit, S130 corresponds to a generation unit, and S135 corresponds to a transmission unit.
 上記の開示は次の態様を含む。 The above disclosure includes the following aspects.
 本開示の一態様による車載用中継装置10は、通信部15~17、記憶部12,13、特定部S105、指示部S115、登録部S125、生成部S130と通信部S135を備える。通信部15~17は、車両に設けられた複数の車載ネットワーク40を構成する複数の車載装置30の各車載装置、或いは、車両の外部に設けられた外部装置20と通信を行う。記憶部12,13は、複数の車載装置30の一部の各々に割当てられた論理アドレスと、複数の車載装置30の一部の各々を識別するための識別情報が対応付けて登録されている対応情報50を記憶している。特定部S105は、通信部15~17を介して、車載装置30或いは外部装置20から、ターゲット論理アドレスを含む中継要求データ60を受信すると、ターゲット論理アドレスが対応情報50に登録されている複数の論理アドレスの一つと同じであるかを判定する。特定部S105は、ターゲット論理アドレスが対応情報50に登録されている複数の論理アドレスの一つと同じであると判定すると、ターゲット論理アドレスと同じである複数の論理アドレスの一つに対応付けられた識別情報を特定する。指示部S115は、特定部S105が識別情報の特定に失敗した場合、指示データ300,320,340,360を、通信部15~17を介して複数の車載装置30にブロードキャスト送信する。指示データ300,320,340,360は、複数の車載装置30の一つでありターゲット論理アドレスが割当てられたターゲット車載装置に対してターゲット車載装置の識別情報を含む応答データ310,330,350,370を通信部15~17に送信するよう指示するデータである。登録部S125は、通信部15~17を介してターゲット車載装置から指示データ300,320,340,360に応じた応答データ310,330,350,370を受信すると、応答データ310,330,350,370に含まれているターゲット車載装置の識別情報と、中継要求データ60に含まれているターゲット論理アドレスとを、対応情報50に対応付けて登録する。生成部S130は、特定部S105が識別情報を特定した場合、特定された識別情報と、中継要求データ60とに基づき、特定された識別情報により識別したターゲット車載装置に対応する中継データを生成する。生成部S130は、さらに、特定部S105が識別情報の特定に失敗した場合、指示データ300,320,340,360の送信に応じてターゲット車載装置から受信した応答データ310,330,350,370に含まれる識別情報と、中継要求データ60とに基づき、ターゲット車載装置に対応する中継データを生成する。送信部S135は、通信部15~17を介して、中継データを、ターゲット車載装置に送信する。 The in-vehicle relay device 10 according to an aspect of the present disclosure includes communication units 15 to 17, storage units 12 and 13, a specification unit S105, an instruction unit S115, a registration unit S125, a generation unit S130, and a communication unit S135. The communication units 15 to 17 communicate with each in-vehicle device of the plurality of in-vehicle devices 30 constituting the plurality of in-vehicle networks 40 provided in the vehicle or with the external device 20 provided outside the vehicle. In the storage units 12 and 13, a logical address assigned to each part of the plurality of in-vehicle devices 30 and identification information for identifying each part of the plurality of in-vehicle devices 30 are registered in association with each other. Correspondence information 50 is stored. When the specifying unit S105 receives the relay request data 60 including the target logical address from the in-vehicle device 30 or the external device 20 via the communication units 15 to 17, a plurality of target logical addresses registered in the correspondence information 50 are received. Determine if it is the same as one of the logical addresses. If the identifying unit S105 determines that the target logical address is the same as one of the plurality of logical addresses registered in the correspondence information 50, the identifying unit S105 associates the target logical address with one of the plurality of logical addresses that are the same as the target logical address. Identify identification information. When the specifying unit S105 fails to specify the identification information, the instruction unit S115 broadcasts the instruction data 300, 320, 340, 360 to the plurality of in-vehicle devices 30 via the communication units 15-17. The instruction data 300, 320, 340, 360 is response data 310, 330, 350 including identification information of the target in-vehicle device with respect to the target in-vehicle device to which the target logical address is assigned. 370 is data instructing to transmit 370 to the communication units 15 to 17. When the registration unit S125 receives response data 310, 330, 350, 370 corresponding to the instruction data 300, 320, 340, 360 from the target in-vehicle device via the communication units 15-17, the response data 310, 330, 350, The identification information of the target in-vehicle device included in 370 and the target logical address included in the relay request data 60 are registered in association with the correspondence information 50. When the identification unit S105 identifies the identification information, the generation unit S130 generates relay data corresponding to the target in-vehicle device identified by the identified identification information based on the identified identification information and the relay request data 60. . Further, when the specifying unit S105 fails to specify the identification information, the generating unit S130 adds the response data 310, 330, 350, 370 received from the target in-vehicle device in response to the transmission of the instruction data 300, 320, 340, 360. Based on the included identification information and the relay request data 60, relay data corresponding to the target in-vehicle device is generated. The transmission unit S135 transmits the relay data to the target in-vehicle device via the communication units 15-17.
 上記のような構成によれば、車載装置30や外部装置20は、送信先となる車載装置30や外部装置20の論理アドレスが設定された中継要求データ60を車載用中継装置10に送信することで、送信先の車載装置30等にデータを送信することができる。このため、車載装置等30は、送信先の車載装置30等の物理アドレスや通信プロトコル等を把握していなくても、論理アドレスさえ把握していれば、車両用中継装置10を経由して他の車載装置30等と通信を行うことができる。 According to the configuration as described above, the in-vehicle device 30 and the external device 20 transmit the relay request data 60 in which the logical addresses of the in-vehicle device 30 and the external device 20 that are transmission destinations are set to the in-vehicle relay device 10. Thus, data can be transmitted to the in-vehicle device 30 as the transmission destination. For this reason, even if the in-vehicle device 30 does not know the physical address or communication protocol of the destination in-vehicle device 30 or the like, as long as it knows the logical address, the in-vehicle device 30 etc. It is possible to communicate with the in-vehicle device 30 and the like.
 また、車載用中継装置10の対応情報50に送信先の論理アドレスが登録されてない場合には、車載用中継装置10では、指示データ300,320,340,360をブロードキャスト送信することでアドレス解決がなされ、該ターゲット論理アドレスに対応する車載装置30等に関する識別情報が対応情報50に登録される。これにより、車載用中継装置10は、送信先の車載装置30等に関する識別情報を把握していなくても、該車載装置30等にデータを中継することができる。 If the destination logical address is not registered in the correspondence information 50 of the in-vehicle relay device 10, the in-vehicle relay device 10 broadcasts instruction data 300, 320, 340, 360 to resolve the address. The identification information related to the in-vehicle device 30 corresponding to the target logical address is registered in the correspondence information 50. As a result, the in-vehicle relay device 10 can relay data to the in-vehicle device 30 or the like without knowing the identification information regarding the destination in-vehicle device 30 or the like.
 このため、車載装置30が新たに追加された場合や、車載装置30が交換された場合であっても、他の車載装置30は、新たに追加等された車載装置30の論理アドレスを把握していれば、車載用中継装置10を介してデータの送受信を行うことができる。また、外部装置20についても同様に、新たに追加等された車載装置30の論理アドレスを把握していれば、車載用中継装置10を介して該車載装置30とデータの送受信を行い、該車載装置30の故障診断等を行うことができる。したがって、上記車載用中継装置10によれば、車載装置の追加や交換を容易に行うことが可能となる。 Therefore, even when the in-vehicle device 30 is newly added or when the in-vehicle device 30 is replaced, the other in-vehicle device 30 grasps the logical address of the newly added in-vehicle device 30. If so, data can be transmitted and received via the in-vehicle relay device 10. Similarly, for the external device 20, if the logical address of the newly added in-vehicle device 30 is grasped, data is transmitted / received to / from the in-vehicle device 30 via the in-vehicle relay device 10, and A failure diagnosis of the device 30 can be performed. Therefore, according to the in-vehicle relay device 10, it is possible to easily add or replace the in-vehicle device.
 さらに、中継要求データ60は、複数の車載装置30の一つから複数の車載装置30の他の車載装置に対して送信されるデータであってもよい。さらに、中継要求データ60は、通信部15~17に一時的に接続される外部装置20から、複数の車載装置30の一つの故障診断を行うため複数の車載装置30の一つに送信されるデータであってもよい。 Furthermore, the relay request data 60 may be data transmitted from one of the plurality of in-vehicle devices 30 to another in-vehicle device 30. Further, the relay request data 60 is transmitted from the external device 20 temporarily connected to the communication units 15 to 17 to one of the plurality of in-vehicle devices 30 in order to perform one failure diagnosis of the plurality of in-vehicle devices 30. It may be data.
 本開示は、実施例に準拠して記述されたが、本開示は当該実施例や構造に限定されるものではないと理解される。本開示は、様々な変形例や均等範囲内の変形をも包含する。加えて、様々な組み合わせや形態、さらには、それらに一要素のみ、それ以上、あるいはそれ以下、を含む他の組み合わせや形態をも、本開示の範疇や思想範囲に入るものである。 Although the present disclosure has been described based on the embodiments, it is understood that the present disclosure is not limited to the embodiments and structures. The present disclosure includes various modifications and modifications within the equivalent range. In addition, various combinations and forms, as well as other combinations and forms including only one element, more or less, are within the scope and spirit of the present disclosure.

Claims (3)

  1.  車両に設けられた複数の車載ネットワーク(40)を構成する複数の車載装置(30)の各車載装置、或いは、前記車両の外部に設けられた外部装置(20)と通信を行う通信部(15~17)と、
     前記複数の車載装置(30)の一部の各々に割当てられた論理アドレスと、前記複数の車載装置(30)の一部の各々を識別するための識別情報が対応付けて登録されている対応情報(50)を記憶している記憶部(12,13)と、
     前記通信部(15~17)を介して、前記車載装置(30)或いは前記外部装置(20)から、ターゲット論理アドレスを含む中継要求データ(60)を受信すると、前記ターゲット論理アドレスが前記対応情報(50)に登録されている前記複数の論理アドレスの一つと同じであるかを判定し、前記ターゲット論理アドレスが前記対応情報(50)に登録されている前記複数の論理アドレスの一つと同じである場合、前記ターゲット論理アドレスと同じである前記複数の論理アドレスの一つに対応付けられた前記識別情報を特定する特定部(S105)と、
     前記特定部(S105)が前記識別情報の特定に失敗した場合、指示データ(300,320,340,360)を、前記通信部(15~17)を介して前記複数の車載装置(30)にブロードキャスト送信する指示部(S115)と、前記指示データ(300,320,340,360)は、前記複数の車載装置(30)の一つであり前記ターゲット論理アドレスが割当てられたターゲット車載装置に対して前記ターゲット車載装置の識別情報を含む応答データ(310,330,350,370)を前記通信部(15~17)に送信するよう指示するデータであり、
     前記通信部(15~17)を介して前記ターゲット車載装置から前記指示データ(300,320,340,360)に応じた前記応答データ(310,330,350,370)を受信すると、前記応答データ(310,330,350,370)に含まれている前記ターゲット車載装置の識別情報と、前記中継要求データ(60)に含まれている前記ターゲット論理アドレスとを、前記対応情報(50)に対応付けて登録する登録部(S125)と、
     前記特定部(S105)が前記識別情報を特定した場合、前記特定された識別情報と、前記中継要求データ(60)とに基づき、前記特定された識別情報により識別したターゲット車載装置に対応する中継データを生成し、前記特定部(S105)が前記識別情報の特定に失敗した場合、前記指示データ(300,320,340,360)の送信に応じて前記ターゲット車載装置から受信した前記応答データ(310,330,350,370)に含まれる前記識別情報と、前記中継要求データ(60)とに基づき、前記ターゲット車載装置に対応する中継データを生成する生成部(S130)と、
     前記通信部(15~17)を介して、前記中継データを、前記ターゲット車載装置に送信する送信部(S135)と、
     を備える車載用中継装置(10)。
    A communication unit (15) that communicates with each in-vehicle device of a plurality of in-vehicle devices (30) constituting a plurality of in-vehicle networks (40) provided in the vehicle or an external device (20) provided outside the vehicle. To 17),
    Correspondence in which a logical address assigned to each part of the plurality of in-vehicle devices (30) and identification information for identifying each part of the plurality of in-vehicle devices (30) are registered in association with each other. A storage unit (12, 13) storing information (50);
    When the relay request data (60) including the target logical address is received from the in-vehicle device (30) or the external device (20) via the communication unit (15 to 17), the target logical address is converted into the correspondence information. It is determined whether it is the same as one of the plurality of logical addresses registered in (50), and the target logical address is the same as one of the plurality of logical addresses registered in the correspondence information (50). If there is, a specifying unit (S105) that specifies the identification information associated with one of the plurality of logical addresses that is the same as the target logical address;
    When the identification unit (S105) fails to identify the identification information, the instruction data (300, 320, 340, 360) is sent to the plurality of in-vehicle devices (30) via the communication unit (15-17). The instruction unit (S115) for broadcast transmission and the instruction data (300, 320, 340, 360) are one of the plurality of in-vehicle devices (30) and are assigned to the target in-vehicle device to which the target logical address is assigned. Response data (310, 330, 350, 370) including identification information of the target in-vehicle device is instructed to transmit to the communication unit (15-17),
    When the response data (310, 330, 350, 370) corresponding to the instruction data (300, 320, 340, 360) is received from the target in-vehicle device via the communication unit (15-17), the response data (310, 330, 350, 370) The target in-vehicle device identification information included in (310, 330, 350, 370) and the target logical address included in the relay request data (60) correspond to the correspondence information (50). A registration unit (S125) for registration with attachment;
    When the identification unit (S105) identifies the identification information, the relay corresponding to the target in-vehicle device identified by the identified identification information based on the identified identification information and the relay request data (60) If the identification unit (S105) fails to identify the identification information, the response data (300, 320, 340, 360) received from the target in-vehicle device in response to the transmission of the instruction data is generated. 310, 330, 350, 370) based on the identification information and the relay request data (60), a generating unit (S130) that generates relay data corresponding to the target in-vehicle device;
    A transmission unit (S135) for transmitting the relay data to the target in-vehicle device via the communication unit (15 to 17);
    A vehicle-mounted relay device (10) comprising:
  2.  前記中継要求データ(60)は、前記複数の車載装置(30)の一つから前記複数の車載装置(30)の他の車載装置に対して送信される請求項1に記載の車載用中継装置。 The in-vehicle relay device according to claim 1, wherein the relay request data (60) is transmitted from one of the plurality of in-vehicle devices (30) to another in-vehicle device of the plurality of in-vehicle devices (30). .
  3.  前記中継要求データ(60)は、前記通信部(15-17)に一時的に接続される前記外部装置(20)から、前記複数の車載装置(30)の一つの故障診断を行うため前記複数の車載装置(30)の一つに送信される請求項1または請求項2に記載の車載用中継装置。 The relay request data (60) is sent from the external device (20) temporarily connected to the communication unit (15-17) to perform one failure diagnosis of the plurality of in-vehicle devices (30). The in-vehicle relay device according to claim 1 or 2, which is transmitted to one of the on-vehicle devices (30).
PCT/JP2013/007523 2013-02-05 2013-12-23 On-board relay device WO2014122711A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2013020499A JP2014154920A (en) 2013-02-05 2013-02-05 On-vehicle relay device
JP2013-020499 2013-02-05

Publications (1)

Publication Number Publication Date
WO2014122711A1 true WO2014122711A1 (en) 2014-08-14

Family

ID=51299327

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2013/007523 WO2014122711A1 (en) 2013-02-05 2013-12-23 On-board relay device

Country Status (2)

Country Link
JP (1) JP2014154920A (en)
WO (1) WO2014122711A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6487571B1 (en) * 2017-09-27 2019-03-20 株式会社小松製作所 Collective switch device for work vehicle and work vehicle equipped with collective switch device
CN112583691A (en) * 2019-09-30 2021-03-30 丰田自动车株式会社 Relay device and external device
CN113268050A (en) * 2021-05-19 2021-08-17 上海小鹏汽车科技有限公司 Vehicle diagnosis method and device

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6200779B2 (en) * 2013-10-31 2017-09-20 日立オートモティブシステムズ株式会社 Communication control device
JP6375962B2 (en) * 2015-01-21 2018-08-22 トヨタ自動車株式会社 In-vehicle gateway device and electronic control device
JP6464901B2 (en) * 2015-04-13 2019-02-06 株式会社デンソー In-vehicle communication system and relay device
JP6506850B2 (en) * 2015-10-05 2019-04-24 日立オートモティブシステムズ株式会社 Vehicle gateway device
JP6519461B2 (en) * 2015-12-08 2019-05-29 トヨタ自動車株式会社 Communications system
JP7024765B2 (en) * 2018-08-10 2022-02-24 株式会社デンソー Vehicle master device, update data distribution control method, and update data distribution control program

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
TAKAYUKI SAITO ET AL.: "Koredake wa Osaetai Protocol Saishin 50 - Teiban 20 (ARP)", NIKKEI NETWORK, no. 153, 28 December 2012 (2012-12-28), pages 52 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6487571B1 (en) * 2017-09-27 2019-03-20 株式会社小松製作所 Collective switch device for work vehicle and work vehicle equipped with collective switch device
WO2019064387A1 (en) * 2017-09-27 2019-04-04 株式会社小松製作所 Work vehicle aggregation switch device and work vehicle equipped with aggregation switch device
US10450724B2 (en) 2017-09-27 2019-10-22 Komatsu Ltd. Work vehicle collective switch apparatus and work vehicle equipped with collective switch apparatus
CN112583691A (en) * 2019-09-30 2021-03-30 丰田自动车株式会社 Relay device and external device
US11340888B2 (en) 2019-09-30 2022-05-24 Toyota Jidosha Kabushiki Kaisha Relay device and external device
CN113268050A (en) * 2021-05-19 2021-08-17 上海小鹏汽车科技有限公司 Vehicle diagnosis method and device

Also Published As

Publication number Publication date
JP2014154920A (en) 2014-08-25

Similar Documents

Publication Publication Date Title
WO2014122711A1 (en) On-board relay device
CN108370342B (en) Gateway device, in-vehicle network system, transfer method, and program
US8665891B2 (en) Gateway apparatus
CN108370343B (en) Network hub, transfer method, and vehicle-mounted network system
CN110635933B (en) Apparatus, control method, and recording medium for managing network of SDN
CN105388858B (en) Method of operating a communication node in a network
US10749738B2 (en) Method and apparatus for diagnosing network
JP2007038921A (en) Vehicle communication system and electronic control device
CN113395197B (en) Gateway device, in-vehicle network system, transfer method, and computer-readable recording medium
CN109873652B (en) Vehicle-mounted relay device, external device, information processing device, method, and system
JP5637193B2 (en) Communications system
WO2017203905A1 (en) Network hub, transfer method, and on-vehicle network system
JP2018125601A (en) Repeating installation
JP4786330B2 (en) In-vehicle LAN system, electronic control unit and relay connection unit
US10250434B2 (en) Electronic control apparatus
JP2017118407A (en) Communication system
JP7459881B2 (en) Management device, in-vehicle system, communication management method, and communication management program
JP7310570B2 (en) In-vehicle update device, program, and program update method
JP7328928B2 (en) In-vehicle relay device, information processing method and program
JP6191546B2 (en) In-vehicle network system and in-vehicle relay device
JP6200734B2 (en) Communication control device
JP4361540B2 (en) Gateway device, data transfer method, and program
KR20180038970A (en) Operation method of communication node for selective wakeup in vehicle network
JP6593230B2 (en) Communications system
JP2009010851A (en) On-vehicle gateway device

Legal Events

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

Ref document number: 13874730

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13874730

Country of ref document: EP

Kind code of ref document: A1