JP2014154920A - On-vehicle relay device - Google Patents

On-vehicle relay device Download PDF

Info

Publication number
JP2014154920A
JP2014154920A JP2013020499A JP2013020499A JP2014154920A JP 2014154920 A JP2014154920 A JP 2014154920A JP 2013020499 A JP2013020499 A JP 2013020499A JP 2013020499 A JP2013020499 A JP 2013020499A JP 2014154920 A JP2014154920 A JP 2014154920A
Authority
JP
Japan
Prior art keywords
relay
vehicle
ecu
frame
gateway
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
JP2013020499A
Other languages
Japanese (ja)
Inventor
Go Enosaki
豪 榎崎
Mitsuhiro Natsume
充啓 夏目
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso Corp
Original Assignee
Denso Corp
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 Denso Corp filed Critical Denso Corp
Priority to JP2013020499A priority Critical patent/JP2014154920A/en
Priority to PCT/JP2013/007523 priority patent/WO2014122711A1/en
Publication of JP2014154920A publication Critical patent/JP2014154920A/en
Pending legal-status Critical Current

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an on-vehicle gate way that makes it possible to easily add or replace an ECU.SOLUTION: When receiving a relay request frame from an external device or ECU, a gate way retrieves a physical address and so on of a relay destination from a routing table based on the physical address of ECU or the like of the relay destination set in the frame (S105). When the retrieval succeeds (S110: Yes), relay is carried out based on the result of the retrieval. On the other hand, if the retrieval fails (S110: No), the gate way performs broadcast transmission of a frame instructing transmission of the physical address, and so on to the relay destination (S115). When receiving the physical address and so on from the relay destination, they are registered in the routing table (S125), and relay to the ECU or the like, which is a relay destination, is carried out.

Description

本発明は、車載装置へのデータの中継を行う車載用中継装置に関する。   The present invention relates to a vehicle-mounted relay device that relays data to a vehicle-mounted 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.

そして、各車載ネットワークは中継装置に接続されており、異なる車載ネットワークに接続された車載装置は、中継装置を経由して通信を行う。また、中継装置に故障診断用の外部装置を接続し、中継装置を経由して外部装置と車載装置とが通信を行うことで、車載装置の故障診断を行うことが知られている。   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.

特表2009−527168号公報Special table 2009-527168

ところで、中継装置は、各車載装置の識別情報や、該車載装置が接続されている車載ネットワークの識別情報等を有しており、これらの情報に基づき、異なる車載ネットワークに接続された車載装置間、或いは、外部装置と車載装置との間の通信を中継する。   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.

本願発明は上記課題に鑑みてなされたものであり、車載装置の追加や交換を容易に行うことが可能となる車載用中継装置を提供することを目的とする。   This invention is made | formed in view of the said subject, and it aims at providing the vehicle-mounted relay apparatus which can perform addition or replacement | exchange of a vehicle-mounted apparatus easily.

上記課題に鑑みてなされた請求項1に係る車載用中継装置は、自車両に設けられた複数の車載ネットワークを構成する各車載装置、或いは、自装置に一時的に接続された外部装置と通信を行う通信手段と、車載装置を示す論理アドレスと、該論理アドレスが示す車載装置に関する識別情報とが対応付けて登録されている対応情報を記憶している記憶手段と、通信手段を介して、車載装置或いは外部装置から、論理アドレスを含む中継要求データを受信すると、対応情報に登録されている、該論理アドレスが示す車載装置に関する識別情報を特定する特定手段と、を備える。   The in-vehicle relay device according to claim 1 made in view of the above problems communicates with each in-vehicle device constituting a plurality of in-vehicle networks provided in the own vehicle or an external device temporarily connected to the own device. Via the communication means, the storage means storing the correspondence information registered in association with the logical address indicating the in-vehicle device and the identification information related to the in-vehicle device indicated by the logical address, via the communication means, When relay request data including a logical address is received from the in-vehicle device or the external device, a specifying unit that specifies identification information related to the in-vehicle device indicated by the logical address registered in the correspondence information is provided.

また、該車載用中継装置は、特定手段が識別情報の特定に失敗した場合、該識別情報に係る車載装置に対し該識別情報を含む応答データを自装置に送信することを指示する指示データを、通信手段を介して複数の車載装置にブロードキャスト送信する指示手段と、通信手段を介して応答データを受信すると、該応答データに含まれている識別情報と、該識別情報に係る車載装置を示す論理アドレスとを、対応情報に対応付けて登録する登録手段と、を備える。   In addition, when the specifying unit fails to specify the identification information, the in-vehicle relay device receives instruction data that instructs the in-vehicle device related to the identification information to transmit response data including the identification information to the own device. , Indicating means for broadcasting to a plurality of in-vehicle devices via the communication means, and receiving response data via the communication means, the identification information included in the response data and the in-vehicle device related to the identification information Registration means for registering the logical address in association with the correspondence information.

