JP2017017615A - Communication apparatus and communication system - Google Patents

Communication apparatus and communication system Download PDF

Info

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
Application number
JP2015134415A
Other languages
Japanese (ja)
Inventor
文隆 西沢
Fumitaka Nishizawa
文隆 西沢
淳史 倉内
Junji Kurauchi
淳史 倉内
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.)
Honda Motor Co Ltd
Original Assignee
Honda Motor Co Ltd
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 Honda Motor Co Ltd filed Critical Honda Motor Co Ltd
Priority to JP2015134415A priority Critical patent/JP2017017615A/en
Publication of JP2017017615A publication Critical patent/JP2017017615A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a communication apparatus capable of improving the security of an on-vehicle network, and a communication system.SOLUTION: The communication apparatus comprises: a transmission part which transmits a frame comprising plural bits to a cable network which is referred to by plural apparatuses for information; a reception part which receives the frame from the cable network; and a control part which rearranges the order of the bits of the frame to be transmitted by the transmission part in accordance with the number of times of transmitting the frame.SELECTED DRAWING: Figure 2

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.

特開2014−183395号公報JP 2014-183395 A

車載システムに於ける通信データは、ノード間の取り決めによって情報のやり取りを行っているが、近年、自動車のノード間で通信される内部情報を読み出して改竄するような事象が発生している。従来の通信システムを利用した車載ネットワークでは、通信フレームの配置が固定的であるため、セキュリティ性が低下する場合があった。
本発明は、このような事情を考慮してなされたものであり、車載ネットワークのセキュリティ性を向上させることができる通信装置、および通信システムを提供することを目的の一つとする。
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 claim 2 is the communication apparatus according to claim 1, wherein the frame has a standard area defined by a communication protocol and an arbitrary area in which at least data contents are stored, and the control unit Replaces the bit order of the frames transmitted by the transmitting unit within the arbitrary area.

請求項3記載の発明は、請求項1または2に記載の通信装置であって、前記フレームは、データの内容が格納される複数のデータ領域と、データの識別情報が含まれるアライブカウンタ領域とを有し、前記制御部は、前記アライブカウンタ領域の位置を変えずに前記複数のデータ領域に含まれるデータ領域の位置を入れ替えることで前記ビットの順序を入れ替える。   The invention according to claim 3 is the communication apparatus according to claim 1 or 2, wherein the frame includes 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 positions of the data areas included in the plurality of data areas without changing the position of the alive counter area.

請求項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 claim 4, wherein the control unit associates information included in the alive counter area with positions of data areas included in the plurality of data areas. With reference to the correspondence information, the order of the positions of the data areas included in the plurality of data areas is changed in an order corresponding to the information included in the alive counter area.

請求項6記載の発明は、請求項1または2に記載の通信装置であって、前記フレームは、データの内容が格納される複数のデータ領域と、データの識別情報が含まれるアライブカウンタ領域とを有し、前記制御部は、前記複数のデータ領域間に前記アライブカウンタ領域を割り込ませることで、前記ビットの順序を入れ替える。   The invention according to claim 6 is the communication apparatus according to claim 1 or 2, wherein the frame includes 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.

請求項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 Claim 4 and 5, the said control part determines the position of the data area contained in these data areas by the information contained in the said alive counter area | region, and is more security of vehicle-mounted network. Can be improved.

