JP2017017615A - Communication apparatus and communication system - Google Patents
Communication apparatus and communication system Download PDFInfo
- Publication number
- JP2017017615A JP2017017615A JP2015134415A JP2015134415A JP2017017615A JP 2017017615 A JP2017017615 A JP 2017017615A JP 2015134415 A JP2015134415 A JP 2015134415A JP 2015134415 A JP2015134415 A JP 2015134415A JP 2017017615 A JP2017017615 A JP 2017017615A
- Authority
- JP
- Japan
- Prior art keywords
- frame
- data
- control unit
- alive counter
- communication control
- 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
Links
Images
Abstract
Description
本発明は、通信装置、および通信システムに関する。 The present invention relates to a communication device and a communication system.
従来、車載ネットワークにおいて、多重通信を行うため複数ノードの同時発信情報による衝突を検出もしくは調停する通信システムが知られている(例えば、特許文献1参照)。この通信システムでは、通信フレーム部分にメッセージ種別の識別子と共に、シーケンス番号で示されるセキュリティ情報を含ませている。このセキュリティ情報は、通信フレームの固定された位置に挿入されている。 2. Description of the Related Art Conventionally, a communication system that detects or mediates a collision caused by simultaneous transmission information of a plurality of nodes in order to perform multiplex communication in an in-vehicle network is known (for example, see Patent Document 1). In this communication system, security information indicated by a sequence number is included in the communication frame portion together with the message type identifier. This security information is inserted at a fixed position in the communication frame.
車載システムに於ける通信データは、ノード間の取り決めによって情報のやり取りを行っているが、近年、自動車のノード間で通信される内部情報を読み出して改竄するような事象が発生している。従来の通信システムを利用した車載ネットワークでは、通信フレームの配置が固定的であるため、セキュリティ性が低下する場合があった。
本発明は、このような事情を考慮してなされたものであり、車載ネットワークのセキュリティ性を向上させることができる通信装置、および通信システムを提供することを目的の一つとする。
Communication data in an in-vehicle system exchanges information according to an agreement between nodes. Recently, however, an event has occurred in which internal information communicated between nodes of an automobile is read and altered. In an in-vehicle network using a conventional communication system, the arrangement of communication frames is fixed, and thus security may be deteriorated.
The present invention has been made in view of such circumstances, and an object of the present invention is to provide a communication device and a communication system that can improve the security of an in-vehicle network.
請求項1記載の発明は、複数の機器が情報を参照する有線ネットワーク(4)に対して、複数のビットからなるフレームを送信する送信部(52)と、前記有線ネットワークから前記フレームを受信する受信部(52)と、前記フレームの送信回数によって前記送信部が送信するフレームのビットの順序を入れ替える制御部(40、44)とを備える通信装置(10)である。 According to the first aspect of the present invention, a transmission unit (52) that transmits a frame composed of a plurality of bits to a wired network (4) in which a plurality of devices refer to information, and receives the frame from the wired network. The communication device (10) includes a receiving unit (52) and a control unit (40, 44) that switches the order of bits of frames transmitted by the transmitting unit according to the number of times the frame is transmitted.
請求項2記載の発明は、請求項1記載の通信装置であって、前記フレームは、通信プロトコルによって定められる規格領域と、少なくともデータの内容が格納される任意領域とを有し、前記制御部は、前記送信部が送信するフレームのビットの順序を、前記任意領域内で入れ替える。
The invention according to
請求項3記載の発明は、請求項1または2に記載の通信装置であって、前記フレームは、データの内容が格納される複数のデータ領域と、データの識別情報が含まれるアライブカウンタ領域とを有し、前記制御部は、前記アライブカウンタ領域の位置を変えずに前記複数のデータ領域に含まれるデータ領域の位置を入れ替えることで前記ビットの順序を入れ替える。
The invention according to
請求項4記載の発明は、請求項3記載の通信装置であって、前記制御部は、前記アライブカウンタ領域に含まれる情報によって、前記複数のデータ領域に含まれるデータ領域の位置を決定する。 According to a fourth aspect of the present invention, in the communication device according to the third aspect, the control unit determines positions of data areas included in the plurality of data areas based on information included in the alive counter area.
請求項5記載の発明は、請求項4記載の通信装置であって、前記制御部は、前記アライブカウンタ領域に含まれる情報と前記複数のデータ領域に含まれるデータ領域の位置とが対応付けられた対応情報を参照し、前記アライブカウンタ領域に含まれる情報に対応する順序で、前記複数のデータ領域に含まれるデータ領域の位置の順序を入れ替える。
The invention according to claim 5 is the communication apparatus according to
請求項6記載の発明は、請求項1または2に記載の通信装置であって、前記フレームは、データの内容が格納される複数のデータ領域と、データの識別情報が含まれるアライブカウンタ領域とを有し、前記制御部は、前記複数のデータ領域間に前記アライブカウンタ領域を割り込ませることで、前記ビットの順序を入れ替える。
The invention according to
請求項7記載の発明は、請求項1から6のうちいずれか1項記載の通信装置と、前記有線ネットワークとを備える通信システムである。 A seventh aspect of the present invention is a communication system comprising the communication device according to any one of the first to sixth aspects and the wired network.
請求項1、2、3、6および7記載の発明によれば、制御部が、前記フレームの送信回数によって前記送信部が送信するフレームのビットの順序を入れ替えることにより、車載ネットワークのセキュリティ性を向上させることができる。 According to the first, second, third, sixth, and seventh aspects of the invention, the control unit changes the order of the bits of the frame transmitted by the transmission unit according to the number of transmissions of the frame, thereby improving the security of the in-vehicle network. Can be improved.
請求項4および5記載の発明によれば、前記制御部は、前記アライブカウンタ領域に含まれる情報によって、前記複数のデータ領域に含まれるデータ領域の位置を決定することにより、より車載ネットワークのセキュリティ性を向上させることができる。
According to invention of
以下、図面を参照し、本発明の通信装置、および通信システムの実施形態について説明する。 Hereinafter, embodiments of a communication device and a communication system according to the present invention will be described with reference to the drawings.
<第1の実施形態>
図1は、第1の実施形態に係るECU10(通信装置)を含む通信システム1の概念図である。通信システム1は、OBDコネクタ2に接続されたバス4と、バス4に接続されたサブ通信バス6およびサブ通信バス8とを備える。また、バス4、サブ通信バス6、およびサブ通信バス8には、車両を制御する複数のECU10や、車両の状態を検出する検出センサ、その他車両に搭載される機器等が接続されている。以下、バス4、サブ通信バス6、およびサブ通信バス8を区別しない場合はバスnという。バスnでは、例えば、CAN(Controller Area Network)に基づく通信が行われる。OBD(On-board diagnostics)コネクタ2は、バスに接続された機器の情報を取得する。また、OBDコネクタ2は、診断用のデータをバスに接続された機器に送信し、送信した診断用のデータに対する応答を受信する。OBDコネクタ2は、受信した診断用のデータに対する応答に基づいて、バスnに接続された機器が正常に動作しているか否か等を診断する。また、各機器を制御するための制御用のデータが、OBDコネクタ2を介して各機器に送信されると、各機器は送信された制御用のデータに応じて作動する。ECU10は、エンジンを制御するエンジンECU9Aや、シートベルトを制御するシートベルトECU9B等である。車両の状態を検出する検出サンサは、例えばヨーレートセンサや、加速度センサ等である。
<First Embodiment>
FIG. 1 is a conceptual diagram of a
図2は、通信システム1の構成を、より簡略化して示す図である。通信システム1は、バス4−1に接続されたECU10−1から10−3と、バス4−2に接続されたECU10−4から10−6と、バス4−1および4−2に接続され、バス4−1とバス4−2との間を中継するゲートウェイ装置11とを備える。図2に示す構成は、図1に示す構成と同様に車両に搭載されてもよいし、他の機器に適用されてもよい。バス4−1及びバス4−2では、バスnと同様に、例えば、CANに基づく通信が行われる。各ECU10は、バス4−1または4−2を流れるデータを取得することができる。以下、ECU10−1から10−6を区別しない場合は、単にECU10と表記する。バス4−1およびバス4−2は、例えば、ツイストペアケーブルであり、差動電圧方式によって信号を伝達する。
FIG. 2 is a diagram showing the configuration of the
図3は、ECU10の構成例を示す図である。ECU10は、例えば、記憶部30と、制御部40と、CANコントローラ50と、CANトランシーバ52とを備える。制御部40は、例えば、CPU(Central Processing Unit)等のプロセッサを有する。
FIG. 3 is a diagram illustrating a configuration example of the
記憶部30は、例えば、ROM(Read Only Memory)、EEPROM(Electrically Erasable and Programmable Read Only Memory)、HDD(Hard Disk Drive)等の不揮発性の記憶装置と、RAM(Random Access Memory)、レジスタ等の揮発性の記憶装置によって実現される。記憶部30は、アプリケーションプログラム32や、CANドライバ34等のプログラムを格納する。また、記憶部30は、送信バッファ(不図示)と、受信バッファ(不図示)とを含む一時記憶領域36を有する。
The
アプリケーションプログラム32は、ECU10に割り当てられた情報処理を行うためのプログラムである。CANドライバ34は、アプリケーションプログラム32とCANコントローラ50との間を仲介する。
The
制御部40は、中央制御部42と、通信制御部44とを備える。中央制御部42は、アプリケーションプログラム32を実行することにより機能し、ECU10に与えられた制御を実行する。
The
通信制御部44は、CANトランシーバ52により受信されたフレームに含まれる情報(ID)を参照し、自装置が使用する情報が含まれたフレームであるか否かを判定する。自装置が使用する情報がフレームに含まれる場合、通信制御部44は、フレームに含まれた情報を取得し、記憶部30の一時記憶領域36に格納する。
The communication control unit 44 refers to information (ID) included in the frame received by the
通信制御部44は、CANトランシーバ52にフレームを送信させる。本実施例において、通信制御部44は、フレームの送信回数によってCANトランシーバ52が送信するフレームのビットの順序を入れ替える。
The communication control unit 44 causes the
CANコントローラ50は、CANトランシーバ52を介して、バス4−1または4−2(以下、バス4という。)との間で種々のデータを送受信する。CANコントローラ50は、バス4にフレームを送信する際には、一時記憶領域36の送信バッファに格納されたフレームを、例えばNRZ(Non‐Return‐to‐Zero)方式でシリアルの送信信号に変換し、CANトランシーバ52に出力する。CANコントローラ50は、変換後の信号が「0」(ドミナント)のビットには論理レベルがLowの電圧を出力し、「1」(レセシブ)のビットには論理レベルがHighの電圧を出力する。また、CANコントローラ50は、CANトランシーバ52からデータ(フレーム)を受信する際には、受信したフレームを、例えばシリアルの送信信号から制御部40が解析できる情報に変換し、CANコントローラ50を介して一時記憶領域36の受信バッファに格納する。
The
CANトランシーバ52は、フレームを送信する送信部、またはフレームを受信する受信部として機能する。CANトランシーバ52は、CANコントローラ50から取得した送信信号を差動電圧に変換してバス4に送信する。また、CANトランシーバ52は、バス4からデータを取得する際には、バス4の差動電圧を読み取り、所定の電圧範囲に含まれるように整形した受信信号をCANコントローラ50に送信する。CANコントローラ50の受信端子Rxにはコンパレータが取り付けられており、所定の閾値電圧とCANトランシーバ52からの受信信号とを比較することで、「1」、「0」のデジタルデータを生成して記憶部30に格納する。
The
図4は、ECU10がバスに送信するフレームの形式例である。1回の送信において送信されるフレームは、フレームの開始を表すスタートオブフレーム(SOF)、データの識別子であるID、データフレームとリモートフレームを識別するためのリモートトランスミッションリクエスト(RTR)、データのバイト数等を表すコントロールフィールド、転送するデータの実体であるデータフィールド、識別情報が付与されるアライブカウンタAC、フレームの誤りをチェックするためのCRCを付加するCRCシーケンス、正しいメッセージを受信したユニットからの通知(ACK)を受けるACKスロット及びACKデリミタ、フレームの終了を表すエンドオブフレーム(EOF)等を含む。フレームにおいて、データフィールドが「データ領域」の一例である。また、データフィールドおよびアライブカウンタACを含む領域が「任意領域」の一例であり、その他領域が「通信プロトコルによって定められる規格領域」の一例である。
FIG. 4 is a format example of a frame transmitted from the
バス4では、IDとRTRにより表される優先度に基づく通信調停が行われる。複数のECU10から同時にフレームが送信される場合、各ECU10は、自己が送信したデータとバス状態をモニターした結果を比較する。ここで、リセッシブとドミナントが別々のECU10から同時に送信された場合、ドミナントが優先され、バスの状態はドミナントとなる。このとき、リセッシブを送信したノードは自己が送信したものとバス状態の違いにより、通信調停に負けたと判断して送信を停止する。係る原理により、複数のECU10から同時にフレームが送信開始された場合、他ノードがリセッシブ送信を行っているときにドミナントを送信したノードが通信調停に勝つことになるので、IDの値が小さいフレームほど、優先度が高いということになる。
In the
以下、通信制御部44により実行される処理の流れについて、フローチャートに即して説明する。図5は、通信制御部44により実行される送信処理の流れを示すフローチャートである。 Hereinafter, the flow of processing executed by the communication control unit 44 will be described with reference to flowcharts. FIG. 5 is a flowchart showing a flow of transmission processing executed by the communication control unit 44.
まず、通信制御部44が、送受信回数が1回目であるか否かを判定する(ステップS100)。1回目とは、例えば、ECU10に電源投入されてから1回目という意味である。なお、ECU10は、電源投入された際の初期化処理として、アライブカウンタACのカウント値をゼロに設定する処理を行う。また、アライブカウンタACのカウント値が上限値まで達しオーバフローした際にも、アライブカウンタACのカウント値はゼロに戻され、疑似的に1回目として扱われることになる。
First, the communication control unit 44 determines whether or not the number of times of transmission / reception is the first time (step S100). The first time means, for example, the first time after the
ステップS100でフレームの送受信回数が1回目であると判定された場合、通信制御部44は、カウント値がゼロに設定されたアライブカウンタACを含むフレームをCANトランシーバ52に送信させる(ステップS102)。この場合、後述するデータをずらす処理は行われない。
If it is determined in step S100 that the number of times of frame transmission / reception is the first time, the communication control unit 44 causes the
ステップS100でフレームの送受信回数が1回目でないと判定された場合、通信制御部44は、アライブカウンタACのカウント値を1つインクリメントする(ステップS104)。次に、通信制御部44は、データフィールドのデータを後述するように(図7参照)ずらす(ステップS106)。次に、通信制御部44は、ステップS104でアライブカウンタACのカウント値を設定し、ステップS106でデータをずらしたフレームを送信する(ステップS108)。これにより本フローチャートの1ルーチンの処理は終了する。 If it is determined in step S100 that the number of times of frame transmission / reception is not the first time, the communication control unit 44 increments the count value of the alive counter AC by one (step S104). Next, the communication control unit 44 shifts the data in the data field as described later (see FIG. 7) (step S106). Next, the communication control unit 44 sets the count value of the alive counter AC in step S104, and transmits a frame in which data is shifted in step S106 (step S108). Thereby, the process of one routine of this flowchart is completed.
図6は、通信制御部44により実行される受信処理の流れを示すフローチャートである。まず、通信制御部44が、受信したフレームに含まれるアライブカウンタACのカウント値を取得する(ステップS150)。次に、通信制御部44は、ステップS150で取得されたカウント値に基づいて、ずらされたデータの位置を特定する(ステップS152)。次に、通信制御部44は、ステップS152で特定されたデータの位置に基づいてフレーム(任意領域)を復元し、受信データとしてフレームの少なくとも一部を一時記憶領域36に格納する(ステップS154)。これにより本フローチャートの1ルーチンの処理は終了する。
FIG. 6 is a flowchart showing a flow of reception processing executed by the communication control unit 44. First, the communication control unit 44 acquires the count value of the alive counter AC included in the received frame (step S150). Next, the communication control unit 44 specifies the position of the shifted data based on the count value acquired in step S150 (step S152). Next, the communication control unit 44 restores the frame (arbitrary area) based on the position of the data specified in step S152, and stores at least a part of the frame in the
図7は、通信制御部44によりアライブカウンタACのカウント値がインクリメントされると共に、データの位置がずらされる様子を示す図である。図中では、フレームのうちデータフィールドに含まれるデータD1からD4、アライブカウンタAC、およびCRCシーケンスのみを示している。また、データの初期位置は、データの先頭(CRCシーケンスとは反対側)からデータD1、D2、D3、D4の順で配置されているものとして説明する。 FIG. 7 is a diagram illustrating how the communication control unit 44 increments the count value of the alive counter AC and shifts the data position. In the figure, only data D1 to D4, alive counter AC, and CRC sequence included in the data field of the frame are shown. Further, the description will be made assuming that the initial position of data is arranged in the order of data D1, D2, D3, and D4 from the beginning of the data (on the opposite side to the CRC sequence).
フレームの1回目の送信では、データD1からD4は初期位置に配置される。このときアライブカウンタACのカウント値はゼロに設定されている。フレームの2回目の送信では、通信制御部44が、アライブカウンタACのカウント値を1つインクリメントすると共に、データD1からD4の位置を循環的に後方にずらして送信する。すなわち、フレームの2回目の送信では、データD4を先頭として、データD1、D2,D3の順に並べた状態で送信される。フレームの3回目の送信では、通信制御部44が、アライブカウンタACのカウント値を1つインクリメントすると共に、データD1からD4の位置を循環的に後方にずらして送信する。この結果、フレームの3回目の送信では、データD3を先頭として、データD4、D1、D2の順に並べた状態で送信される。 In the first transmission of the frame, the data D1 to D4 are arranged at the initial position. At this time, the count value of the alive counter AC is set to zero. In the second transmission of the frame, the communication control unit 44 increments the count value of the alive counter AC by one and transmits the positions of the data D1 to D4 cyclically shifted backward. That is, in the second transmission of the frame, the data D4 is transmitted at the head, and the data D1, D2, and D3 are arranged in this order. In the third transmission of the frame, the communication control unit 44 increments the count value of the alive counter AC by one and transmits the positions of the data D1 to D4 cyclically shifted backward. As a result, in the third transmission of the frame, the data D3 is transmitted at the head and the data D4, D1, and D2 are arranged in this order.
フレームを受信するECU10においては、上述した図6の処理により、通信制御部44が、データD1からD4の位置を判定する。フレームの1回目の受信では、アライブカウンタACのカウント値は0であるため、通信制御部44は、データD1からD4の位置は初期位置であると判断する。フレームの2回目の受信では、アライブカウンタACのカウント値は1であるため、通信制御部44は、前回送信されたフレームのデータD1からD4の順序が1つずらされたデータD4、D1、D2、D3の順序で送信されたと判断する。フレームの3回目の受信では、アライブカウンタACのカウント値は2であるため、通信制御部44は、前回送信されたフレームのデータD4、D1、D2、D3の順序が1つずらされたデータD3、D4、D1、D2の順序で送信されたと判断する。
In the
受信側のECU10の通信制御部44は、フレームに含まれるデータの順序を、本来のデータの順序に並べ換えた状態で一時記憶領域36に格納する。この結果、受信側のECU10のアプリケーションプログラム32(中央制御部42)は、送信元が意図したデータの内容を受け取ることができる。
The communication control unit 44 of the
また、本実施形態のECU10および通信システム1によれば、データの配置を固定的にせず、送信回数に応じて変更しているため、外部から通信にアクセスし通信データを解析することによる不適切な干渉を妨害することができる。この結果、セキュリティ性を向上させることができる。
In addition, according to the
以上説明した第1の実施形態の通信システム1によれば、フレームを送信する側の通信制御部44は、アライブカウンタACのカウント値を1つインクリメントすると共に、各データの位置を循環的に後方にずらして送信する。フレームを受信する側の通信制御部44は、受信したフレームに含まれるアライブカウンタACのカウント値に基づいて、フレームに含まれるデータの順序を判断して、判断結果に基づいてデータの位置を入れ替える。これらの結果、通信システム1は、車載ネットワークのセキュリティ性を向上させることができる。
According to the
また、本実施形態では通信システム1の各ECU10が通信制御部44を備えるものとして説明したが、図1に示すOBDコネクタ2等に、ECU10の通信制御部44と同様の機能が搭載されてもよい。この場合、OBDAコネクタ2から送信される診断用のデータ、または各ECU10から送信されるデータには、アライブカウンタACのカウント値に基づいて、データがずらされている。
In the present embodiment, each
<第2の実施形態>
以下、図面を参照し、第2の実施形態に係る通信システムについて説明する。図8は、第2の実施形態に係る通信システムが備えるECU10Aの構成例を示す図である。第2の実施形態では、ECU10Aがデータ位置テーブル38を備え、通信制御部44がデータ位置テーブル38を参照してデータの位置を入れ替える点で、第1実施形態と相違する。以下では、係る相違点を中心に説明する。
<Second Embodiment>
The communication system according to the second embodiment will be described below with reference to the drawings. FIG. 8 is a diagram illustrating a configuration example of the
図9は、データ位置テーブル38の内容を例示した図である。データ位置テーブル38は、アライブカウンタACのカウント値と、フレームに含まれるデータの位置との対応関係を示す情報(対応情報)である。図示する例では、アライブカウンタACのカウント値と、データD1の位置とが対応付けられている。例えばアライブカウンタACのカウント値が0のとき、アライブカウンタACの位置は1番(送信されるデータの先頭)、アライブカウンタACのカウント値が1のとき、アライブカウンタACの位置は送信されるデータの先頭から4番目、アライブカウンタACのカウント値が2のとき、アライブカウンタACの位置は2番目、・・・アライブカウンタACのカウント値がNのとき、アライブカウンタACの位置は3番目であることを示している。 FIG. 9 is a diagram illustrating the contents of the data position table 38. The data position table 38 is information (corresponding information) indicating the correspondence between the count value of the alive counter AC and the position of the data included in the frame. In the illustrated example, the count value of the alive counter AC is associated with the position of the data D1. For example, when the count value of the alive counter AC is 0, the position of the alive counter AC is No. 1 (the head of the transmitted data), and when the count value of the alive counter AC is 1, the position of the alive counter AC is the data to be transmitted. When the count value of the alive counter AC is 2, the position of the alive counter AC is second,..., When the count value of the alive counter AC is N, the position of the alive counter AC is third. It is shown that.
以下、データ位置テーブル38を用いた通信制御部44の処理について、フローチャートに即して説明する。図10は、第2の実施形態に係る通信制御部44により実行される処理の流れを示すフローチャートである。まず、通信制御部44が、アライブカウンタACのカウント値を取得する(ステップS200)。次に、通信制御部44は、データ位置テーブル38を参照し、ステップS200で取得されたアライブカウンタACのカウント値に対応するデータの位置を特定する(ステップS202)。次に、通信制御部44は、ステップS202で特定したデータの位置にデータを入れ替え(ステップS204)、入れ替えたデータを含むフレームを送信する(ステップS206)。これにより本フローチャートの1ルーチンの処理は終了する。 Hereinafter, processing of the communication control unit 44 using the data position table 38 will be described with reference to a flowchart. FIG. 10 is a flowchart showing a flow of processing executed by the communication control unit 44 according to the second embodiment. First, the communication control unit 44 acquires the count value of the alive counter AC (step S200). Next, the communication control unit 44 refers to the data position table 38, and specifies the position of data corresponding to the count value of the alive counter AC acquired in step S200 (step S202). Next, the communication control unit 44 replaces the data at the data position specified in step S202 (step S204), and transmits a frame including the replaced data (step S206). Thereby, the process of one routine of this flowchart is completed.
ステップS206により送信されたフレームを受信した側の通信制御部44は、受信したフレームに含まれるアライブカウンタACのカウント値を取得する。通信制御部44は、データ位置テーブル38を参照して、アライブカウンタACのカウント値に対応するデータの位置を特定する。通信制御部44は、特定した位置に基づいてフレーム(任意領域)を復元し、受信データとしてフレームの少なくとも一部を一時記憶領域36に格納する。
The communication control unit 44 on the side receiving the frame transmitted in step S206 obtains the count value of the alive counter AC included in the received frame. The communication control unit 44 refers to the data position table 38 and specifies the position of data corresponding to the count value of the alive counter AC. The communication control unit 44 restores the frame (arbitrary area) based on the specified position, and stores at least a part of the frame in the
図11は、第2の実施形態の通信制御部44によりアライブカウンタACのカウント値がインクリメントされると共に、データの位置がずらされる様子を示す図である。図中では、フレームのうちデータフィールドに含まれるデータD1からD4、アライブカウンタAC、およびCRCシーケンスのみを示している。また、データの初期位置は、データの先頭(CRCシーケンスとは反対側)からデータD1、D2、D3、D4の順で配置されているものとして説明する。 FIG. 11 is a diagram illustrating a state in which the count value of the alive counter AC is incremented and the data position is shifted by the communication control unit 44 according to the second embodiment. In the figure, only data D1 to D4, alive counter AC, and CRC sequence included in the data field of the frame are shown. Further, the description will be made assuming that the initial position of data is arranged in the order of data D1, D2, D3, and D4 from the beginning of the data (on the opposite side to the CRC sequence).
フレームの1回目の送信では、アライブカウンタACのカウント値は0である。通信制御部44は、データ位置テーブル38を参照し、アライブカウンタACのカウント値ゼロに対応するようにデータを入れ替えて送信する。アライブカウンタACのカウント値ゼロに対応する位置は、データD1からD4が初期位置に並べられた位置である。フレームの2回目の送信では、アライブカウンタACのカウント値は1である。通信制御部44は、データ位置テーブル38を参照し、アライブカウンタACのカウント値1に対応するようにデータを入れ替えて送信する。アライブカウンタACのカウント値1に対応する位置は、データD1を4番目に入れ替えた位置である。フレームの2回目の送信では、データ4を先頭として、次いでデータD2、D3、D1の順で送信される。フレームの3回目の送信では、アライブカウンタACのカウント値は2である。通信制御部44は、データ位置テーブル38を参照し、アライブカウンタACのカウント値2に対応するようにデータを入れ替えて送信する。アライブカウンタACのカウント値2に対応する位置は、データD1を2番目に入れ替えた位置である。フレームの3回目の送信では、データ2を先頭として、次いでデータD1、D3、D4の順で送信される。
In the first transmission of the frame, the count value of the alive counter AC is zero. The communication control unit 44 refers to the data position table 38 and transmits the data so as to correspond to the count value zero of the alive counter AC. The position corresponding to the count value zero of the alive counter AC is a position where the data D1 to D4 are arranged at the initial position. In the second transmission of the frame, the count value of the alive counter AC is 1. The communication control unit 44 refers to the data position table 38 and exchanges data so as to correspond to the
送信されたフレームを受信した側の通信制御部44は、データ位置テーブル38を参照して、受信したフレームに含まれるアライブカウンタACのカウント値に基づいて、フレーム(任意領域)を復元し、受信データとしてフレームの少なくとも一部を一時記憶領域36に格納する。図11に示すように、通信制御部44が、カウント値が2に設定されたアライブカウンタを含むフレームを受信した場合、通信制御部44は、データ位置テーブル38を参照して、データD1の位置が先頭から2番目に入れ替えられたと判断する。通信制御部44が、判断の結果に基づいて、フレーム(任意領域)を復元し、受信データとしてフレームの少なくとも一部を一時記憶領域36に格納する。
The communication control unit 44 that has received the transmitted frame refers to the data position table 38 to restore the frame (arbitrary area) based on the count value of the alive counter AC included in the received frame and receive the frame. At least a part of the frame is stored in the
以上説明した第2実施形態の通信システム1によれば、通信制御部44が、データ位置テーブル38を参照し、アライブカウンタACのカウント値に基づいて送信するデータの順序を入れ替えて送信する。また、通信制御部44が、データ位置テーブル38を参照し、受信したフレームに含まれるアライブカウンタACのカウント値に基づいて、データを復元する。この結果、通信システム1は、第1実施形態の効果を奏すると共に、不規則にデータの順序を入れ替えることができる。
According to the
<第3の実施形態>
以下、図面を参照し、第3実施形態に係る通信システムについて説明する。第1実施形態および第2実施形態では、通信制御部44が、送信するフレームのデータの位置を入れ替えるものとしたが、第3実施形態の通信システム300では、通信制御部44が、フレームの送信回数に基づいて、アライブカウンタACの位置を入れ替える。以下では、係る相違点を中心に説明する。
<Third Embodiment>
The communication system according to the third embodiment will be described below with reference to the drawings. In the first embodiment and the second embodiment, the communication control unit 44 switches the position of the data of the frame to be transmitted. However, in the communication system 300 of the third embodiment, the communication control unit 44 transmits the frame. Based on the number of times, the position of the alive counter AC is switched. Below, it demonstrates centering on the difference which concerns.
図12は、第3の実施形態に係る通信制御部44により実行される送信処理の流れを示すフローチャートである。まず、通信制御部44が、記憶部30に格納されたフレームの送受信結果を参照し、通信システム1におけるこれまでのフレームの送受信回数を特定する(ステップS300)。次に、通信制御部44は、ステップS300で特定されたフレームの送受信回数が1回目であるか否かを判定する(ステップS302)。ステップS300で特定されたフレームの送受信回数が1回目である場合、通信制御部44は、初期位置に挿入されているアライブカウンタACの位置を維持した状態でフレームをCANトランシーバ52に送信させる(ステップS304)。なお、通信制御部44は、予めアライブカウンタACが初期位置に挿入されていない場合、初期位置にアライブカウンタACを挿入してフレームをCANトランシーバ52に送信させてもよい。
FIG. 12 is a flowchart illustrating a flow of transmission processing executed by the communication control unit 44 according to the third embodiment. First, the communication control unit 44 refers to the frame transmission / reception result stored in the
ステップS300で特定されたフレームの送受信回数が1回目でない場合、通信制御部44は、アライブカウンタACの位置を前回の位置から1つずらした位置にアライブカウンタACを挿入する(ステップS306)。アライブカウンタACの位置を1つずらした位置とは、例えばフレームにおけるデータの先頭側または後方側に一つずらされた位置である。なお、本実施形態では、「1つずらした位置」としているが、これに限られない。ステップS306の処理を、例えば「N(Nは任意の自然数)つずらした位置」としてもよい。次に、通信制御部44は、ステップS306の処理がされたフレームをCANトランシーバ52に送信させる(ステップS308)。これにより本フローチャートの1ルーチンの処理は終了する。
If the transmission / reception frequency of the frame specified in step S300 is not the first time, the communication control unit 44 inserts the alive counter AC at a position shifted by one from the previous position (step S306). The position where the position of the alive counter AC is shifted by one is, for example, a position shifted by one to the head side or the rear side of the data in the frame. In the present embodiment, the “position shifted by one” is used, but the present invention is not limited to this. The processing in step S306 may be, for example, “position shifted by N (N is an arbitrary natural number)”. Next, the communication control unit 44 causes the
図13は、第3の実施形態に係る通信制御部44により実行される受信処理の流れを示すフローチャートである。まず、通信制御部44が、記憶部30に格納されたフレームの送受信結果を参照し、通信システム1におけるこれまでのフレームの送受信回数を特定する(ステップS350)。次に、通信制御部44は、ステップS350で特定されたフレームの送受信回数が1回目であるか否かを判定する(ステップS352)。ステップS350で特定されたフレームの送受信回数が1回目である場合、通信制御部44は、アライブカウンタACの位置は初期位置であるとみなしてフレームを復元し、受信データとしてフレームの少なくとも一部を一時記憶領域36に格納する(ステップS354)。ステップS350で特定されたフレームの送受信回数が1回目でない場合、通信制御部44は、アライブカウンタACの位置は前回のアライブカウンタAC位置から一つずらされた位置であるとみなしてフレームを復元し、受信データとしてフレームの少なくとも一部を一時記憶領域36に格納する(ステップS356)。これにより本フローチャートの1ルーチンが終了する。
FIG. 13 is a flowchart illustrating a flow of reception processing executed by the communication control unit 44 according to the third embodiment. First, the communication control unit 44 refers to the frame transmission / reception result stored in the
図14は、通信制御部44によりアライブカウンタACが1つずつずらされデータ間に挿入される様子を模式的に示す図である。図中では、フレームのうちデータフィールドに含まれるデータD1からD4、アライブカウンタAC、およびCRCシーケンスのみを示している。また、アライブカウンタACの初期位置は、データ4の後であるものとして説明する。
FIG. 14 is a diagram schematically illustrating how the alive counter AC is shifted by one by the communication control unit 44 and inserted between data. In the figure, only data D1 to D4, alive counter AC, and CRC sequence included in the data field of the frame are shown. In addition, it is assumed that the initial position of the alive counter AC is after the
フレームの1回目の送信では、通信制御部44は、アライブカウンタACを初期位置に配置した状態でバス4に送信する。フレームの2回目の送信では、通信制御部44は、アライブカウンタACを初期位置から1つ先頭側にずらしてバス4に送信する。フレームの2回目の送信では、アライブカウンタACはD3とD4との間に挿入されてバスに送信される。また、フレームの3回目の送信では、通信制御部44が、アライブカウンタACを2回目の送信位置から1つ先頭側にずらしてバスに送信する。フレームの3回目の送信では、アライブカウンタACはD2とD3との間に挿入されて送信される。
In the first transmission of the frame, the communication control unit 44 transmits the alive counter AC to the
フレームを受信するECU10においては、上述した図13の処理により、通信制御部44が、アライブカウンタACの位置を特定する。フレームの1回目の受信では、アライブカウンタACの位置は、初期位置であるとみなしフレームを復元する。フレームの2回目の受信では、通信制御部44が、アライブカウンタACの位置は前回のアライブカウンタAC位置から一つずらされた位置、すなわちD3とD4との間に挿入されているとみなしフレームを復元する。フレームの3回目の受信では、通信制御部44が、アライブカウンタACの位置は前回のアライブカウンタAC位置から一つずらされた位置、すなわちD2とD3との間に挿入されているとみなしフレームを復元する。
In the
以上説明した第3実施形態の通信システム1によれば、フレームを送信する側では、設定された基準に従いアライブカウンタACをフレーム内に挿入することにより、設定された基準が記憶されていない受信側においてフレームに含まれるアライブカウンタACの位置を特定させないようにすることができる。一方、設定された基準が記憶されている受信側においては、フレームに含まれるアライブカウンタACの位置を特定することができる。この結果、通信システム1は、車載ネットワークのセキュリティ性を向上させることができる。
According to the
<第4実施形態>
図15は、第4の実施形態に係る通信システムが備えるECU10Bの構成例を示す図である。第4の実施形態では、ECU10Bがアライブカウンタ位置テーブル39を備え、通信制御部44がアライブカウンタ位置テーブル39を参照してデータの位置を入れ替える点で、第3の実施形態と相違する。以下では、係る相違点を中心に説明する。
<Fourth embodiment>
FIG. 15 is a diagram illustrating a configuration example of the
図16は、アライブカウンタ位置テーブル39の内容を例示した図である。アライブカウンタ位置テーブル39は、通信システム1全体におけるフレームの送信回数と、アライブカウンタACの位置との対応関係を示す情報である。図示する例では、例えば1回目の送信ではアライブカウンタACの位置は5番、2回目の送信ではアライブカウンタACの位置は3番、3回目の送信ではアライブカウンタACの位置は4番等のように、フレームの送信回数はアライブカウンタACの位置に対応付けられている。アライブカウンタ位置テーブル39は、通信システム1を構成する各ECU10の記憶部30に格納される。
FIG. 16 is a diagram illustrating the contents of the alive counter position table 39. The alive counter position table 39 is information indicating the correspondence between the number of frame transmissions in the
図17は、第4実施形態に係る通信制御部44により実行される処理の流れを示すフローチャートである。まず、通信制御部44が、記憶部30に格納されたフレームの送受信結果を参照し、通信システム1におけるこれまでのフレームの送受信回数を特定する(ステップS400)。次に、通信制御部44は、アライブカウンタ位置テーブル39を参照し(ステップS402)、ステップS400で特定されたフレームの送受信回数に対応する位置にアライブカウンタACを挿入する(ステップS404)。次に、通信制御部44は、ステップS404の処理によりアライブカウンタACが挿入されたフレームをCANトランシーバ52に送信させる(ステップS406)。これにより本フローチャートの1ルーチンの処理は終了する。
FIG. 17 is a flowchart showing a flow of processing executed by the communication control unit 44 according to the fourth embodiment. First, the communication control unit 44 refers to the frame transmission / reception result stored in the
ステップS406により送信されたフレームを受信した側の通信制御部44は、アライブカウンタ位置テーブル39を参照して、受信したフレームに含まれるアライブカウンタACの位置を特定する。通信制御部44は、アライブカウンタACの位置に基づいてフレームを復元し、受信データとしてフレームの少なくとも一部を一時記憶領域36に格納する。通信制御部44は、例えば特定した位置のアライブカウンタACの情報を無効として扱いデータを復元する。
The communication control unit 44 on the side receiving the frame transmitted in step S406 refers to the alive counter position table 39 and specifies the position of the alive counter AC included in the received frame. The communication control unit 44 restores the frame based on the position of the alive counter AC, and stores at least a part of the frame in the
図18は、通信制御部44によりアライブカウンタACがアライブカウンタ位置テーブル39に対応する位置に挿入される様子を示す図である。図中では、フレームのうちデータフィールドに含まれるデータD1からD4、アライブカウンタAC、およびCRCシーケンスのみを示している。また、アライブカウンタACの初期位置は、データ4の後であるものとして説明する。
FIG. 18 is a diagram illustrating a state in which the alive counter AC is inserted at a position corresponding to the alive counter position table 39 by the communication control unit 44. In the figure, only data D1 to D4, alive counter AC, and CRC sequence included in the data field of the frame are shown. In addition, it is assumed that the initial position of the alive counter AC is after the
フレームの1回目の送信では、通信制御部44は、アライブカウンタ位置テーブル39を参照し、1回目の送信回数に対応するアライブカウンタACを挿入する位置を特定する。送信回数が1回目に対応するアライブカウンタACの位置が5番目の場合、アライブカウンタACを先頭のデータから5番目に挿入して、フレームを送信する。フレームの2回目の送信では、通信制御部44は、アライブカウンタ位置テーブル39を参照し、2回目の送信回数に対応するアライブカウンタACを挿入する位置を特定する。送信回数が2回目に対応するアライブカウンタACの位置が3番目の場合、アライブカウンタACを先頭のデータから3番目に挿入して、フレームを送信する。フレームの3回目の送信では、通信制御部44は、アライブカウンタ位置テーブル39を参照し、3回目の送信回数に対応するアライブカウンタACを挿入する位置を特定する。送信回数が3回目に対応するアライブカウンタACの位置が4番目の場合、アライブカウンタACを先頭のデータから4番目に挿入して、フレームを送信する。 In the first transmission of the frame, the communication control unit 44 refers to the alive counter position table 39 and specifies the position where the alive counter AC corresponding to the first transmission count is inserted. When the position of the alive counter AC corresponding to the first transmission is fifth, the alive counter AC is inserted fifth from the top data, and the frame is transmitted. In the second transmission of the frame, the communication control unit 44 refers to the alive counter position table 39 and specifies the position where the alive counter AC corresponding to the second transmission count is inserted. If the position of the alive counter AC corresponding to the second transmission count is the third position, the alive counter AC is inserted third from the top data, and the frame is transmitted. In the third transmission of the frame, the communication control unit 44 refers to the alive counter position table 39 and specifies the position where the alive counter AC corresponding to the third transmission count is inserted. When the position of the alive counter AC corresponding to the third transmission is fourth, the alive counter AC is inserted fourth from the top data, and the frame is transmitted.
送信されたフレームを受信した側の通信制御部44は、アライブカウンタ位置テーブル39を参照して、受信したフレームの送信回数に基づいて、フレーム(任意領域)を復元し、受信データとしてフレームの少なくとも一部を一時記憶領域36に格納する。図17に示すように、送信回数が3回目のアライブカウンタACを含むフレームを受信した場合、通信制御部44は、アライブカウンタ位置テーブル39を参照して、アライブカウンタACは先頭から4番目に挿入されたと判断する。通信制御部44が、判断の結果に基づいて、フレーム(任意領域)を復元し、受信データとしてフレームの少なくとも一部を一時記憶領域36に格納する。
The communication control unit 44 that has received the transmitted frame refers to the alive counter position table 39 to restore the frame (arbitrary area) based on the number of transmissions of the received frame, and receives at least the frame as received data. A part is stored in the
以上説明した第4実施形態の通信システム1によれば、通信制御部44が、アライブカウンタ位置テーブル39を参照し、送信するデータに含まれるアライブカウンタACの位置を決定し、決定した結果に基づく位置にアライブカウンタACを挿入したデータを含むフレームを送信する。また、通信制御部44が、アライブカウンタ位置テーブル39を参照し、受信したフレームに含まれるアライブカウンタACの位置を特定する。この結果、通信システム1は、第3実施形態の効果を奏すると共に、不規則にアライブカウンタACをフレーム内に挿入させることができる。
According to the
以上、本発明を実施するための形態について実施形態を用いて説明したが、本発明はこうした実施形態に何等限定されるものではなく、本発明の要旨を逸脱しない範囲内において種々の変形及び置換を加えることができる。 As mentioned above, although the form for implementing this invention was demonstrated using embodiment, this invention is not limited to such embodiment at all, In the range which does not deviate from the summary of this invention, various deformation | transformation and substitution Can be added.
1‥通信システム、10‥ECU、30‥記憶部、40‥制御部、44‥通信制御部、
AC‥アライブカウンタ
DESCRIPTION OF
AC alive counter
Claims (7)
前記有線ネットワークから前記フレームを受信する受信部と、
前記フレームの送信回数によって前記送信部が送信するフレームのビットの順序を入れ替える制御部と、
を備える通信装置。 A transmission unit that transmits a frame composed of a plurality of bits to a wired network in which a plurality of devices refer to information;
A receiving unit for receiving the frame from the wired network;
A control unit for changing the order of bits of the frame transmitted by the transmission unit according to the number of transmissions of the frame;
A communication device comprising:
前記制御部は、前記送信部が送信するフレームのビットの順序を、前記任意領域内で入れ替える、
請求項1に記載の通信装置。 The frame has a standard area defined by a communication protocol and an arbitrary area in which at least the content of data is stored,
The control unit replaces the order of the bits of the frame transmitted by the transmission unit within the arbitrary region.
The communication apparatus according to claim 1.
前記制御部は、前記アライブカウンタ領域の位置を変えずに前記複数のデータ領域に含まれるデータ領域の位置を入れ替えることで前記ビットの順序を入れ替える、
請求項1または2に記載の通信装置。 The frame has a plurality of data areas in which data contents are stored, and an alive counter area in which data identification information is included.
The control unit changes the order of the bits by changing the position of the data area included in the plurality of data areas without changing the position of the alive counter area.
The communication device according to claim 1 or 2.
請求項3に記載の通信装置。 The control unit determines positions of data areas included in the plurality of data areas according to information included in the alive counter area;
The communication apparatus according to claim 3.
請求項4に記載の通信装置。 The control unit refers to correspondence information in which information included in the alive counter area is associated with positions of data areas included in the plurality of data areas, and an order corresponding to the information included in the alive counter area And changing the order of the positions of the data areas included in the plurality of data areas,
The communication apparatus according to claim 4.
前記制御部は、前記複数のデータ領域間に前記アライブカウンタ領域を割り込ませることで、前記ビットの順序を入れ替える、
請求項1または2に記載の通信装置。 The frame has a plurality of data areas in which data contents are stored, and an alive counter area in which data identification information is included.
The control unit changes the order of the bits by interrupting the alive counter area between the plurality of data areas.
The communication device according to claim 1 or 2.
前記有線ネットワークと、
を備える通信システム。 A communication device according to any one of claims 1 to 6;
The wired network;
A communication system comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015134415A JP2017017615A (en) | 2015-07-03 | 2015-07-03 | Communication apparatus and communication system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015134415A JP2017017615A (en) | 2015-07-03 | 2015-07-03 | Communication apparatus and communication system |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2017017615A true JP2017017615A (en) | 2017-01-19 |
Family
ID=57828263
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2015134415A Pending JP2017017615A (en) | 2015-07-03 | 2015-07-03 | Communication apparatus and communication system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2017017615A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2019080119A (en) * | 2017-10-20 | 2019-05-23 | 国立大学法人名古屋大学 | On-vehicle communication device, on-vehicle communication system, and on-vehicle communication method |
JP2020065151A (en) * | 2018-10-17 | 2020-04-23 | 日立オートモティブシステムズ株式会社 | Electronic control device for automobile |
US11250574B2 (en) | 2019-11-21 | 2022-02-15 | Aisin Seiki Kabushiki Kaish | Sensor system |
-
2015
- 2015-07-03 JP JP2015134415A patent/JP2017017615A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2019080119A (en) * | 2017-10-20 | 2019-05-23 | 国立大学法人名古屋大学 | On-vehicle communication device, on-vehicle communication system, and on-vehicle communication method |
JP2020065151A (en) * | 2018-10-17 | 2020-04-23 | 日立オートモティブシステムズ株式会社 | Electronic control device for automobile |
JP7100558B2 (en) | 2018-10-17 | 2022-07-13 | 日立Astemo株式会社 | Electronic control device for automobiles |
US11250574B2 (en) | 2019-11-21 | 2022-02-15 | Aisin Seiki Kabushiki Kaish | Sensor system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP7170780B2 (en) | Fraud detection rule update method, fraud detection electronic control unit, and in-vehicle network system | |
US10193859B2 (en) | Security apparatus, attack detection method, and storage medium | |
US10454957B2 (en) | Method for preventing electronic control unit from executing process based on malicious frame transmitted to bus | |
US9361178B2 (en) | Method and device for improving the data transmission security in a serial data transmission having flexible message size | |
JP6836340B2 (en) | Fraud detection electronic control unit, in-vehicle network system and communication method | |
EP3337120B1 (en) | Network message authentication and verification | |
JP6477281B2 (en) | In-vehicle relay device, in-vehicle communication system, and relay program | |
JP6525824B2 (en) | Relay device | |
JP6206232B2 (en) | In-vehicle control device | |
CN107817779B (en) | System and method for verifying unregistered device based on information of Ethernet switch | |
JP7182559B2 (en) | Log output method, log output device and program | |
EP2584741A1 (en) | Central Bus Guardian (CBG) and method for operating CBG | |
EP3772200B1 (en) | Illicit act detection method, illicit act detection device, and program | |
KR20140030214A (en) | Method and device for serial data transmission which is adapted to memory sizes | |
KR102471960B1 (en) | Apparatus for security of vehicle can communication and method thereof | |
US9386070B2 (en) | Delay system, delay device and communication device constituting delay system | |
CN111108725A (en) | Method for monitoring communication on a communication bus and electronic device for connection to a communication bus | |
JP7412506B2 (en) | Fraud detection rule update method, fraud detection electronic control unit and in-vehicle network system | |
JP2017017615A (en) | Communication apparatus and communication system | |
JP2006253922A (en) | Gateway apparatus and data transfer method for the gateway apparatus | |
JP6527647B1 (en) | Fraud detection method, fraud detection device and program | |
JP6532162B2 (en) | Communication device and communication system | |
US20210099469A1 (en) | Alert system for controller area networks | |
CN108632242B (en) | Communication device and receiving device | |
CN113328918B (en) | Transmitter apparatus, receiver apparatus, and communication method |