また、該車載用中継装置は、特定手段が識別情報の特定に成功した場合、該識別情報と、該識別情報に係る車載装置を示す論理アドレスを含む中継要求データとに基づき、該車載装置に対応する中継データを生成し、特定手段が識別情報の特定に失敗した場合、該失敗により送信された指示データに応じて受信した応答データに含まれる識別情報と、該識別情報に係る車載装置を示す論理アドレスを含む中継要求データとに基づき、該車載装置に対応する中継データを生成する生成手段と、通信手段を介して、生成手段により生成された中継データを、該中継データに対応する車載装置に送信する送信手段と、を備える。   In addition, when the specifying unit succeeds in specifying the identification information, the in-vehicle relay device is connected to the in-vehicle device based on the identification information and relay request data including a logical address indicating the in-vehicle device related to the identification information. When the corresponding relay data is generated and the identification unit fails to identify the identification information, the identification information included in the response data received according to the instruction data transmitted due to the failure, and the in-vehicle device related to the identification information Based on the relay request data including the logical address to indicate, the generating means for generating the relay data corresponding to the in-vehicle device, and the relay data generated by the generating means via the communication means, the in-vehicle corresponding to the relay data Transmitting means for transmitting to the apparatus.

このような構成によれば、車載装置や外部装置は、送信先となる車載装置や外部装置の論理アドレスが設定された中継要求データを車載用中継装置に送信することで、送信先の車載装置等にデータを送信することができる。このため、車載装置等は、送信先の車載装置等の物理アドレスや通信プロトコル等を把握していなくても、論理アドレスさえ把握していれば、車両用中継装置を経由して他の車載装置等と通信を行うことができる。   According to such a configuration, the in-vehicle device or the external device transmits the relay request data in which the logical address of the in-vehicle device or the external device as the transmission destination is set to the in-vehicle relay device, so that the in-vehicle device of the transmission destination Data can be transmitted to the For this reason, even if the in-vehicle device or the like does not know the physical address or communication protocol of the destination in-vehicle device or the like, as long as it knows the logical address, the other in-vehicle device via the vehicle relay device Etc. can communicate.

また、車載用中継装置の対応情報に送信先の論理アドレスが登録されてない場合には、車載用中継装置では、指示データをブロードキャスト送信することでアドレス解決がなされ、該論理アドレスに対応する車載装置等に関する識別情報が対応情報に登録される。これにより、車載用中継装置は、送信先の車載装置等に関する識別情報を把握していなくても、該車載装置等にデータを中継することができる。   Further, when the destination logical address is not registered in the correspondence information of the in-vehicle relay device, the in-vehicle relay device performs address resolution by broadcasting the instruction data, and the in-vehicle corresponding to the logical address Identification information regarding the device or the like is registered in the correspondence information. As a result, the in-vehicle relay device can relay data to the in-vehicle device or the like even if the identification information regarding the destination in-vehicle device or the like is not grasped.

このため、車載装置が新たに追加された場合や、車載装置が交換された場合であっても、他の車載装置は、新たに追加等された車載装置の論理アドレスを把握していれば、車載用中継装置を介してデータの送受信を行うことができる。また、外部装置についても同様に、新たに追加等された車載装置の論理アドレスを把握していれば、車載用中継装置を介して該車載装置とデータの送受信を行い、該車載装置の故障診断等を行うことができる。   For this reason, even when the in-vehicle device is newly added or when the in-vehicle device is replaced, if the other in-vehicle device knows the logical address of the newly added in-vehicle device, Data can be transmitted and received via the in-vehicle relay device. Similarly, for external devices, if the logical address of a newly added in-vehicle device is known, data is transmitted to and received from the in-vehicle device via the in-vehicle relay device, and the failure diagnosis of the in-vehicle device is performed. Etc. can be performed.

したがって、請求項1に記載の車載用中継装置によれば、車載装置の追加や交換を容易に行うことが可能となる。   Therefore, according to the in-vehicle relay device of the first aspect, it is possible to easily add or replace the in-vehicle device.

ゲートウェイの構成を示すブロック図である。It is a block diagram which shows the structure of a gateway. ルーティングテーブルの構成を示すブロック図である。It is a block diagram which shows the structure of a routing table. アプリケーションレベルの中継が行われる場合のゲートウェイ等の通信機能の階層構造を示す説明図である。It is explanatory drawing which shows the hierarchical structure of communication functions, such as a gateway in case an application level relay is performed. ネットワークレベルの中継が行われる場合のゲートウェイ等の通信機能の階層構造を示す説明図である。It is explanatory drawing which shows the hierarchical structure of communication functions, such as a gateway in case a network level relay is performed. 中継要求フレームの構造を示す説明図である。It is explanatory drawing which shows the structure of a relay request | requirement frame. 中継処理のフローチャートである。It is a flowchart of a relay process. 外部通信処理のフローチャートである。It is a flowchart of an external communication process. アプリケーションレベルの中継が行われる場合の、CANに準拠したアドレス解決指示フレーム,アドレス解決応答フレームの構造を示す説明図である。It is explanatory drawing which shows the structure of the address resolution instruction | indication frame based on CAN, and an address resolution response frame in case an application level relay is performed. アプリケーションレベルの中継が行われる場合における、CANに準拠した各車載ネットワークに接続された外部装置とECUとの間で中継が行われる際のアドレス解決についてのフローチャートである。It is a flowchart about the address resolution at the time of relaying between the external device connected to each vehicle-mounted network based on CAN, and ECU when application level relaying is performed. ネットワークレベルの中継が行われる場合の、CANに準拠したアドレス解決指示フレーム,アドレス解決応答フレームの構造を示す説明図である。It is explanatory drawing which shows the structure of the address resolution instruction | indication frame based on CAN, and an address resolution response frame in case a network level relay is performed. ネットワークレベルの中継が行われる場合における、CANに準拠した各車載ネットワークに接続された外部装置とECUとの間で中継が行われる際のアドレス解決についてのフローチャートである。It is a flowchart about the address resolution at the time of relaying between the external device connected to each vehicle-mounted network based on CAN, and ECU when network level relaying is performed. アプリケーションレベルの中継が行われる場合の、LINに準拠したアドレス解決指示フレーム,アドレス解決応答フレームの構造を示す説明図である。It is explanatory drawing which shows the structure of the address resolution instruction | indication frame and address resolution response frame based on LIN when relay of an application level is performed. アプリケーションレベルの中継が行われる場合の、FlexRayに準拠したアドレス解決指示フレーム,アドレス解決応答フレームの構造を示す説明図である。It is explanatory drawing which shows the structure of the address resolution instruction | indication frame based on FlexRay, and an address resolution response frame in case an application level relay is performed. 異なる通信プロトコルに準拠した各車載ネットワークに接続された外部装置とECUとの間で中継が行われる際のアドレス解決についてのフローチャートである。It is a flowchart about the address resolution at the time of relaying between the external device connected to each vehicle-mounted network based on a different communication protocol, and ECU.