第1の実施形態に係るECU10(通信装置)を含む通信システム1の概念図である。1 is a conceptual diagram of a communication system 1 including an ECU 10 (communication device) according to a first embodiment. 通信システム1の構成を、より簡略化して示す図である。1 is a diagram showing a simplified configuration of a communication system 1. FIG. ECU10の構成例を示す図である。It is a figure which shows the structural example of ECU10. ECU10がバスに送信するフレームの形式例である。It is a format example of the frame which ECU10 transmits to a bus | bath. 通信制御部44により実行される送信処理の流れを示すフローチャートである。5 is a flowchart showing a flow of transmission processing executed by a communication control unit 44. 通信制御部44により実行される受信処理の流れを示すフローチャートである。4 is a flowchart showing a flow of reception processing executed by a communication control unit 44. 通信制御部44によりアライブカウンタACのカウント値がインクリメントされると共に、データの位置がずらされる様子を示す図である。It is a figure which shows a mode that the count value of alive counter AC is incremented by the communication control part 44, and the position of data is shifted. 第2の実施形態に係る通信システムが備えるECU10Aの構成例を示す図である。It is a figure which shows the structural example of ECU10A with which the communication system which concerns on 2nd Embodiment is provided. データ位置テーブル38の内容を例示した図である。5 is a diagram illustrating the contents of a data position table 38. FIG. 第2の実施形態に係る通信制御部44により実行される処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the process performed by the communication control part 44 which concerns on 2nd Embodiment. 第2の実施形態の通信制御部44によりアライブカウンタACのカウント値がインクリメントされると共に、データの位置がずらされる様子を示す図である。It is a figure which shows a mode that the position of data is shifted while the count value of alive counter AC is incremented by the communication control part 44 of 2nd Embodiment. 第3の実施形態に係る通信制御部44により実行される送信処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the transmission process performed by the communication control part 44 which concerns on 3rd Embodiment. 第3の実施形態に係る通信制御部44により実行される受信処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the reception process performed by the communication control part 44 which concerns on 3rd Embodiment. 通信制御部44によりアライブカウンタACが1つずつずらされデータ間に挿入される様子を模式的に示す図である。It is a figure which shows typically a mode that the alive counter AC is shifted 1 each by the communication control part 44, and is inserted between data. 第4の実施形態に係る通信システムが備えるECU10Bの構成例を示す図である。It is a figure which shows the structural example of ECU10B with which the communication system which concerns on 4th Embodiment is provided. アライブカウンタ位置テーブル39の内容を例示した図である。It is the figure which illustrated the contents of the alive counter position table. 第4実施形態に係る通信制御部44により実行される処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the process performed by the communication control part 44 which concerns on 4th Embodiment. 通信制御部44によりアライブカウンタACがアライブカウンタ位置テーブル39に対応する位置に挿入される様子を示す図である。It is a figure which shows a mode that alive counter AC is inserted in the position corresponding to the alive counter position table 39 by the communication control part 44. FIG.

以下、図面を参照し、本発明の通信装置、および通信システムの実施形態について説明する。   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 communication system 1 including an ECU 10 (communication device) according to the first embodiment. The communication system 1 includes a bus 4 connected to the OBD connector 2, a sub communication bus 6 and a sub communication bus 8 connected to the bus 4. The bus 4, the sub communication bus 6, and the sub communication bus 8 are connected to a plurality of ECUs 10 for controlling the vehicle, detection sensors for detecting the state of the vehicle, and other devices mounted on the vehicle. Hereinafter, the bus 4, the sub-communication bus 6, and the sub-communication bus 8 are referred to as a bus n when not distinguished from each other. For example, communication based on CAN (Controller Area Network) is performed on the bus n. An OBD (On-board diagnostics) connector 2 acquires information on devices connected to the bus. The OBD connector 2 transmits diagnostic data to a device connected to the bus, and receives a response to the transmitted diagnostic data. The OBD connector 2 diagnoses whether or not a device connected to the bus n is operating normally based on a response to the received diagnostic data. In addition, when control data for controlling each device is transmitted to each device via the OBD connector 2, each device operates according to the transmitted control data. The ECU 10 is an engine ECU 9A that controls the engine, a seat belt ECU 9B that controls the seat belt, and the like. The detection sensor for detecting the state of the vehicle is, for example, a yaw rate sensor or an acceleration sensor.

図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 communication system 1 in a more simplified manner. The communication system 1 is connected to ECUs 10-1 to 10-3 connected to the bus 4-1, ECUs 10-4 to 10-6 connected to the bus 4-2, and buses 4-1 and 4-2. The gateway device 11 relays between the bus 4-1 and the bus 4-2. The configuration shown in FIG. 2 may be mounted on a vehicle similarly to the configuration shown in FIG. 1 or may be applied to other devices. In the bus 4-1 and the bus 4-2, for example, communication based on CAN is performed similarly to the bus n. Each ECU 10 can acquire data flowing through the bus 4-1 or 4-2. Hereinafter, when the ECUs 10-1 to 10-6 are not distinguished from each other, they are simply expressed as ECU10. The bus 4-1 and the bus 4-2 are, for example, twisted pair cables, and transmit signals by a differential voltage method.

図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 ECU 10. The ECU 10 includes, for example, a storage unit 30, a control unit 40, a CAN controller 50, and a CAN transceiver 52. The control unit 40 includes a processor such as a CPU (Central Processing Unit), for example.

記憶部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 storage unit 30 includes, for example, a nonvolatile storage device such as a ROM (Read Only Memory), an EEPROM (Electrically Erasable and Programmable Read Only Memory), and an HDD (Hard Disk Drive), a RAM (Random Access Memory), a register, and the like. Realized by a volatile storage device. The storage unit 30 stores programs such as an application program 32 and a CAN driver 34. The storage unit 30 also has a temporary storage area 36 including a transmission buffer (not shown) and a reception buffer (not shown).

アプリケーションプログラム32は、ECU10に割り当てられた情報処理を行うためのプログラムである。CANドライバ34は、アプリケーションプログラム32とCANコントローラ50との間を仲介する。   The application program 32 is a program for performing information processing assigned to the ECU 10. The CAN driver 34 mediates between the application program 32 and the CAN controller 50.

制御部40は、中央制御部42と、通信制御部44とを備える。中央制御部42は、アプリケーションプログラム32を実行することにより機能し、ECU10に与えられた制御を実行する。   The control unit 40 includes a central control unit 42 and a communication control unit 44. The central control unit 42 functions by executing the application program 32 and executes control given to the ECU 10.

通信制御部44は、CANトランシーバ52により受信されたフレームに含まれる情報(ID)を参照し、自装置が使用する情報が含まれたフレームであるか否かを判定する。自装置が使用する情報がフレームに含まれる場合、通信制御部44は、フレームに含まれた情報を取得し、記憶部30の一時記憶領域36に格納する。   The communication control unit 44 refers to information (ID) included in the frame received by the CAN transceiver 52, and determines whether the frame includes information used by the own device. When the information used by the own device is included in the frame, the communication control unit 44 acquires the information included in the frame and stores it in the temporary storage area 36 of the storage unit 30.

通信制御部44は、CANトランシーバ52にフレームを送信させる。本実施例において、通信制御部44は、フレームの送信回数によってCANトランシーバ52が送信するフレームのビットの順序を入れ替える。   The communication control unit 44 causes the CAN transceiver 52 to transmit a frame. In this embodiment, the communication control unit 44 changes the order of the bits of the frames transmitted by the CAN transceiver 52 according to the number of frame transmissions.

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 controller 50 transmits / receives various data to / from the bus 4-1 or 4-2 (hereinafter referred to as the bus 4) via the CAN transceiver 52. When transmitting a frame to the bus 4, the CAN controller 50 converts the frame stored in the transmission buffer of the temporary storage area 36 into a serial transmission signal by, for example, the NRZ (Non-Return-to-Zero) method. And output to the CAN transceiver 52. The CAN controller 50 outputs a voltage having a low logic level to a bit whose converted signal is “0” (dominant), and outputs a voltage having a high logic level to a bit having “1” (recessive). Further, when receiving data (frame) from the CAN transceiver 52, the CAN controller 50 converts the received frame into information that can be analyzed by the control unit 40 from, for example, a serial transmission signal, and passes through the CAN controller 50. Store in the reception buffer of the temporary storage area 36.

CANトランシーバ52は、フレームを送信する送信部、またはフレームを受信する受信部として機能する。CANトランシーバ52は、CANコントローラ50から取得した送信信号を差動電圧に変換してバス4に送信する。また、CANトランシーバ52は、バス4からデータを取得する際には、バス4の差動電圧を読み取り、所定の電圧範囲に含まれるように整形した受信信号をCANコントローラ50に送信する。CANコントローラ50の受信端子Rxにはコンパレータが取り付けられており、所定の閾値電圧とCANトランシーバ52からの受信信号とを比較することで、「1」、「0」のデジタルデータを生成して記憶部30に格納する。   The CAN transceiver 52 functions as a transmission unit that transmits a frame or a reception unit that receives a frame. The CAN transceiver 52 converts the transmission signal acquired from the CAN controller 50 into a differential voltage and transmits it to the bus 4. Further, when acquiring data from the bus 4, the CAN transceiver 52 reads the differential voltage of the bus 4 and transmits a reception signal shaped to be included in a predetermined voltage range to the CAN controller 50. A comparator is attached to the reception terminal Rx of the CAN controller 50, and digital data “1” and “0” are generated and stored by comparing a predetermined threshold voltage with a reception signal from the CAN transceiver 52. Store in the unit 30.