以下、本発明の実施形態について図面を用いて説明する。なお、本発明の実施の形態は、下記の実施形態に何ら限定されることはなく、本発明の技術的範囲に属する限り種々の形態を採りうる。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. The embodiment of the present invention is not limited to the following embodiment, and can take various forms as long as they belong to the technical scope of the present invention.

[構成の説明]
<ゲートウェイについて>
本実施形態の車載用のゲートウェイ10は、CAN,LIN等の通信プロトコルに準拠した複数の車載ネットワーク40に接続され、車載ネットワーク40に接続されたECU30間の通信を中継するよう構成されている(図1参照)。なお、ゲートウェイ10は、同一の通信プロトコルに準拠した複数の車載ネットワーク40に接続されていても良い。
[Description of configuration]
<About the gateway>
The in-vehicle gateway 10 of this embodiment is connected to a plurality of in-vehicle networks 40 compliant with a communication protocol such as CAN, LIN, etc., and is configured to relay communication between the ECUs 30 connected to the in-vehicle network 40 ( (See FIG. 1). The gateway 10 may be connected to a plurality of in-vehicle networks 40 that conform to the same communication protocol.

また、ゲートウェイ10は、例えば、ECU30の故障診断用のアプリケーションを搭載したスマートフォンや、故障診断用ツール等として構成された外部装置20と通信を行うことができる。そして、外部装置20は、ゲートウェイ10を経由してECU30と通信を行うことで、ECU30の故障診断等を行うことが可能となっている。   The gateway 10 can communicate with, for example, a smartphone equipped with an application for failure diagnosis of the ECU 30 or an external device 20 configured as a failure diagnosis tool. The external device 20 can perform a failure diagnosis of the ECU 30 by communicating with the ECU 30 via the gateway 10.

なお、外部装置20は、無線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 a wireless LAN, or may be temporarily connected to the in-vehicle network 40 and connected to the gateway 10 via the in-vehicle network 40. Communication may be performed. 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は、CPU11,RAM12,ROM13,通信部17,テレマティクス用通信部16等から構成され、これらは、内部バス14により接続されている。
CPU11は、ROM13に記憶されているプログラムに従って動作し、ゲートウェイ10を統括制御する。なお、該プログラムの一つとして、通信部17を制御するための通信処理部15が設けられている。
The gateway 10 includes a CPU 11, a RAM 12, a ROM 13, a communication unit 17, a telematics communication unit 16, and the like, which are connected by an internal bus 14.
The CPU 11 operates according to a program stored in the ROM 13 and controls the gateway 10 as a whole. As one of the programs, a communication processing unit 15 for controlling the communication unit 17 is provided.

また、テレマティクス用通信部16は、無線通信網にアクセスするための部位であり、該部位により、無線通信網を介して外部装置20と通信が行われる。
また、通信部17は、一例として、無線LAN,WiFi,BT(Bluetooth(登録商標))等に準拠した無線通信を行う部位17a〜17cを有しており、これらの部位により外部装置20と無線通信が行われる。また、通信部17は、一例として、CAN,LIN,MOST,イーサネット(登録商標),FlexRay,USB等に準拠した通信を行う部位17d〜17iを有している。これらの部位により、車載ネットワーク40を構成するECU30や、車載ネットワーク40に一時的に接続された外部装置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.
In addition, the communication unit 17 includes, as an example, portions 17a to 17c that perform wireless communication in conformity with a wireless LAN, WiFi, BT (Bluetooth (registered trademark)), and the like. Communication takes place. Moreover, the communication part 17 has the site | parts 17d-17i which perform communication based on CAN, LIN, MOST, Ethernet (trademark), FlexRay, USB etc. as an example. 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と通信を行う。
また、本実施形態では、各ECU30,外部装置20には固有の論理アドレスが設定されており、ECU30及び外部装置20は、ゲートウェイ10を介して通信を行う場合等には、論理アドレスにより中継先を指定する構成となっている。なお、複数のECU30に対応する論理アドレスが設けられていても良く、このような場合には、該論理アドレスを中継先として指定することで、対応する複数のECU30に同時に中継がなされる。
And CPU11 communicates with ECU30 connected to the external device 20 and the vehicle-mounted network 40 via the communication part 17 by operate | moving according to the communication process part 15. FIG.
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への通信が禁止され、その結果、例えば、スマートフォンからエアバックの機能を停止させるような不適切な処理が防止される。   “Relayability information” is an item indicating a 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等への通信を中継する際に用いる中継用バッファのサイズを示す。
具体的に説明すると、例えば、イーサネットはCANよりも通信速度が速く、1フレームのデータ長も大きい。このため、イーサネットに接続されたECU30からCANに接続されたECU30への中継を行う場合、中継元から受信したデータを一旦バッファし、該データを分割して順次中継する蓄積中継を行う必要がある。「中継用バッファサイズ」とは、このような蓄積中継等に用いる中継用バッファのサイズを示す。
The “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.
More specifically, for example, Ethernet 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に中継を行う際の方式を示す項目である。
中継方式としては、上述した蓄積中継のほか、中継元からフレームを受信する度に、必要に応じて該フレームに改変を加えて中継先の車載ネットワーク40等に送出する方式(逐次中継)が考えられる。中継方式を蓄積中継とするか逐次中継とするかは、例えば、中継先となる車載ネットワーク40等の通信速度等に基づき決定される。
The “relay type” is an item indicating a method for relaying to the ECU indicated by the logical address corresponding to the gateway 10.
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等通信上必要な情報を引き当てるために使用する。   The “ECU identification information” is an item indicating identification information (for example, a 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の識別情報を示す。
また、「送信I/F」とは、対応する論理アドレスが示すECU30等(中継先のECU30等)が接続されている車載ネットワーク40と中継元の車載ネットワーク40の通信プロトコルが異なる場合における、中継するフレームの変換方法を示す。
The “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.

また、「中継先バッファサイズ」とは、論理アドレスに対応するECU30等が備える通信用のバッファサイズを示す。ゲートウェイ10は、該ECU30への中継を行う場合には、該バッファサイズを考慮して該ECU30に中継するフレームのデータ長等を決定する。   The “relay destination buffer size” indicates a buffer size for communication 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等の論理アドレス等は、後述するアドレス解決によりキャッシュテーブルに登録される。   Then, 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に関する情報が登録されている。
<ゲートウェイ等の通信機能について>
次に、ゲートウェイ10,ECU30,外部装置20における通信機能について説明する。該通信機能は、AP(アプリケーション)層,TP(トランスポート)層,NW(ネットワーク)層,DL(データリンク)層,物理層に階層化される(図3,4参照)。
In addition, for logical addresses indicating a plurality of ECUs 30, information relating to these ECUs 30 is registered in each item corresponding to the logical addresses.
<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 AP (application) layer, a TP (transport) layer, an NW (network) layer, a DL (data link) layer, and a physical layer (see FIGS. 3 and 4).

また、上述したように、ゲートウェイ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層中心に中継やアドレス解決が行われる(換言すれば、蓄積中継は、アプリケーションレベルでの中継と言える)。
すなわち、ゲートウェイ10では、通信部17がDL層,物理層として機能し、通信処理部15がTP層,NW層として機能する。また、ゲートウェイ10には、CPU11を制御するプログラムとしてGW制御部11a,アドレス解決部11bが設けられており、これらが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).
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. Further, the gateway 10 is provided with a GW control unit 11a and an address resolution unit 11b as programs for controlling the CPU 11, and these function as an AP layer.

一方、ECU30は、自装置が接続された車載ネットワーク40の通信プロトコルに準拠した通信を行う通信部34がDL層,物理層として機能し、通信部34を制御する通信処理部33がTP層,NW層として機能する。また、ECU30には、CPUを制御するプログラムであって、AP層として機能するサーバ部31,アドレス解決部32が設けられている。サーバ部31は、ゲートウェイ10を経由して他のECU30や外部装置20と通信を行い、アドレス解決部32は、上述したアドレス解決のための処理を行う。   On the other hand, in the ECU 30, the communication unit 34 that performs communication in accordance with the communication protocol of the in-vehicle network 40 to which the device is connected functions as the DL layer and the physical layer, and the communication processing unit 33 that controls the communication unit 34 includes the TP layer, It functions as an NW layer. Further, the ECU 30 is provided with a server unit 31 and an address resolution unit 32 that 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は、予め定められた通信プロトコルに準拠した通信を行う通信部23がDL層,物理層として機能し、通信部23を制御する通信処理部22がTP層,NW層として機能する。また、外部装置20のCPUを制御するプログラムであって、AP層として機能するクライアント部21が設けられ、該クライアント部21は、ゲートウェイ10を経由してECU30と通信を行うことで、ECU30の故障診断等を行う。   In the external device 20, the communication unit 23 that performs communication in accordance with a predetermined communication protocol functions as the DL layer and the physical layer, and the communication processing unit 22 that controls the communication unit 23 functions as the TP layer and the NW layer. To do. In addition, a client unit 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, thereby causing a malfunction of the ECU 30. Make a diagnosis.

そして、外部装置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は、上述したアドレス解決のための処理を行う。
これに対し、逐次中継は、主に、同一の通信プロトコルに準拠した車載ネットワーク40に接続されたECU30や外部装置20の通信を中継する場合に行われる(無論、異なる通信プロトコルに準拠した車載ネットワーク40に接続されたECU30や外部装置20間の通信を中継する場合に行われても良い)。なお、図4は、一例として、CANに準拠した異なる車載ネットワーク40に接続された外部装置20とECU30との間の通信を中継する場合を示している。
The address resolution unit 11b performs the above-described processing for address resolution.
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層を中心に中継やアドレス解決が行われる(換言すれば、逐次中継は、ネットワークレベルでの中継と言える)。
すなわち、ゲートウェイ10では、通信部17がDL層,物理層として機能する。また、ゲートウェイ10には、CPU11を制御するプログラムと通信処理部15とから構成されるルータ制御部15a,アドレス解決部15bが設けられており、これらがAP層,TP層,NW層として機能する。
When sequential relay is performed, relay and address resolution are performed centering on the NW layer, TP layer, and AP layer (in other words, sequential relay can be said to be relay at the network level).
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 15a and an address resolution unit 15b configured by a program for controlling the CPU 11 and a communication processing unit 15, and these function as an AP layer, a TP layer, and an NW layer. .

一方、ECU30は、通信部34がDL層,物理層として機能し、通信処理部33がTP層,NW層として機能し、サーバ部31がAP層として機能する。また、CPUを制御するプログラムと、通信処理部33とから構成されるアドレス解決部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 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, and the address described above. Process for resolution.

なお、外部装置20は、蓄積中継が行われる場合と同様の構成を有している。
そして、外部装置20やECU30からゲートウェイ10に中継要求フレームの送信が開始されると、ゲートウェイ10のルータ制御部15aは、通信部17を介して該中継要求フレームを受信する。また、ルータ制御部15aは、該中継要求フレームに送信先として設定された論理アドレスに基づき、ルーティングテーブル50から送信先のECU30や車載ネットワーク40の識別情報等を検索する。
The external device 20 has the same configuration as that in the case where accumulation relay is performed.
When transmission of a 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. Note that, as a specific example of the modification, if the in-vehicle network 40 is compliant with CAN, conversion of a CAN-ID according to a transmission destination may be considered.

また、アドレス解決部15bは、上述したアドレス解決のための処理を行う。
<中継要求フレームについて>
ゲートウェイ10による中継の際、中継元のECU30等からゲートウェイ10に送信される中継要求フレーム60は、概略的には、プロトコル依存部61,ソースアドレス62,ターゲットアドレス63,メッセージ64等から構成されている(図5参照)。
The address resolution unit 15b performs the above-described processing for address resolution.
<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の論理アドレスを示すデータである。
また、ターゲットアドレス63は、中継先のECU30或いは外部装置20の論理アドレスを示すデータである。
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.

また、メッセージ64は、中継先のECU30等に対する指示内容等を示すデータである。具体的には、例えば、外部装置20からECU30の故障診断を指示する場合であれば、故障コードや指定したアドレスに保存されたデータの送信要求をメッセージとすることが考えられる。また、例えば、ECU30から外部装置20に対し故障診断に対する応答を行う場合であれば、故障コードや、該外部装置20からの指示に応じて読み出したデータをメッセージとすることが考えられる。   The message 64 is data indicating the contents of instructions to the relay destination ECU 30 and 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.

S100では、ゲートウェイ10のCPU11は、ECU30や外部装置20からの中継要求フレーム60の受信を待つ。なお、中継要求フレーム60は、車載ネットワーク40から受信する場合や、無線通信を介して受信する場合や、テレマティクス用通信部16を介して無線通信網から受信する場合が想定される。そして、CPU11は、中継要求フレーム60を受信すると、S105に処理を移行する。   In S <b> 100, 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 and a response.

また、アドレス解決の対象となる車載ネットワーク40やECU30等を予め定めておき、これらを対象としてアドレス解決指示フレームをブロードキャスト送信する構成としても良い。   Alternatively, 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は、S100に処理を移行し、中継を中止する。   On the other hand, if the address resolution response frame cannot be received after the time limit has elapsed after the address resolution instruction frame is transmitted (S120: No), the CPU 11 shifts the process to S100 and 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等への通信を中継する際に用いることができる中継用バッファサイズを決定し、該論理アドレスに対応する「中継用バッファサイズ」として登録する。   In addition, 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 relay destination logical address, 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. (S135). 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等の論理アドレスが、中継先の論理アドレスの「中継可否情報」に登録されているか判定し、登録されていない場合には、中継を行うこと無くS100に処理を移行する。   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 it is not registered, the relay is not performed. The process proceeds to S100.

一方、中継元の論理アドレスが登録されている場合には、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の通信プロトコル等に対応する中継フレームの生成方法を特定する。   Further, 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 CPU 11 receives a relay request frame, 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に処理を移行する。   When the size of the relay buffer being used reaches the buffer size indicated by “relay buffer size”, the CPU 11 interrupts the relay and shifts the processing 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等にデータを中継することができる。   If no logical address is registered in the routing table 50 of the gateway 10, the address is resolved in the gateway 10, and 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の追加や交換を容易に行うことが可能となる。
<外部通信処理について>
次に、故障診断用の外部装置20がゲートウェイ10を経由してECU30と通信を行い、ECU30の故障診断等を行う外部通信処理について、図7に記載のフローチャートを用いて説明する。なお、本処理は、外部装置20にてユーザからの指示に応じて開始される。
Therefore, by using the gateway 10 of the present embodiment, the ECU 30 can be easily added or replaced.
<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に処理を移行する。
S205では、外部装置20は、エンジン,ブレーキ,エアコン等といった抽象的な車両の機能や診断項目をディスプレイに表示し、タッチパネル等を介してこれらの機能等の選択を受け付ける。各機能等には、これに関連する1または複数のECU30の論理アドレスが対応付けられており、機能等の選択を受け付けることで、故障診断のターゲットECU30が設定される。また、機能等の選択を受け付けた後には、外部装置20は、該機能等に対してユーザが行おうとする処置(例えば、故障診断の内容や各種設定変更)の入力を受け付ける。
In S200, the external device 20 activates an in-vehicle cooperation app for performing failure diagnosis, various settings, and the like of the ECU 30, etc., and proceeds to S205.
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 subsequent S <b> 215, 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 adds 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 on a general basis 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としてスマートフォンを用いることで、一般ユーザでも容易に故障診断を行うことができる。
[アドレス解決の具体例について]
<具体例1>
まず、蓄積中継が行われる場合(アプリケーションレベルで中継が行われる場合)に、例えばCANに準拠した車載ネットワーク40に接続されたECU30等のアドレス解決を行う処理の具体例の1つについて説明する。
Furthermore, by using a smartphone as the external device 20, a general user can easily perform a failure diagnosis.
[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. 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), FF (First Frame), etc., 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 and the like by the address resolution response frame 310, and Type 314 indicates the communication protocol of the in-vehicle network 40 as the 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が設定される。   For example, if 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) 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として構成された中継要求フレームが送信される。
一方、データサイズが8バイトより大きい場合には、FF,CF(Consecutive Frame)として構成された中継要求フレームが複数回にわたり送信される。すなわち、外部装置20からゲートウェイ10に対し、最初にFFとして構成された中継要求フレームが送信され、これに対する応答として、ゲートウェイ10から外部装置20にFC(Flow Control)が送信される。その後、外部装置20からゲートウェイ10にCFとして構成された中継要求フレームが送信されると共に、ゲートウェイ10から外部装置20にFCが応答され、以後、送信が完了するまで、外部装置20とゲートウェイ10とは交互にCF(中継要求フレーム)とFCを送信する。
At this time, if the data size is 8 bytes or less, a relay request frame configured as SF is transmitted.
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, a 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として構成された中継要求フレーム等が複数回にわたり送信される。
また、CAN以外の通信プロトコルに準拠した各車載ネットワーク40に接続されたECU30等の間の通信をアプリケーションレベルで中継する場合においても、ゲートウェイ10は、同様にしてアドレス解決を行う。
When there are a plurality of relay request frames and relay frames, similarly, relay request frames configured as FF and CF are transmitted a plurality of times.
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 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 and FF. When network level relay 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は、アプリケーションレベルで中継が行われる場合と同様の構成要素である。   Note 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として構成された中継要求フレームを送信する。
ゲートウェイ10は、該中継要求フレームを受信すると、上述した中継処理によりルーティングテーブル50から中継先のAECU30の論理アドレスを検索し(S505)、検索に失敗した場合には、アドレス解決のための処理を行う。
In S500, the external apparatus 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.
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に送信する。   Further, 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 transmitting response data exceeding 8 bytes to the external device 20 after the reception of the relay frame is completed (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 illustrated in FIG. 8 are used.

また、中継先の車載ネットワーク40がLINに準拠している場合には、次のようなアドレス解決指示フレーム340,アドレス解決応答フレーム350が用いられる(図12)。   Further, when the relay destination in-vehicle network 40 conforms to 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 (for example, 0x3C) indicating an address resolution instruction is set in the ID field 341. The data field includes a node address 342, a PCI (Protocol Control Information) 343, an SID 344, a transmission destination logical address 345, a transmission source logical address 346, and an 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, and the like, 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 which 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 includes a TA (Target Address) 362, an SA (Source Address) 363, a PCI 364, a transmission destination logical address 365, a transmission source logical address 366, and the like.

TA362は、ブロードキャストを示すIDが設定され、SA363はゲートウェイ10が受信できるIDが設定され、PCI364は、SF(Start Frame),CF等といったフレームの種別を示す。また、送信先論理アドレス365は、中継先のECU30等の論理アドレスを示し、送信元論理アドレス366は、中継元のECU30等の論理アドレスを示す。   The TA 362 is set with an ID indicating broadcast, the SA 363 is set with an ID that the gateway 10 can receive, and the PCI 364 indicates a frame type such as SF (Start Frame) or CF. 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)。   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 between the external device 20 connected to the different in-vehicle network 40 and the ECU 30 is performed 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と同様にして中継やアドレス解決がなされる。
[他の実施形態]
(1)車載ネットワーク40の通信プロトコルとしてイーサネットが用いられる場合が想定されるが、このような場合、PC等により構成されるネットワークにおけるアドレス解決を行うARP(Address Resolution Protocol)に準拠したフレームや手順によりアドレス解決を行っても良い。こうすることにより、既存のリソースを流用することができ、開発コストを抑えつつ、信頼性を向上させることが可能となる。
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.
[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 compliant with 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) The gateway 10 of the present embodiment is configured to be communicable with the external device 20, but 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.

[特許請求の範囲との対応]
上記実施形態の説明で用いた用語と、特許請求の範囲の記載に用いた用語との対応を示す。
[Correspondence with Claims]
The correspondence between the terms used in the description of the above embodiment and the terms used in the description of the claims is shown.

ゲートウェイ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 communication means, and the RAM 12 and ROM 13 correspond to storage means.

また、ルーティングテーブル50が対応情報に、中継要求フレーム60が中継要求データに、中継フレームが中継データに相当する。
また、アドレス解決指示フレーム300,320,340,360が指示データに、アドレス解決応答フレーム310,330,350,370が応答データに相当する。
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.
Address resolution instruction frames 300, 320, 340, and 360 correspond to instruction data, and 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 the specifying unit, S115 corresponds to the instruction unit, S125 corresponds to the registration unit, S130 corresponds to the generation unit, and S135 corresponds to the transmission unit.

10…ゲートウェイ、11…CPU、12…RAM、13…ROM、14…内部バス、15…通信処理部、16…テレマティクス用通信部、17…通信部、20…外部装置、30…ECU、40…車載ネットワーク、50…ルーティングテーブル、60…中継要求フレーム、61…プロトコル依存部、62…ソースアドレス、63…ターゲットアドレス、64…メッセージ、300…アドレス解決指示フレーム、310…アドレス解決応答フレーム、320…アドレス解決指示フレーム、330…アドレス解決応答フレーム、340…アドレス解決指示フレーム、350…アドレス解決応答フレーム、360…アドレス解決指示フレーム、370…アドレス解決応答フレーム。   DESCRIPTION OF SYMBOLS 10 ... Gateway, 11 ... CPU, 12 ... RAM, 13 ... ROM, 14 ... Internal bus, 15 ... Communication processing part, 16 ... Communication part for telematics, 17 ... Communication part, 20 ... External device, 30 ... ECU, 40 ... In-vehicle network, 50 ... Routing table, 60 ... Relay request frame, 61 ... Protocol dependent unit, 62 ... Source address, 63 ... Target address, 64 ... Message, 300 ... Address resolution instruction frame, 310 ... Address resolution response frame, 320 ... Address resolution instruction frame, 330... Address resolution response frame, 340... Address resolution instruction frame, 350... Address resolution response frame, 360... Address resolution instruction frame, 370.