図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 ECU 10 to the bus. A frame transmitted in one transmission includes a start of frame (SOF) indicating the start of the frame, an ID as a data identifier, a remote transmission request (RTR) for identifying the data frame and the remote frame, and a data byte. A control field representing the number, a data field that is the substance of the data to be transferred, an alive counter AC to which identification information is added, a CRC sequence to which a CRC for checking a frame error is added, a unit from which the correct message is received An ACK slot and an ACK delimiter for receiving a notification (ACK), an end-of-frame (EOF) indicating the end of the frame, and the like are included. In the frame, the data field is an example of a “data area”. The area including the data field and the alive counter AC is an example of “arbitrary area”, and the other area is an example of “standard area defined by the communication protocol”.

バス4では、IDとRTRにより表される優先度に基づく通信調停が行われる。複数のECU10から同時にフレームが送信される場合、各ECU10は、自己が送信したデータとバス状態をモニターした結果を比較する。ここで、リセッシブとドミナントが別々のECU10から同時に送信された場合、ドミナントが優先され、バスの状態はドミナントとなる。このとき、リセッシブを送信したノードは自己が送信したものとバス状態の違いにより、通信調停に負けたと判断して送信を停止する。係る原理により、複数のECU10から同時にフレームが送信開始された場合、他ノードがリセッシブ送信を行っているときにドミナントを送信したノードが通信調停に勝つことになるので、IDの値が小さいフレームほど、優先度が高いということになる。   In the bus 4, communication arbitration based on the priority represented by the ID and RTR is performed. When frames are transmitted simultaneously from a plurality of ECUs 10, each ECU 10 compares the data transmitted by itself with the result of monitoring the bus state. Here, when recessive and dominant are transmitted simultaneously from different ECUs 10, dominant is given priority and the bus state becomes dominant. At this time, the node that transmitted the recessive determines that the node has lost communication arbitration due to the difference in the bus state from the node that transmitted the recessive and stops transmission. According to such a principle, when a frame is started to be transmitted from a plurality of ECUs 10 at the same time, the node that transmitted the dominant wins communication arbitration when other nodes are performing recessive transmission. This means that the priority is high.

以下、通信制御部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 ECU 10 is turned on. The ECU 10 performs a process of setting the count value of the alive counter AC to zero as an initialization process when the power is turned on. Also, when the count value of the alive counter AC reaches the upper limit value and overflows, the count value of the alive counter AC is returned to zero and is treated as the first time in a pseudo manner.

ステップ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 CAN transceiver 52 to transmit a frame including the alive counter AC whose count value is set to zero (step S102). In this case, a process for shifting data, which will be described later, is not performed.

ステップ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 temporary storage area 36 as received data (step S154). . Thereby, the process of one routine of this flowchart is completed.

図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 ECU 10 that receives the frame, the communication control unit 44 determines the positions of the data D1 to D4 by the process of FIG. 6 described above. In the first reception of the frame, since the count value of the alive counter AC is 0, the communication control unit 44 determines that the positions of the data D1 to D4 are the initial positions. In the second reception of the frame, since the count value of the alive counter AC is 1, the communication control unit 44 sets the data D4, D1, D2 in which the order of the data D1 to D4 of the previously transmitted frame is shifted by one. , D3 is determined to be transmitted in the order. In the third reception of the frame, since the count value of the alive counter AC is 2, the communication control unit 44 performs data D3 in which the order of the data D4, D1, D2, and D3 of the previously transmitted frame is shifted by one. , D4, D1, and D2.

受信側のECU10の通信制御部44は、フレームに含まれるデータの順序を、本来のデータの順序に並べ換えた状態で一時記憶領域36に格納する。この結果、受信側のECU10のアプリケーションプログラム32(中央制御部42)は、送信元が意図したデータの内容を受け取ることができる。   The communication control unit 44 of the ECU 10 on the receiving side stores the data in the temporary storage area 36 in a state where the order of the data included in the frame is rearranged in the original data order. As a result, the application program 32 (central control unit 42) of the ECU 10 on the receiving side can receive the content of data intended by the transmission source.