Claims (3)

自車両に設けられた複数の車載ネットワーク(40)を構成する各車載装置(30)、或いは、自装置に一時的に接続された外部装置(20)と通信を行う通信手段と(15〜17)、
前記車載装置を示す論理アドレスと、該論理アドレスが示す前記車載装置に関する識別情報とが対応付けて登録されている対応情報(50)を記憶している記憶手段(12,13)と、
前記通信手段を介して、前記車載装置或いは前記外部装置から、前記論理アドレスを含む中継要求データ(60)を受信すると、前記対応情報に登録されている、該論理アドレスが示す前記車載装置に関する前記識別情報を特定する特定手段(S105)と、
前記特定手段が前記識別情報の特定に失敗した場合、該識別情報に係る前記車載装置に対し該識別情報を含む応答データ(310,330,350,370)を自装置に送信することを指示する指示データ(300,320,340,360)を、前記通信手段を介して複数の前記車載装置にブロードキャスト送信する指示手段(S115)と、
前記通信手段を介して前記応答データを受信すると、該応答データに含まれている前記識別情報と、該識別情報に係る前記車載装置を示す前記論理アドレスとを、前記対応情報に対応付けて登録する登録手段(S125)と、
前記特定手段が前記識別情報の特定に成功した場合、該識別情報と、該識別情報に係る前記車載装置を示す前記論理アドレスを含む前記中継要求データとに基づき、該車載装置に対応する中継データを生成し、前記特定手段が前記識別情報の特定に失敗した場合、該失敗により送信された前記指示データに応じて受信した前記応答データに含まれる前記識別情報と、該識別情報に係る前記車載装置を示す前記論理アドレスを含む前記中継要求データとに基づき、該車載装置に対応する前記中継データを生成する生成手段(S130)と、
前記通信手段を介して、前記生成手段により生成された前記中継データを、該中継データに対応する前記車載装置に送信する送信手段(S135)と、
を備えることを特徴とする車載用中継装置(10)。
Communication means for communicating with each in-vehicle device (30) constituting a plurality of in-vehicle networks (40) provided in the own vehicle or an external device (20) temporarily connected to the own device (15-17) ),
Storage means (12, 13) for storing correspondence information (50) in which a logical address indicating the on-vehicle device and identification information on the on-vehicle device indicated by the logical address are registered in association with each other;
When the relay request data (60) including the logical address is received from the in-vehicle device or the external device via the communication unit, the in-vehicle device related to the in-vehicle device indicated by the logical address registered in the correspondence information A specifying means (S105) for specifying identification information;
When the identification unit fails to identify the identification information, it instructs the in-vehicle device related to the identification information to transmit response data (310, 330, 350, 370) including the identification information to the own device. Instruction means (S115) for broadcasting instruction data (300, 320, 340, 360) to the plurality of in-vehicle devices via the communication means;
When the response data is received via the communication means, the identification information included in the response data and the logical address indicating the in-vehicle device related to the identification information are registered in association with the correspondence information. Registration means to perform (S125);
When the specifying means succeeds in specifying the identification information, the relay data corresponding to the in-vehicle device based on the identification information and the relay request data including the logical address indicating the in-vehicle device related to the identification information And when the identification unit fails to identify the identification information, the identification information included in the response data received according to the instruction data transmitted due to the failure, and the in-vehicle related to the identification information Generating means (S130) for generating the relay data corresponding to the in-vehicle device based on the relay request data including the logical address indicating the device;
Transmitting means (S135) for transmitting the relay data generated by the generating means to the in-vehicle device corresponding to the relay data via the communication means;
A vehicle-mounted relay device (10) comprising:
請求項1に記載の車載用中継装置において、
前記中継要求データとは、いずれかの前記車載装置から他の前記車載装置に対して送信されるデータであること、
を特徴とする車載用中継装置。
The in-vehicle relay device according to claim 1,
The relay request data is data transmitted from any of the in-vehicle devices to the other in-vehicle device,
An in-vehicle relay device.
請求項1または請求項2に記載の車載用中継装置において、
前記中継要求データとは、前記外部装置から、前記車載装置の故障診断を行うため送信されたデータであること、
を特徴とする車載用中継装置。
In the in-vehicle relay device according to claim 1 or 2,
The relay request data is data transmitted from the external device to diagnose a failure of the in-vehicle device,
An in-vehicle relay device.
JP2013020499A 2013-02-05 2013-02-05 On-vehicle relay device Pending JP2014154920A (en)