また、本実施形態のECU10および通信システム1によれば、データの配置を固定的にせず、送信回数に応じて変更しているため、外部から通信にアクセスし通信データを解析することによる不適切な干渉を妨害することができる。この結果、セキュリティ性を向上させることができる。   In addition, according to the ECU 10 and the communication system 1 of the present embodiment, the arrangement of data is not fixed, but is changed according to the number of transmissions. Therefore, it is inappropriate to access communication from outside and analyze communication data. Interference can be prevented. As a result, security can be improved.

以上説明した第1の実施形態の通信システム1によれば、フレームを送信する側の通信制御部44は、アライブカウンタACのカウント値を1つインクリメントすると共に、各データの位置を循環的に後方にずらして送信する。フレームを受信する側の通信制御部44は、受信したフレームに含まれるアライブカウンタACのカウント値に基づいて、フレームに含まれるデータの順序を判断して、判断結果に基づいてデータの位置を入れ替える。これらの結果、通信システム1は、車載ネットワークのセキュリティ性を向上させることができる。   According to the communication system 1 of the first embodiment described above, the communication control unit 44 on the frame transmission side increments the count value of the alive counter AC by 1 and cyclically moves the position of each data backward. To send. The communication control unit 44 on the frame receiving side determines the order of the data included in the frame based on the count value of the alive counter AC included in the received frame, and switches the position of the data based on the determination result. . As a result, the communication system 1 can improve the security of the in-vehicle network.

また、本実施形態では通信システム1の各ECU10が通信制御部44を備えるものとして説明したが、図1に示すOBDコネクタ2等に、ECU10の通信制御部44と同様の機能が搭載されてもよい。この場合、OBDAコネクタ2から送信される診断用のデータ、または各ECU10から送信されるデータには、アライブカウンタACのカウント値に基づいて、データがずらされている。   In the present embodiment, each ECU 10 of the communication system 1 is described as including the communication control unit 44. However, even if the OBD connector 2 illustrated in FIG. 1 has the same function as that of the communication control unit 44 of the ECU 10. Good. In this case, the data for diagnosis transmitted from the OBDA connector 2 or the data transmitted from each ECU 10 is shifted based on the count value of the alive counter AC.

<第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 ECU 10A included in the communication system according to the second embodiment. The second embodiment is different from the first embodiment in that the ECU 10A includes a data position table 38, and the communication control unit 44 refers to the data position table 38 to replace the data position. Below, it demonstrates centering on the difference which concerns.

図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 temporary storage area 36 as received data.

図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 count value 1 of the alive counter AC and transmits the data. The position corresponding to the count value 1 of the alive counter AC is a position where the data D1 is replaced fourth. In the second transmission of the frame, data 4 is transmitted first, and then data D2, D3, and D1 are transmitted in this order. In the third transmission of the frame, the count value of the alive counter AC is 2. The communication control unit 44 refers to the data position table 38, exchanges data so as to correspond to the count value 2 of the alive counter AC, and transmits the data. The position corresponding to the count value 2 of the alive counter AC is a position where the data D1 is replaced second. In the third transmission of the frame, data 2 is transmitted at the head, and then data D1, D3, and D4 are transmitted in this order.

送信されたフレームを受信した側の通信制御部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 temporary storage area 36 as data. As shown in FIG. 11, when the communication control unit 44 receives a frame including an alive counter whose count value is set to 2, the communication control unit 44 refers to the data position table 38 and refers to the position of the data D1. Is replaced from the top to the second. The communication control unit 44 restores the frame (arbitrary area) based on the determination result, and stores at least a part of the frame in the temporary storage area 36 as received data.

以上説明した第2実施形態の通信システム1によれば、通信制御部44が、データ位置テーブル38を参照し、アライブカウンタACのカウント値に基づいて送信するデータの順序を入れ替えて送信する。また、通信制御部44が、データ位置テーブル38を参照し、受信したフレームに含まれるアライブカウンタACのカウント値に基づいて、データを復元する。この結果、通信システム1は、第1実施形態の効果を奏すると共に、不規則にデータの順序を入れ替えることができる。   According to the communication system 1 of the second embodiment described above, the communication control unit 44 refers to the data position table 38 and transmits the data by changing the order of data to be transmitted based on the count value of the alive counter AC. Further, the communication control unit 44 refers to the data position table 38 and restores the data based on the count value of the alive counter AC included in the received frame. As a result, the communication system 1 can achieve the effects of the first embodiment and can change the order of data irregularly.

<第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 storage unit 30 and specifies the number of times of frame transmission / reception in the communication system 1 so far (step S300). Next, the communication control unit 44 determines whether or not the number of times of transmission / reception of the frame specified in step S300 is the first time (step S302). When the number of transmission / reception times of the frame specified in step S300 is the first time, the communication control unit 44 causes the CAN transceiver 52 to transmit the frame while maintaining the position of the alive counter AC inserted in the initial position (step S300). S304). Note that when the alive counter AC is not inserted in the initial position in advance, the communication control unit 44 may insert the alive counter AC in the initial position and transmit the frame to the CAN transceiver 52.

ステップ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 CAN transceiver 52 to transmit the frame that has been processed in step S306 (step S308). Thereby, the process of one routine of this flowchart is completed.

図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 storage unit 30 and identifies the number of times of frame transmission / reception in the communication system 1 so far (step S350). Next, the communication control unit 44 determines whether or not the number of times of transmission / reception of the frame specified in step S350 is the first time (step S352). When the number of transmission / reception times of the frame specified in step S350 is the first time, the communication control unit 44 considers the position of the alive counter AC to be the initial position, restores the frame, and receives at least a part of the frame as received data. Store in the temporary storage area 36 (step S354). If the transmission / reception frequency of the frame specified in step S350 is not the first time, the communication control unit 44 restores the frame by regarding the position of the alive counter AC as being shifted from the previous alive counter AC position by one. Then, at least a part of the frame is stored in the temporary storage area 36 as received data (step S356). Thereby, one routine of this flowchart is completed.

図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 data 4.

フレームの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 bus 4 with the alive counter AC placed at the initial position. In the second transmission of the frame, the communication control unit 44 transmits the alive counter AC to the bus 4 while shifting the alive counter AC from the initial position to one head side. In the second transmission of the frame, the alive counter AC is inserted between D3 and D4 and transmitted to the bus. Further, in the third transmission of the frame, the communication control unit 44 transmits the alive counter AC to the bus while shifting the alive counter AC from the second transmission position to the first head side. In the third transmission of the frame, the alive counter AC is inserted between D2 and D3 and transmitted.

フレームを受信するECU10においては、上述した図13の処理により、通信制御部44が、アライブカウンタACの位置を特定する。フレームの1回目の受信では、アライブカウンタACの位置は、初期位置であるとみなしフレームを復元する。フレームの2回目の受信では、通信制御部44が、アライブカウンタACの位置は前回のアライブカウンタAC位置から一つずらされた位置、すなわちD3とD4との間に挿入されているとみなしフレームを復元する。フレームの3回目の受信では、通信制御部44が、アライブカウンタACの位置は前回のアライブカウンタAC位置から一つずらされた位置、すなわちD2とD3との間に挿入されているとみなしフレームを復元する。   In the ECU 10 that receives the frame, the communication control unit 44 specifies the position of the alive counter AC by the process of FIG. 13 described above. In the first reception of the frame, the position of the alive counter AC is regarded as the initial position, and the frame is restored. In the second reception of the frame, the communication control unit 44 determines that the position of the alive counter AC is shifted by one from the previous alive counter AC position, that is, a frame inserted between D3 and D4. Restore. In the third reception of the frame, the communication control unit 44 assumes that the position of the alive counter AC is shifted by one from the position of the previous alive counter AC, that is, a frame inserted between D2 and D3. Restore.

以上説明した第3実施形態の通信システム1によれば、フレームを送信する側では、設定された基準に従いアライブカウンタACをフレーム内に挿入することにより、設定された基準が記憶されていない受信側においてフレームに含まれるアライブカウンタACの位置を特定させないようにすることができる。一方、設定された基準が記憶されている受信側においては、フレームに含まれるアライブカウンタACの位置を特定することができる。この結果、通信システム1は、車載ネットワークのセキュリティ性を向上させることができる。   According to the communication system 1 of the third embodiment described above, the frame transmitting side inserts the alive counter AC in the frame in accordance with the set standard, so that the set standard is not stored. It is possible to prevent the position of the alive counter AC included in the frame from being specified. On the other hand, on the receiving side in which the set reference is stored, the position of the alive counter AC included in the frame can be specified. As a result, the communication system 1 can improve the security of the in-vehicle network.