Priority Applications (2)

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

Applications Claiming Priority (1)

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

Publications (1)

Publication Number Publication Date
JP2014154920A true JP2014154920A (en) 2014-08-25

Family

ID=51299327

Family Applications (1)

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

Country Status (2)

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

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015088941A (en) * 2013-10-31 2015-05-07 日立オートモティブシステムズ株式会社 Communication control device
JP2016134834A (en) * 2015-01-21 2016-07-25 トヨタ自動車株式会社 On-vehicle gateway device and on-vehicle network system
JP2016201740A (en) * 2015-04-13 2016-12-01 株式会社デンソー On-vehicle communication system, repeating device, and node
WO2017061262A1 (en) * 2015-10-05 2017-04-13 日立オートモティブシステムズ株式会社 On-board gateway device
JP2017108247A (en) * 2015-12-08 2017-06-15 トヨタ自動車株式会社 Communication system
CN108124437A (en) * 2017-09-27 2018-06-05 株式会社小松制作所 The inte-grated switch device of working truck and the working truck with set switching device
JP2020028121A (en) * 2018-08-10 2020-02-20 株式会社デンソー Vehicle master device, update data delivery control method, update data delivery control program, and data structure of specifications data

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7230760B2 (en) * 2019-09-30 2023-03-01 トヨタ自動車株式会社 Relay device and external device
CN113268050A (en) * 2021-05-19 2021-08-17 上海小鹏汽车科技有限公司 Vehicle diagnosis method and device

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015088941A (en) * 2013-10-31 2015-05-07 日立オートモティブシステムズ株式会社 Communication control device
JP2016134834A (en) * 2015-01-21 2016-07-25 トヨタ自動車株式会社 On-vehicle gateway device and on-vehicle network system
JP2016201740A (en) * 2015-04-13 2016-12-01 株式会社デンソー On-vehicle communication system, repeating device, and node
JPWO2017061262A1 (en) * 2015-10-05 2018-07-26 日立オートモティブシステムズ株式会社 In-vehicle gateway device
WO2017061262A1 (en) * 2015-10-05 2017-04-13 日立オートモティブシステムズ株式会社 On-board gateway device
US10615997B2 (en) 2015-10-05 2020-04-07 Hitachi Automotive Systems, Ltd. In-vehicle gateway device
JP2017108247A (en) * 2015-12-08 2017-06-15 トヨタ自動車株式会社 Communication system
CN108124437A (en) * 2017-09-27 2018-06-05 株式会社小松制作所 The inte-grated switch device of working truck and the working truck with set switching device
CN108124437B (en) * 2017-09-27 2023-03-21 株式会社小松制作所 Integrated switch device for working vehicle and working vehicle with integrated switch device
JP2020028121A (en) * 2018-08-10 2020-02-20 株式会社デンソー Vehicle master device, update data delivery control method, update data delivery control program, and data structure of specifications data
CN112640368A (en) * 2018-08-10 2021-04-09 株式会社电装 Vehicle host device, update data distribution control method, update data distribution control program, and specification data structure
JP7024765B2 (en) 2018-08-10 2022-02-24 株式会社デンソー Vehicle master device, update data distribution control method, and update data distribution control program
CN112640368B (en) * 2018-08-10 2023-02-28 株式会社电装 Vehicle host device, update data distribution control method, update data distribution control program, and specification data structure
US11683197B2 (en) 2018-08-10 2023-06-20 Denso Corporation Vehicle master device, update data distribution control method, computer program product and data structure of specification data

Also Published As

Publication number Publication date
WO2014122711A1 (en) 2014-08-14

Similar Documents

Publication Publication Date Title
JP2014154920A (en) On-vehicle relay device
CN110635933B (en) Apparatus, control method, and recording medium for managing network of SDN
US8665891B2 (en) Gateway apparatus
JP6269999B2 (en) Packet processing method and apparatus
US10749738B2 (en) Method and apparatus for diagnosing network
US11914987B2 (en) Master update agent and distributed update agent architecture for vehicles
RU2705361C1 (en) Onboard relay device, information processing device, relay device, information processing method, carrier for long-term storage of a program executed by a relay device, an information processing system, a vehicle and an external device
JP2007038921A (en) Vehicle communication system and electronic control device
JP2017220220A (en) Electronic control units and service management system for vehicles
US9596178B2 (en) Relay server and relay communication system
JP2014045421A (en) Network system
JP2017118407A (en) Communication system
JP6289742B2 (en) Radio master station, radio slave station, radio communication system, and radio communication method
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
JP4231843B2 (en) Method for transmitting data packets between two slave devices and a master device having two processors
KR102355085B1 (en) Operation method of communication node for selective wakeup in vehicle network
JP6973122B2 (en) In-vehicle network system
US20150278360A1 (en) Computing apparatus for data distribution service and method of operating the same
JP5900198B2 (en) COMMUNICATION SYSTEM, RELAY DEVICE, AND COMMUNICATION DEVICE
CN109885266A (en) A kind of method, apparatus, system and the mobile terminal of printer network connection
JP2009088918A (en) Wireless lan access point, and wireless lan access point program
JP2014204160A (en) Gateway unit
WO2016180141A1 (en) Virtual machine state management method and device
JP2009010851A (en) On-vehicle gateway device