<第4実施形態>
図15は、第4の実施形態に係る通信システムが備えるECU10Bの構成例を示す図である。第4の実施形態では、ECU10Bがアライブカウンタ位置テーブル39を備え、通信制御部44がアライブカウンタ位置テーブル39を参照してデータの位置を入れ替える点で、第3の実施形態と相違する。以下では、係る相違点を中心に説明する。
<Fourth embodiment>
FIG. 15 is a diagram illustrating a configuration example of the ECU 10B included in the communication system according to the fourth embodiment. The fourth embodiment is different from the third embodiment in that the ECU 10B includes an alive counter position table 39, and the communication control unit 44 refers to the alive counter position table 39 to replace the data position. Below, it demonstrates centering on the difference which concerns.

図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 entire communication system 1 and the position of the alive counter AC. In the illustrated example, for example, the position of the alive counter AC is 5 in the first transmission, the position of the alive counter AC is 3 in the second transmission, and the position of the alive counter AC is 4 in the third transmission. In addition, the number of frame transmissions is associated with the position of the alive counter AC. The alive counter position table 39 is stored in the storage unit 30 of each ECU 10 constituting the communication system 1.

図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 storage unit 30 and specifies the number of times of frame transmission / reception so far in the communication system 1 (step S400). Next, the communication control unit 44 refers to the alive counter position table 39 (step S402), and inserts the alive counter AC at a position corresponding to the number of times of frame transmission / reception specified in step S400 (step S404). Next, the communication control unit 44 causes the CAN transceiver 52 to transmit the frame in which the alive counter AC is inserted by the process of step S404 (step S406). Thereby, the process of one routine of this flowchart is completed.

ステップ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 temporary storage area 36 as received data. For example, the communication control unit 44 treats the information of the alive counter AC at the specified position as invalid and restores the data.

図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 data 4.

フレームの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 temporary storage area 36. As shown in FIG. 17, when receiving a frame including the alive counter AC with the third transmission count, the communication control unit 44 refers to the alive counter position table 39 and inserts the alive counter AC fourth from the top. Judge that it was done. The communication control unit 44 restores the frame (arbitrary area) based on the determination result, and stores at least a part of the frame in the temporary storage area 36 as received data.

以上説明した第4実施形態の通信システム1によれば、通信制御部44が、アライブカウンタ位置テーブル39を参照し、送信するデータに含まれるアライブカウンタACの位置を決定し、決定した結果に基づく位置にアライブカウンタACを挿入したデータを含むフレームを送信する。また、通信制御部44が、アライブカウンタ位置テーブル39を参照し、受信したフレームに含まれるアライブカウンタACの位置を特定する。この結果、通信システム1は、第3実施形態の効果を奏すると共に、不規則にアライブカウンタACをフレーム内に挿入させることができる。   According to the communication system 1 of the fourth embodiment described above, the communication control unit 44 refers to the alive counter position table 39, determines the position of the alive counter AC included in the data to be transmitted, and based on the determined result. A frame including data in which the alive counter AC is inserted at the position is transmitted. Further, the communication control unit 44 refers to the alive counter position table 39 and specifies the position of the alive counter AC included in the received frame. As a result, the communication system 1 has the effects of the third embodiment, and can irregularly insert the alive counter AC into the frame.

以上、本発明を実施するための形態について実施形態を用いて説明したが、本発明はこうした実施形態に何等限定されるものではなく、本発明の要旨を逸脱しない範囲内において種々の変形及び置換を加えることができる。   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 SYMBOLS 1 ... Communication system 10 ... ECU, 30 ... Memory | storage part, 40 ... Control part, 44 ... Communication control part,
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.
請求項1から6のうちいずれか1項記載の通信装置と、
前記有線ネットワークと、
を備える通信システム。
A communication device according to any one of claims 1 to 6;
The wired network;
A communication system comprising:
JP2015134415A 2015-07-03 2015-07-03 Communication apparatus and communication system Pending JP2017017615A (en)

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)

* Cited by examiner, † Cited by third party
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

Cited By (4)

* Cited by examiner, † Cited by third party
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