JP2017097851A - Relaying apparatus and method and program for relaying - Google Patents

Relaying apparatus and method and program for relaying Download PDF

Info

Publication number
JP2017097851A
JP2017097851A JP2016183123A JP2016183123A JP2017097851A JP 2017097851 A JP2017097851 A JP 2017097851A JP 2016183123 A JP2016183123 A JP 2016183123A JP 2016183123 A JP2016183123 A JP 2016183123A JP 2017097851 A JP2017097851 A JP 2017097851A
Authority
JP
Japan
Prior art keywords
data
unit
electronic control
current
new
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.)
Granted
Application number
JP2016183123A
Other languages
Japanese (ja)
Other versions
JP6678548B2 (en
Inventor
利之 鬼頭
Toshiyuki Kito
利之 鬼頭
川端 健
Ken Kawabata
健 川端
健太郎 梅澤
Kentaro Umezawa
健太郎 梅澤
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to US15/347,387 priority Critical patent/US10437680B2/en
Publication of JP2017097851A publication Critical patent/JP2017097851A/en
Application granted granted Critical
Publication of JP6678548B2 publication Critical patent/JP6678548B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)
  • Stored Programmes (AREA)

Abstract

PROBLEM TO BE SOLVED: To reduce cost of an electronic controller and a time for updating data stored in the electronic controller.SOLUTION: The relaying apparatus according to an embodiment is for updating current data in an electronic controller to new data. The relaying apparatus includes: a request sending unit; a response receiving unit; and a data sending unit. The request sending unit sends, to a providing device, an acquisition request, which includes a device identifier for identifying the electronic controller, a data identifier for identifying current data, and version specifying information for specifying the version of the current data. The response receiving unit receives new data from the providing device in response to the acquisition request. The data sending unit receives the new data from the providing device and sends the new data to the electronic controller to cause the current data stored in the electronic controller to be updated to the new data. The data sending unit sends the current data to the electronic controller to cause the electronic controller to restore the current data if the updating processing has failed.SELECTED DRAWING: Figure 7

Description

本発明の実施形態は、中継装置、中継方法およびプログラムに関する。   Embodiments described herein relate generally to a relay device, a relay method, and a program.

車両は、例えばエンジン等を制御するための電子制御装置(ECU)を備える。電子制御装置は、ファームウェアを実行してエンジン等を制御する。また、近年、ネットワークに接続可能な車両も提案されている。このような車両に備えられた電子制御装置は、ネットワークを介してデータをダウンロードし、ファームウェアを更新することができる。このような電子制御装置は、ファームウェアの脆弱性が発見された場合、車両を工場等に戻すことなく、ファームウェアを更新することができる。   The vehicle includes an electronic control unit (ECU) for controlling, for example, an engine. The electronic control unit executes firmware and controls the engine and the like. In recent years, vehicles that can be connected to a network have also been proposed. An electronic control device provided in such a vehicle can download data and update firmware via a network. Such electronic control device can update the firmware without returning the vehicle to the factory or the like when the vulnerability of the firmware is found.

ところで、電子制御装置は、ファームウェアの更新が失敗した場合、現行のファームウェアをダウンロードしてメモリに書き込まなければならなかった。このため、電子制御装置は、ファームウェアの更新の失敗時において、再度、サーバ等にアクセスをしなければならなく、更新を開始してから再度実行可能な状態となるまでの期間が長くなってしまっていた。   By the way, when the firmware update fails, the electronic control device has to download the current firmware and write it in the memory. For this reason, the electronic control unit must access the server again when the firmware update fails, and the period from the start of the update to the state where it can be executed again becomes longer. It was.

また、このような問題を解決するため、電子制御装置は、データを一時的に記憶するバッファを2個備える場合がある。このような構成の電子制御装置は、ファームウェアの更新において、一方のバッファに現行のファームウェアを保持させておき、他方のバッファを用いて新しいファームウェアをダウンロードする。そして、電子制御装置は、ファームウェアの更新が失敗した場合には、一方のバッファに記憶させていた現行のファームウェアをメモリに書き戻す。しかしながら、このような構成の電子制御装置は、バッファを2個備えなくてはならないので、コストが高くなってしまっていた。また、車両が複数の電子制御装置を備える場合、それぞれの電子制御装置がバッファを2個備えなければならないので、車両の全体のコストが高くなってしまっていた。   In order to solve such a problem, the electronic control apparatus may include two buffers that temporarily store data. In updating the firmware, the electronic control device having such a configuration holds the current firmware in one buffer and downloads the new firmware using the other buffer. When the firmware update fails, the electronic control device writes the current firmware stored in the one buffer back to the memory. However, the electronic control device having such a configuration has to be provided with two buffers, which increases the cost. Further, when the vehicle includes a plurality of electronic control devices, each of the electronic control devices must include two buffers, which increases the overall cost of the vehicle.

国際公開第2011/055447号International Publication No. 2011/055447 特開2006−268554号公報JP 2006-268554 A

本発明が解決しようとする課題は、電子制御装置のコストを小さくするとともに、電子制御装置に記憶されているデータの更新時間を短くすることにある。   The problem to be solved by the present invention is to reduce the cost of the electronic control device and shorten the update time of data stored in the electronic control device.

実施形態の中継装置は、電子制御装置に記憶されている現データを新データに更新させるための装置である。前記中継装置は、要求送信部と、応答受信部と、データ送信部とを備える。前記要求送信部は、前記電子制御装置を識別する装置識別子と、前記現データを識別するデータ識別子と、前記現データのバージョンを特定可能なバージョン特定情報とを含む取得要求を、提供装置に送信する。前記応答受信部は、前記取得要求に応じて、前記提供装置から前記新データを受信する。前記データ送信部は、前記提供装置から受信した前記新データを前記電子制御装置に送信して前記電子制御装置に記憶されている前記現データを前記新データに更新させ、更新処理が失敗した場合、前記現データを前記電子制御装置に送信して前記電子制御装置に前記現データを復元させる。   The relay device according to the embodiment is a device for updating current data stored in the electronic control device to new data. The relay device includes a request transmission unit, a response reception unit, and a data transmission unit. The request transmitting unit transmits an acquisition request including a device identifier for identifying the electronic control device, a data identifier for identifying the current data, and version specifying information capable of specifying a version of the current data to a providing device. To do. The response receiving unit receives the new data from the providing device in response to the acquisition request. The data transmitting unit transmits the new data received from the providing device to the electronic control device, causes the current data stored in the electronic control device to be updated to the new data, and an update process fails. Then, the current data is transmitted to the electronic control unit to cause the electronic control unit to restore the current data.

実施形態に係るネットワークシステムを示す図。The figure which shows the network system which concerns on embodiment. 中継装置の構成図。The block diagram of a relay apparatus. 管理データを示す図。The figure which shows management data. 鍵情報を示す図。The figure which shows key information. 取得情報を示す図。The figure which shows acquisition information. 状態情報を示す図。The figure which shows status information. 提供装置および中継装置の構成図。The block diagram of a provision apparatus and a relay apparatus. 取得処理フロー図。Acquisition processing flowchart. 受信した現FWデータの正当性の判断フロー図。FIG. 6 is a flow chart for judging validity of received current FW data. 受信した新FWデータの正当性の判断フロー図。FIG. 5 is a flow chart for judging validity of received new FW data. 中継装置および電子制御装置の構成図。The block diagram of a relay apparatus and an electronic control apparatus. 中継装置による更新処理フロー図。The update process flow figure by a relay apparatus. 書き込まれた新FWデータの正当性の判断フロー図。FIG. 5 is a flow chart for judging validity of written new FW data. 書き込まれた現FWデータの正当性の判断フロー図。FIG. 6 is a flow chart for judging the validity of the written current FW data. 第1変形例に係る提供装置および中継装置の構成図。The block diagram of the provision apparatus and relay apparatus which concern on a 1st modification. 最新バージョン情報を示す図。The figure which shows the newest version information. 第1変形例に係る取得処理フロー図。The acquisition process flowchart which concerns on a 1st modification. 第2変形例に係る中継装置および電子制御装置の構成図。The block diagram of the relay apparatus and electronic control apparatus which concern on a 2nd modification. 第2変形例に係る更新処理フロー図。The update process flowchart which concerns on a 2nd modification. 第3変形例に係る中継装置および電子制御装置の構成図。The block diagram of the relay apparatus and electronic control apparatus which concern on a 3rd modification. 第3変形例に係る状態情報を示す図。The figure which shows the status information which concerns on a 3rd modification. 第3変形例に係る更新処理フロー図。The update process flow figure concerning a 3rd modification. 第2更新処理フローの他の一例を示す図。The figure which shows another example of a 2nd update process flow. 第4変形例に係る中継装置の構成図。The block diagram of the relay apparatus which concerns on a 4th modification. 現ファームウェア情報を示す図。The figure which shows the current firmware information. 第4変形例に係る提供装置および中継装置の構成図。The block diagram of the provision apparatus and relay apparatus which concern on a 4th modification. 第4変形例に係る取得処理フロー図。The acquisition process flowchart which concerns on a 4th modification. 第4変形例に係る中継装置および電子制御装置の構成図。The block diagram of the relay apparatus and electronic control apparatus which concern on a 4th modification. 第4変形例に係る更新処理フロー図。The update process flow figure concerning a 4th modification. 第5変形例に係る提供装置および中継装置の構成図。The block diagram of the provision apparatus and relay apparatus which concern on a 5th modification. 第6変形例に係る中継装置の構成図。The block diagram of the relay apparatus which concerns on a 6th modification. システム情報を示す図。The figure which shows system information. 第6変形例に係る提供装置および中継装置の構成図。The block diagram of the provision apparatus and relay apparatus which concern on a 6th modification. 第6変形例に係る取得処理フロー図。The acquisition process flowchart which concerns on a 6th modification. 第6変形例に係る中継装置および電子制御装置の構成図。The block diagram of the relay apparatus and electronic control apparatus which concern on a 6th modification. 第6変形例に係る更新処理フロー図。The update process flow figure concerning a 6th modification. 第6変形例に係るロールバック処理フロー図。The rollback process flowchart which concerns on a 6th modification. 第7変形例に係るネットワークシステムを示す図。The figure which shows the network system which concerns on a 7th modification. 第7変形例に係る中継装置および記憶装置の構成図。The block diagram of the relay apparatus and memory | storage device which concern on a 7th modification. 情報処理装置のハードウェア構成を示す図。The figure which shows the hardware constitutions of information processing apparatus.

以下、図面を参照しながら実施形態に係るネットワークシステム10について詳細に説明する。ネットワークシステム10は、電子制御装置(ECU)のコストを小さくするとともに、電子制御装置に記憶されているデータの更新時間を短くすることを目的とする。   Hereinafter, the network system 10 according to the embodiment will be described in detail with reference to the drawings. The network system 10 aims to reduce the cost of the electronic control unit (ECU) and shorten the update time of data stored in the electronic control unit.

図1は、実施形態に係るネットワークシステム10を示す図である。ネットワークシステム10は、提供装置20と、制御対象システム22とを備える。   FIG. 1 is a diagram illustrating a network system 10 according to the embodiment. The network system 10 includes a providing device 20 and a control target system 22.

提供装置20は、サーバ等の情報処理装置である。提供装置20は、インターネット等の外部ネットワークを介して制御対象システム22と接続される。   The providing device 20 is an information processing device such as a server. The providing device 20 is connected to the control target system 22 via an external network such as the Internet.

制御対象システム22は、少なくとも1つの電子制御装置24と、中継装置26とを有する。本実施形態において、制御対象システム22は、車両である。制御対象システム22は、車両に限らず、例えば、ロボットシステム、飛行機、または、ホームネットワークシステムであってもよい。   The control target system 22 includes at least one electronic control device 24 and a relay device 26. In the present embodiment, the control target system 22 is a vehicle. The control target system 22 is not limited to a vehicle, and may be, for example, a robot system, an airplane, or a home network system.

それぞれの電子制御装置24は、対象装置を制御する。対象装置は、制御対象システム22内に設けられる装置である。本実施形態において、対象装置は、例えば、エンジン等の車両の運動系の装置、燃料供給装置等のエネルギー系の装置、窓またはドア等のボディー系の装置、または、オーディオ装置等のエンターテイメント系の装置である。   Each electronic control unit 24 controls the target device. The target device is a device provided in the control target system 22. In the present embodiment, the target device is, for example, a vehicle system such as an engine, an energy system device such as a fuel supply device, a body system device such as a window or a door, or an entertainment system such as an audio device. Device.

電子制御装置24は、ハードウェアとして、CPU(Central Processing Unit)等の処理ユニット、ROM(Read Only Memory)、RAM(Random Access Memory)、不揮発性記憶装置等の記憶ユニット、対象装置と接続するためのインターフェイスユニット、並びに、中継装置26と通信するための通信ユニット等を有する。   The electronic control device 24 is connected to a processing unit such as a CPU (Central Processing Unit), a ROM (Read Only Memory), a RAM (Random Access Memory), a storage unit such as a nonvolatile storage device, and a target device as hardware. Interface unit, a communication unit for communicating with the relay device 26, and the like.

電子制御装置24の記憶ユニットは、ファームウェアを記憶する。ファームウェアは、CPU等の処理ユニットにより実行されるプログラム、または、CPU等の処理ユニットにより読み出されるデータである。電子制御装置24は、ファームウェアとハードウェアとが協働して対象装置を制御する。電子制御装置24は、1つのファームウェアを記憶していてもよいし、複数のファームウェアを記憶していてもよい。   The storage unit of the electronic control device 24 stores firmware. Firmware is a program executed by a processing unit such as a CPU or data read by a processing unit such as a CPU. The electronic control device 24 controls the target device in cooperation with firmware and hardware. The electronic control device 24 may store one firmware or a plurality of firmware.

また、電子制御装置24は、ファームウェアを更新する。電子制御装置24は、現在記憶しているファームウェアの実体データよりも新しいバージョンの実体データが、ファームウェアの開発者(開発者、開発グループまたは提供者等)により提供された場合、現在記憶しているファームウェアの実体データを、新しいバージョンの実体データに更新する。例えば、電子制御装置24は、現在記憶しているファームウェアの実体データを削除して新しいバージョンの実体データを新たに記憶したり、現在記憶しているファームウェアの実体データの記憶領域に新しいバージョンの実体データを上書きしたりすることにより、更新をする。電子制御装置24は、新しいファームウェアの実体データと更新指示とを外部から受け取った場合に、更新処理を実行する。   Further, the electronic control unit 24 updates the firmware. The electronic control unit 24 stores the actual version data of the firmware that is newer than the currently stored version when it is provided by a firmware developer (developer, development group, provider, etc.). The firmware entity data is updated to the new version of the entity data. For example, the electronic control unit 24 deletes the currently stored firmware entity data and newly stores a new version of the entity data, or stores the new version of the entity data in the currently stored firmware entity data storage area. Update by overwriting data. The electronic control unit 24 executes the update process when receiving the actual data of the new firmware and the update instruction from the outside.

ここで、本実施形態においては、記憶しているファームウェアの実体データを、“現FWデータ”と呼ぶ。また、記憶しているファームウェアの実体データよりも新しいバージョンの実体データを、“新FWデータ”と呼ぶ。   In this embodiment, the stored firmware entity data is referred to as “current FW data”. Also, entity data of a newer version than the stored firmware entity data is referred to as “new FW data”.

中継装置26は、それぞれの電子制御装置24に対して記憶している現FWデータを新FWデータに更新させるための装置である。中継装置26は、コンピュータ等と同様のハードウェア構成を有する情報処理装置である。中継装置26は、外部ネットワークを介して提供装置20と接続する。本実施形態においては制御対象システム22が車両であるので、中継装置26は、無線通信により外部ネットワークに接続する。   The relay device 26 is a device for updating current FW data stored in each electronic control device 24 to new FW data. The relay device 26 is an information processing device having a hardware configuration similar to that of a computer or the like. The relay device 26 is connected to the providing device 20 via an external network. In the present embodiment, since the control target system 22 is a vehicle, the relay device 26 is connected to an external network by wireless communication.

中継装置26は、内部ネットワークを介してそれぞれの電子制御装置24と接続する。外部ネットワークと内部ネットワークとは、中継装置26を介して接続されているが、直接には接続されていない。   The relay device 26 is connected to each electronic control device 24 via an internal network. The external network and the internal network are connected via the relay device 26, but are not directly connected.

図2は、中継装置26の機能構成を示す図である。中継装置26は、取得部30と、更新部32と、管理データ記憶部34と、共有鍵記憶部36と、一時記憶部38と、状態記憶部40とを備える。   FIG. 2 is a diagram illustrating a functional configuration of the relay device 26. The relay device 26 includes an acquisition unit 30, an update unit 32, a management data storage unit 34, a shared key storage unit 36, a temporary storage unit 38, and a state storage unit 40.

取得部30は、提供装置20から現FWデータおよび新FWデータ等を受信する。更新部32は、提供装置20から受信した新FWデータを電子制御装置24に送信して、電子制御装置24に現FWデータを新FWデータに更新させる。また、更新部32は、現FWデータを新FWデータに更新する更新処理が失敗した場合、提供装置20から受信した現FWデータを電子制御装置24に送信して、電子制御装置24に現FWデータを復元させる。   The acquisition unit 30 receives current FW data, new FW data, and the like from the providing device 20. The update unit 32 transmits the new FW data received from the providing device 20 to the electronic control device 24, and causes the electronic control device 24 to update the current FW data to the new FW data. In addition, when the update process for updating the current FW data to the new FW data fails, the update unit 32 transmits the current FW data received from the providing device 20 to the electronic control device 24, and sends the current FW data to the electronic control device 24. Restore data.

管理データ記憶部34は、それぞれの電子制御装置24に記憶されている現FWデータに関する管理データを記憶する。共有鍵記憶部36は、現FWデータおよび新FWデータが正当であるかを検証するための共有鍵データを含む鍵情報を記憶する。共有鍵データは、ファームウェアの開発者との間で共有され、第三者には秘匿される。一時記憶部38は、取得部30が受信した現FWデータおよび新FWデータ等を含む取得情報を記憶する。状態記憶部40は、電子制御装置24の状態を示す状態情報を記憶する。   The management data storage unit 34 stores management data related to current FW data stored in each electronic control unit 24. The shared key storage unit 36 stores key information including shared key data for verifying whether the current FW data and the new FW data are valid. The shared key data is shared with the firmware developer and kept secret from a third party. The temporary storage unit 38 stores acquisition information including the current FW data and new FW data received by the acquisition unit 30. The state storage unit 40 stores state information indicating the state of the electronic control device 24.

図3は、管理データ記憶部34に記憶される管理データの内容を示す図である。管理データ記憶部34は、制御対象システム22が備えるそれぞれの電子制御装置24に記憶されたそれぞれのファームウェアについて、図3に示す管理データを記憶する。   FIG. 3 is a diagram showing the contents of the management data stored in the management data storage unit 34. The management data storage unit 34 stores management data shown in FIG. 3 for each firmware stored in each electronic control unit 24 included in the control target system 22.

管理データは、ECUID、FWID、現FWのMAC(Message Authentication Code)値、現FWのバージョン番号、ECUのドメイン、現FWの開発者ID、更新タイミング情報、および、FW取得状況情報を含む。   The management data includes an ECU ID, a FWID, a MAC (Message Authentication Code) value of the current FW, a version number of the current FW, a domain of the ECU, a developer ID of the current FW, update timing information, and FW acquisition status information.

ECUIDは、そのファームウェアを記憶している電子制御装置24の識別子である。FWIDは、そのファームウェアの識別子である。現FWのMAC値は、電子制御装置24に書き込まれている現FWデータのMAC値である。   The ECU ID is an identifier of the electronic control device 24 that stores the firmware. The FWID is an identifier of the firmware. The MAC value of the current FW is the MAC value of the current FW data written in the electronic control unit 24.

ここで、MAC値とは、データが改ざんされていないことを検証するためのデータである。MAC値は、対象データと鍵データとを用いて算出および検証がされる。MAC値の生成および検証は、同一の鍵データが用いられる。例えば、送信者と受信者とが同一の鍵データを保持しているとする。この鍵データは、第三者に対して秘匿される。この場合、送信者は、対象データと自身が保持している鍵データとによりMAC値を算出する。そして、送信者は、対象データとMAC値とを受信者に送信する。受信者は、受信した送信データと、自身が保持している鍵データとによりMAC値を算出する。そして、受信者は、算出したMAC値と送信者から受信したMAC値とを比較する。受信者は、一致した場合、受信した対象データが送信者により生成されたものである(すなわち、正当である)と判断することができる。   Here, the MAC value is data for verifying that the data has not been tampered with. The MAC value is calculated and verified using target data and key data. The same key data is used for generating and verifying the MAC value. For example, it is assumed that the sender and the receiver hold the same key data. This key data is kept secret from a third party. In this case, the sender calculates the MAC value from the target data and the key data held by the sender. Then, the sender transmits the target data and the MAC value to the receiver. The receiver calculates the MAC value from the received transmission data and the key data held by the receiver. Then, the receiver compares the calculated MAC value with the MAC value received from the sender. In the case of a match, the receiver can determine that the received target data has been generated by the sender (that is, is valid).

現FWのバージョン番号は、電子制御装置24に書き込まれている現FWデータのバージョンを表す。バージョン番号は、ファームウェアの実体データのバージョンが新しくなる毎に大きくなる数値または文字であってよい。   The version number of the current FW represents the version of the current FW data written in the electronic control unit 24. The version number may be a numerical value or a character that increases each time the version of the firmware entity data is updated.

ECUのドメインは、対象装置が有する機能を表す。例えば、ECUのドメインは、対象装置が、運動系の装置、エネルギー系の装置、ボディー系の装置またはエンターテイメント系の装置の何れであるかを表す。   The ECU domain represents a function of the target device. For example, the ECU domain indicates whether the target device is an exercise device, an energy device, a body device, or an entertainment device.

現FWの開発者IDは、現FWデータの開発者を識別する情報である。共有鍵データは、開発者ID毎に割り当てられる。   The current FW developer ID is information for identifying the developer of the current FW data. The shared key data is assigned for each developer ID.

更新タイミング情報は、そのファームウェアを更新可能なタイミングを示す。例えば、更新タイミング情報は、車両の運転中に更新可能であるか否か、車両がブレーキによる停止中に更新可能であるか否か、車両がアイドリング中に更新可能であるか否か、および、車両のエンジンが停止中に更新可能であるか否か等を示す。   The update timing information indicates the timing at which the firmware can be updated. For example, the update timing information can be updated during driving of the vehicle, whether the vehicle can be updated while braking, whether the vehicle can be updated while idling, and Indicates whether or not the vehicle engine can be updated while the vehicle is stopped.

FW取得状況情報は、中継装置26による新FWデータの取得状況を示す。例えば、FW取得状況情報は、何もしていない状況、提供装置20に問い合わせ中の状況、データを受信中の状況、または、検証中の状況の何れかを示す。   The FW acquisition status information indicates the acquisition status of new FW data by the relay device 26. For example, the FW acquisition status information indicates any of a status of doing nothing, a status of inquiring the providing apparatus 20, a status of receiving data, or a status of verification.

図4は、共有鍵記憶部36に記憶される鍵情報の内容を示す図である。共有鍵記憶部36は、ファームウェアの開発者毎に、図4に示す鍵情報を記憶する。   FIG. 4 is a diagram showing the contents of the key information stored in the shared key storage unit 36. The shared key storage unit 36 stores the key information shown in FIG. 4 for each firmware developer.

鍵情報は、開発者IDと、共有鍵データとを含む。開発者IDは、ファームウェアの開発者を識別する情報である。共有鍵データは、MAC値を算出するために用いられるデータである。   The key information includes a developer ID and shared key data. The developer ID is information for identifying a firmware developer. The shared key data is data used for calculating the MAC value.

なお、開発者IDは、ファームウェアのバージョン毎に異なっていてもよい。例えば、現FWデータの開発者IDと、新FWデータの開発者IDとが異なってもよいし、同一であってもよい。現FWデータの開発者IDと新FWデータの開発者IDとが異なる場合、それぞれに対応する共有鍵データは異なる。   The developer ID may be different for each firmware version. For example, the developer ID of the current FW data and the developer ID of the new FW data may be different or the same. When the developer ID of the current FW data is different from the developer ID of the new FW data, the corresponding shared key data is different.

図5は、一時記憶部38に記憶される取得情報の内容を示す図である。一時記憶部38は、提供装置20から受信した現FWデータおよび新FWデータが正当であると判断される毎に、図5に示す取得情報を記憶する。   FIG. 5 is a diagram illustrating the contents of the acquired information stored in the temporary storage unit 38. The temporary storage unit 38 stores the acquisition information illustrated in FIG. 5 every time it is determined that the current FW data and the new FW data received from the providing device 20 are valid.

取得情報は、ECUID、FWID、現FWデータ、新FWデータ、新FWのMAC値、新FWのバージョン番号、新FWの開発者ID、取得エラー回数および更新エラー回数を含む。   The acquisition information includes ECUID, FWID, current FW data, new FW data, new FW MAC value, new FW version number, new FW developer ID, acquisition error count, and update error count.

ECUIDは、更新対象の電子制御装置24の識別子である。FWIDは、更新対象のファームウェアの識別子である。   The ECU ID is an identifier of the electronic control device 24 to be updated. The FWID is an identifier of the firmware to be updated.

現FWデータおよび新FWデータは、提供装置20から受信したファームウェアの実体データである。なお、現FWデータは、電子制御装置24に現在書き込まれている現FWデータと同一であるべきデータである。   The current FW data and the new FW data are firmware actual data received from the providing device 20. The current FW data is data that should be the same as the current FW data currently written in the electronic control unit 24.

新FWのMAC値は、提供装置20から受信した新FWデータのMAC値である。新FWのMAC値は、例えば、新FWデータの開発者により生成される。新FWのバージョン番号は、新FWデータのバージョンを表す。新FWの開発者IDは、新FWデータの開発者を識別する情報である。   The MAC value of the new FW is the MAC value of the new FW data received from the providing device 20. The MAC value of the new FW is generated, for example, by the developer of the new FW data. The new FW version number represents the version of the new FW data. The new FW developer ID is information for identifying the developer of the new FW data.

取得エラー回数は、提供装置20から受信した現FWデータまたは新FWデータが正当でなかったと判定された回数を表す。更新エラー回数は、電子制御装置24に書き込んだ新FWデータが正当でなかったと判定された回数を表す。   The number of acquisition errors represents the number of times it is determined that the current FW data or new FW data received from the providing device 20 is not valid. The number of update errors represents the number of times when it is determined that the new FW data written in the electronic control unit 24 is not valid.

図6は、状態記憶部40に記憶される状態情報の内容を示す図である。状態記憶部40は、電子制御装置24毎に、図6に示す状態情報を記憶する。   FIG. 6 is a diagram illustrating the contents of the state information stored in the state storage unit 40. The state storage unit 40 stores state information illustrated in FIG. 6 for each electronic control device 24.

状態情報は、ECUID、ECUのドメインおよびECU状態情報を含む。ECUIDは、その電子制御装置24の識別子である。ECUのドメインは、その電子制御装置24が制御する対象装置が有する機能を表す。   The state information includes an ECU ID, an ECU domain, and ECU state information. The ECU ID is an identifier of the electronic control device 24. The domain of the ECU represents a function of the target device controlled by the electronic control device 24.

ECU状態情報は、その電子制御装置24の現在の状態を示す。例えば、ECU状態情報は、通常動作中の状態、更新待ちの状態、更新対象のデータの受信中の状態、書き込み中の状態、検証中の状態、または、データを有効化している状態の何れかを示す。   The ECU state information indicates the current state of the electronic control unit 24. For example, the ECU status information is one of a normal operation status, an update waiting status, a data update target reception status, a data write status, a verification status, or a data validation status. Indicates.

図7は、提供装置20および中継装置26の機能構成を示す図である。提供装置20は、提供情報記憶部50と、要求受信部54と、特定部56と、応答送信部58とを有する。中継装置26の取得部30は、要求送信部52と、応答受信部60と、第1検証値生成部62と、第1検証部64と、状況更新部66とを有する。   FIG. 7 is a diagram illustrating functional configurations of the providing device 20 and the relay device 26. The providing apparatus 20 includes a provision information storage unit 50, a request reception unit 54, a specification unit 56, and a response transmission unit 58. The acquisition unit 30 of the relay device 26 includes a request transmission unit 52, a response reception unit 60, a first verification value generation unit 62, a first verification unit 64, and a status update unit 66.

提供情報記憶部50は、中継装置26に提供すべき情報を記憶する。提供情報記憶部50は、ファームウェア毎に、ECUID、FWID、それぞれのバージョンの実体データ、それぞれのバージョンの実体データのMAC値、それぞれのバージョンのバージョン番号およびそれぞれのバージョンの開発者IDを記憶する。開発者IDは、バージョン毎に共通であってもよい。   The provided information storage unit 50 stores information to be provided to the relay device 26. The provided information storage unit 50 stores, for each firmware, the ECU ID, FWID, the actual data of each version, the MAC value of the actual data of each version, the version number of each version, and the developer ID of each version. The developer ID may be common for each version.

要求送信部52は、制御対象システム22が備えるそれぞれの電子制御装置24に記憶されたそれぞれのファームウェアについて、取得要求を提供装置20に送信する。要求送信部52は、例えば、ファームウェア毎に予め定められたタイミングで(例えば定期的に)、取得要求を送信する。   The request transmission unit 52 transmits an acquisition request to the providing device 20 for each firmware stored in each electronic control device 24 included in the control target system 22. For example, the request transmission unit 52 transmits an acquisition request at a predetermined timing for each firmware (for example, periodically).

要求送信部52は、電子制御装置24を識別するECUID(装置識別子)と、現FWデータを識別するFWID(データ識別子)と、現FWデータのバージョンを特定可能なバージョン特定情報とを含む取得要求を、提供装置20に送信する。要求送信部52は、管理データ記憶部34から、そのファームウェアについての管理データを読み出して、取得要求を生成する。   The request transmitting unit 52 includes an acquisition request including an ECU ID (device identifier) for identifying the electronic control device 24, a FWID (data identifier) for identifying the current FW data, and version specifying information capable of specifying the version of the current FW data. Is transmitted to the providing device 20. The request transmission unit 52 reads management data regarding the firmware from the management data storage unit 34 and generates an acquisition request.

バージョン特定情報は、現FWデータのMAC値(電子制御装置24に記憶されている現FWデータを検証するための検証値)である。バージョン特定情報は、MAC値に代えて、現FWデータのバージョン番号であってもよい。   The version specifying information is a MAC value of the current FW data (a verification value for verifying the current FW data stored in the electronic control unit 24). The version specifying information may be the version number of the current FW data instead of the MAC value.

要求受信部54は、取得要求を中継装置26から受信する。特定部56は、提供情報記憶部50から、取得要求に含まれるECUIDおよびFWIDに対応するファームウェアに関する情報を読み出す。特定部56は、読み出した情報に基づき、バージョン特定情報により特定されるバージョンよりも新しいバージョンの実体データが、開発者から提供されているかを判断する。すなわち、特定部56は、取得要求により特定されるファームウェアについて、電子制御装置24が記憶している現FWデータのバージョンよりも新しいバージョンの実体データ(新FWデータ)が、存在するか否かを判断する。   The request receiving unit 54 receives an acquisition request from the relay device 26. The identification unit 56 reads information related to the firmware corresponding to the ECU ID and the FWID included in the acquisition request from the provision information storage unit 50. Based on the read information, the specifying unit 56 determines whether or not entity data of a version newer than the version specified by the version specifying information is provided by the developer. That is, the specifying unit 56 determines whether or not there is actual data (new FW data) of a version newer than the version of the current FW data stored in the electronic control unit 24 for the firmware specified by the acquisition request. to decide.

応答送信部58は、受信した取得要求に応じた応答情報を、中継装置26に送信する。応答送信部58は、新FWデータが存在しない場合、ECUID、FWIDおよび更新フラグを含む応答情報を送信する。応答送信部58は、新FWデータが存在する場合、ECUID、FWID、更新フラグ、現FWデータ、新FWデータ、新FWのMAC値、新FWのバージョン番号および新FWの開発者IDを含む応答情報を送信する。   The response transmission unit 58 transmits response information corresponding to the received acquisition request to the relay device 26. When there is no new FW data, the response transmission unit 58 transmits response information including the ECU ID, the FWID, and the update flag. When new FW data is present, the response transmission unit 58 includes a response including ECU ID, FWID, update flag, current FW data, new FW data, new FW MAC value, new FW version number, and new FW developer ID. Send information.

応答情報に含まれるECUIDおよびFWIDは、取得要求に含まれるECUIDおよびFWIDと同一である。更新フラグは、バージョン特定情報により特定されるバージョンよりも新しいバージョンのFWデータ(新FWデータ)が存在するか否かを示すフラグである。本実施形態においては、更新フラグは、新FWデータが存在しない場合には0、新FWデータが存在する場合には0以外の値となる。なお、開発者IDがバージョン毎に共通である場合、応答送信部58は、開発者IDを送信しなくてもよい。   The ECU ID and FWID included in the response information are the same as the ECU ID and FWID included in the acquisition request. The update flag is a flag indicating whether or not there is a newer version of FW data (new FW data) than the version specified by the version specifying information. In the present embodiment, the update flag has a value other than 0 when new FW data does not exist and a value other than 0 when new FW data exists. When the developer ID is common for each version, the response transmission unit 58 may not transmit the developer ID.

応答受信部60は、取得要求に応じた応答情報を、提供装置20から受信する。新FWデータが存在しない場合、応答受信部60は、ECUID、FWIDおよび更新フラグを含む応答情報を受信する。新FWデータが存在する場合、応答受信部60は、ECUID、FWID、更新フラグ、現FWデータ、新FWデータ、新FWのMAC値、新FWのバージョン番号および新FWの開発者IDを含む応答情報を受信する。   The response receiving unit 60 receives response information corresponding to the acquisition request from the providing device 20. When the new FW data does not exist, the response receiving unit 60 receives response information including the ECU ID, the FWID, and the update flag. When the new FW data exists, the response receiving unit 60 responds including the ECU ID, FWID, update flag, current FW data, new FW data, new FW MAC value, new FW version number, and new FW developer ID. Receive information.

第1検証値生成部62は、提供装置20から受信した現FWデータについて、MAC値(第2検証値)を算出する。具体的には、第1検証値生成部62は、現FWの開発者IDに対応する共有鍵データを共有鍵記憶部36から読み出す。第1検証値生成部62は、読み出した共有鍵データと、提供装置20から受信した現FWデータとによりMAC値を算出する。   The first verification value generation unit 62 calculates a MAC value (second verification value) for the current FW data received from the providing device 20. Specifically, the first verification value generation unit 62 reads the shared key data corresponding to the developer ID of the current FW from the shared key storage unit 36. The first verification value generation unit 62 calculates a MAC value from the read shared key data and the current FW data received from the providing device 20.

さらに、第1検証値生成部62は、提供装置20から受信した新FWデータについて、MAC値(第4検証値)を算出する。具体的には、第1検証値生成部62は、新FWの開発者IDに対応する共有鍵データを共有鍵記憶部36から読み出す。第1検証値生成部62は、読み出した共有鍵データと、提供装置20から受信した新FWデータとによりMAC値を算出する。   Further, the first verification value generation unit 62 calculates a MAC value (fourth verification value) for the new FW data received from the providing device 20. Specifically, the first verification value generation unit 62 reads the shared key data corresponding to the developer ID of the new FW from the shared key storage unit 36. The first verification value generation unit 62 calculates a MAC value from the read shared key data and the new FW data received from the providing device 20.

第1検証部64は、提供装置20から受信した現FWデータが正当であるか否かを判断する。具体的には、第1検証部64は、電子制御装置24に記憶されている現FWデータを検証するための第1検証値と、提供装置20から受信した現FWデータを検証するための第2検証値とが一致する場合に、提供装置20から受信した現FWデータが正当であると判断する。   The first verification unit 64 determines whether the current FW data received from the providing apparatus 20 is valid. Specifically, the first verification unit 64 is configured to verify the first verification value for verifying the current FW data stored in the electronic control device 24 and the first FW data received from the providing device 20. If the two verification values match, it is determined that the current FW data received from the providing device 20 is valid.

ここで、第1検証値は、管理データ記憶部34に記憶されている現FWのMAC値である。第2検証値は、第1検証値生成部62により算出された現FWデータのMAC値である。すなわち、第1検証部64は、提供装置20から受信した現FWデータが、電子制御装置24に記憶されている現FWデータと同一であるか否かを検証する。   Here, the first verification value is the MAC value of the current FW stored in the management data storage unit 34. The second verification value is the MAC value of the current FW data calculated by the first verification value generation unit 62. That is, the first verification unit 64 verifies whether or not the current FW data received from the providing device 20 is the same as the current FW data stored in the electronic control device 24.

さらに、第1検証部64は、提供装置20から受信した新FWデータが正当であるか否かを判断する。具体的には、第1検証部64は、提供装置20から受信した第3検証値と、共有鍵データと提供装置20から受信した新FWデータとにより算出された第4検証値とが一致する場合に、提供装置20から受信した新FWデータが正当であると判断する。   Further, the first verification unit 64 determines whether the new FW data received from the providing device 20 is valid. Specifically, the first verification unit 64 matches the third verification value received from the providing device 20 with the fourth verification value calculated from the shared key data and the new FW data received from the providing device 20. In this case, it is determined that the new FW data received from the providing device 20 is valid.

ここで、第3検証値は、取得要求に応じて、提供装置20から受信した新FWデータのMAC値(新FWのMAC値)である。第4検証値は、第1検証値生成部62により算出された新FWデータのMAC値である。すなわち、第1検証部64は、提供装置20から受信した新FWデータの開発者が、中継装置26と同一の共有鍵データを保持しているか否かを検証する。   Here, the third verification value is the MAC value of the new FW data (MAC value of the new FW) received from the providing apparatus 20 in response to the acquisition request. The fourth verification value is the MAC value of the new FW data calculated by the first verification value generation unit 62. That is, the first verification unit 64 verifies whether the developer of the new FW data received from the providing device 20 holds the same shared key data as that of the relay device 26.

第1検証部64は、提供装置20から受信した現FWデータまたは新FWデータの何れかが正当でない場合、要求送信部52に対して、再度、取得要求を送信させる。第1検証部64は、一定回数、同一の取得要求を送信しても現FWデータおよび新FWデータの何れかが正当ではない場合、取得要求の送信を中止させる。   If either the current FW data or the new FW data received from the providing device 20 is not valid, the first verification unit 64 causes the request transmission unit 52 to transmit an acquisition request again. The first verification unit 64 stops transmission of the acquisition request if any of the current FW data and the new FW data is not valid even if the same acquisition request is transmitted a certain number of times.

第1検証部64は、提供装置20から受信した現FWデータおよび新FWデータが正当であることを条件として、応答受信部60が受信した情報を一時記憶部38に記憶させる。具体的には、第1検証部64は、提供装置20から受信した、ECUID、FWID、現FWデータ、新FWデータ、新FWのMAC値、新FWのバージョン番号および新FWの開発者IDを、一時記憶部38に記憶させる。なお、バージョン毎に開発者IDが共通である場合、第1検証部64は、一時記憶部38に新FWの開発者IDを記憶させなくてもよい。また、第1検証部64は、現FWデータおよび新FWデータの何れかが正当ではないと判断された回数(エラー回数)も、一時記憶部38に記憶させてもよい。   The first verification unit 64 stores the information received by the response reception unit 60 in the temporary storage unit 38 on condition that the current FW data and new FW data received from the providing device 20 are valid. Specifically, the first verification unit 64 receives the ECU ID, FWID, current FW data, new FW data, new FW MAC value, new FW version number, and new FW developer ID received from the providing device 20. And stored in the temporary storage unit 38. When the developer ID is common for each version, the first verification unit 64 may not store the developer ID of the new FW in the temporary storage unit 38. The first verification unit 64 may also store in the temporary storage unit 38 the number of times that either the current FW data or the new FW data is determined to be invalid (the number of errors).

状況更新部66は、それぞれのファームウェアについて、FW取得状況情報を管理データ記憶部34に書き込む。   The status update unit 66 writes the FW acquisition status information in the management data storage unit 34 for each firmware.

以上の構成により、中継装置26は、提供装置20から現FWデータおよび新FWデータを受信することができる。さらに、中継装置26は、受信した現FWデータおよび新FWデータが正当であるか否かを判断することができる。そして、中継装置26は、受信した現FWデータおよび新FWデータが正当であることを条件として、一時記憶部38に現FWデータおよび新FWデータを記憶させることができる。   With the above configuration, the relay device 26 can receive the current FW data and the new FW data from the providing device 20. Further, the relay device 26 can determine whether the received current FW data and new FW data are valid. Then, the relay device 26 can store the current FW data and the new FW data in the temporary storage unit 38 on condition that the received current FW data and new FW data are valid.

図8は、中継装置26による取得処理フローを示す図である。取得部30は、図8に示す取得処理を実行する。   FIG. 8 is a diagram illustrating an acquisition processing flow by the relay device 26. The acquisition unit 30 executes the acquisition process illustrated in FIG.

まず、ステップS11において、取得部30は、何れかのファームウェアについて、予め定められたタイミングにおいて取得要求を提供装置20に送信する。この場合において、取得部30は、ECUIDと、FWIDと、バージョン特定情報(現FWのMAC値または現FWのバージョン番号)とを含む取得要求を、提供装置20に送信する。   First, in step S <b> 11, the acquisition unit 30 transmits an acquisition request to the providing apparatus 20 at a predetermined timing for any firmware. In this case, the acquisition unit 30 transmits an acquisition request including the ECU ID, the FWID, and the version specifying information (the MAC value of the current FW or the version number of the current FW) to the providing device 20.

提供装置20は、取得要求に応じて、対応するファームウェアについての応答情報を中継装置26に送信する。具体的には、提供装置20は、対応する新FWデータが存在しない場合、ECUID、FWID、および、値が0とされた更新フラグを含む応答情報を送信する。提供装置20は、新FWデータが存在する場合、ECUID、FWID、値が0以外とされた更新フラグ、現FWデータ、新FWデータ、新FWのMAC値、新FWのバージョン番号および新FWの開発者IDを含む応答情報を送信する。   The providing device 20 transmits response information about the corresponding firmware to the relay device 26 in response to the acquisition request. Specifically, when there is no corresponding new FW data, providing device 20 transmits response information including an ECU ID, an FWID, and an update flag whose value is 0. When the new FW data exists, the providing device 20 updates the ECU ID, the FWID, the update flag whose value is not 0, the current FW data, the new FW data, the new FW MAC value, the new FW version number, and the new FW Response information including the developer ID is transmitted.

続いて、ステップS12において、取得部30は、応答情報を受信する。続いて、ステップS13において、取得部30は、応答情報に含まれる更新フラグが、0以外の値であるか否かを判断する。更新フラグが0である場合(S13のNo)、取得部30は、本フローを終了する。更新フラグが0以外の値である場合(S13のYes)、処理をステップS14に進める。   Subsequently, in step S12, the acquisition unit 30 receives the response information. Subsequently, in step S <b> 13, the acquisition unit 30 determines whether or not the update flag included in the response information is a value other than 0. When the update flag is 0 (No in S13), the acquisition unit 30 ends this flow. If the update flag is a value other than 0 (Yes in S13), the process proceeds to step S14.

ステップS14において、取得部30は、受信した現FWデータが正当であるか否かを判断する。ステップS14の処理については、図9のフローにおいてさらに詳細に説明する。取得部30は、正当である場合(S14のYes)、処理をステップS15に進め、正当でない場合(S14のNo)、処理をステップS17に進める。   In step S14, the acquisition unit 30 determines whether the received current FW data is valid. The process of step S14 will be described in more detail with reference to the flow of FIG. If the acquisition unit 30 is valid (Yes in S14), the process proceeds to step S15. If the acquisition unit 30 is not valid (No in S14), the process proceeds to step S17.

ステップS15において、取得部30は、受信した新FWデータが正当であるか否かを判断する。ステップS15の処理については、図10のフローにおいてさらに詳細に説明する。取得部30は、正当である場合(S15のYes)、処理をステップS16に進め、正当でない場合(S15のNo)、処理をステップS17に進める。   In step S15, the acquisition unit 30 determines whether or not the received new FW data is valid. The process of step S15 will be described in more detail with reference to the flow of FIG. If the acquisition unit 30 is valid (Yes in S15), the process proceeds to step S16. If the acquisition unit 30 is not valid (No in S15), the process proceeds to step S17.

ステップS16において、取得部30は、提供装置20から受信したECUID、FWID、現FWデータ、新FWデータ、新FWのMAC値、新FWのバージョン番号および新FWの開発者IDを、一時記憶部38に書き込む。ステップS16を終えると、取得部30は、本フローを終了する。この場合、取得部30は、正当な現FWデータまたは新FWデータを受信できている。   In step S16, the acquisition unit 30 temporarily stores the ECU ID, FWID, current FW data, new FW data, new FW MAC value, new FW version number, and new FW developer ID received from the providing device 20. Write to 38. When step S16 ends, the acquisition unit 30 ends this flow. In this case, the acquisition unit 30 can receive valid current FW data or new FW data.

ステップS17において、取得部30は、同一の取得要求を送信しても現FWデータおよび新FWデータの何れかが正当ではなかった回数(エラー回数)が、一定回数以上であるか否かを判断する。エラー回数が一定回数未満である場合(S17のNo)、取得部30は、処理をステップS11に戻す。これにより、取得部30は、通信エラー等により正当なデータが受信できなかった場合であっても、次の機会において正当なデータを受信させることができる。   In step S <b> 17, the acquisition unit 30 determines whether the number of times that either the current FW data or the new FW data is not valid (the number of errors) is equal to or greater than a certain number even if the same acquisition request is transmitted. To do. When the number of errors is less than the predetermined number (No in S17), the acquisition unit 30 returns the process to Step S11. As a result, even when the acquisition unit 30 cannot receive valid data due to a communication error or the like, the acquisition unit 30 can receive the valid data at the next opportunity.

エラー回数が一定回数以上である場合(S17のYes)、取得部30は、本フローを終了する。   When the number of errors is equal to or greater than the predetermined number (Yes in S17), the acquisition unit 30 ends this flow.

図9は、提供装置20から受信した現FWデータの正当性を判断するフローを示す図である。取得部30は、ステップS14において、図9に示す処理を実行する。   FIG. 9 is a diagram illustrating a flow for determining the validity of the current FW data received from the providing device 20. In step S14, the acquisition unit 30 executes the process illustrated in FIG.

まず、取得部30は、管理データ記憶部34に記憶されている現FWのMAC値(第1検証値)を読み出す(S21)。続いて、取得部30は、現FWの開発者IDを管理データ記憶部34から読み出す(S22)。続いて、取得部30は、現FWの開発者IDに対応する共有鍵データを共有鍵記憶部36から読み出す(S23)。続いて、取得部30は、提供装置20から受信した現FWデータを取得する(S24)。続いて、取得部30は、読み出した共有鍵データと、提供装置20から受信した現FWデータとによりMAC値(第2検証値)を算出する(S25)。   First, the acquisition unit 30 reads the MAC value (first verification value) of the current FW stored in the management data storage unit 34 (S21). Subsequently, the acquisition unit 30 reads the developer ID of the current FW from the management data storage unit 34 (S22). Subsequently, the acquisition unit 30 reads the shared key data corresponding to the developer ID of the current FW from the shared key storage unit 36 (S23). Subsequently, the acquiring unit 30 acquires the current FW data received from the providing device 20 (S24). Subsequently, the acquisition unit 30 calculates a MAC value (second verification value) from the read shared key data and the current FW data received from the providing device 20 (S25).

続いて、取得部30は、第1検証値と第2検証値とが一致するか否かを判断する(S26)。取得部30は、第1検証値と第2検証値とが一致する場合(S26のYes)、提供装置20から受信した現FWデータが正当である(S27)として、処理を終了する。取得部30は、第1検証値と第2検証値とが一致しない場合(S26のNo)、提供装置20から受信した現FWデータが正当ではない(S28)として、処理を終了する。   Subsequently, the acquiring unit 30 determines whether or not the first verification value and the second verification value match (S26). If the first verification value and the second verification value match (Yes in S26), the acquisition unit 30 determines that the current FW data received from the providing device 20 is valid (S27) and ends the process. If the first verification value and the second verification value do not match (No in S26), the acquisition unit 30 determines that the current FW data received from the providing device 20 is not valid (S28) and ends the process.

図10は、提供装置20から受信した新FWデータの正当性を判断するフローを示す図である。取得部30は、ステップS15において、図10に示す処理を実行する。   FIG. 10 is a diagram illustrating a flow for determining the validity of the new FW data received from the providing apparatus 20. In step S15, the acquisition unit 30 executes the process illustrated in FIG.

まず、取得部30は、提供装置20から受信した、新FWのMAC値(第3検証値)を取得する(S31)。続いて、取得部30は、提供装置20から受信した新FWの開発者IDを取得する(S32)。続いて、取得部30は、新FWの開発者IDに対応する共有鍵データを共有鍵記憶部36から読み出す(S33)。続いて、取得部30は、提供装置20から受信した新FWデータを取得する(S34)。続いて、取得部30は、読み出した共有鍵データと、提供装置20から受信した新FWデータとによりMAC値(第4検証値)を算出する(S35)。   First, the acquisition unit 30 acquires the MAC value (third verification value) of the new FW received from the providing device 20 (S31). Subsequently, the acquisition unit 30 acquires the developer ID of the new FW received from the providing device 20 (S32). Subsequently, the acquisition unit 30 reads the shared key data corresponding to the developer ID of the new FW from the shared key storage unit 36 (S33). Subsequently, the acquisition unit 30 acquires new FW data received from the providing device 20 (S34). Subsequently, the acquisition unit 30 calculates a MAC value (fourth verification value) from the read shared key data and the new FW data received from the providing device 20 (S35).

続いて、取得部30は、第3検証値と第4検証値とが一致するか否かを判断する(S36)。取得部30は、第3検証値と第4検証値とが一致する場合(S36のYes)、提供装置20から受信した新FWデータが正当である(S37)として、処理を終了する。取得部30は、第3検証値と第4検証値とが一致しない場合(S36のNo)、提供装置20から受信した新FWデータが正当ではない(S38)として、処理を終了する。   Subsequently, the acquisition unit 30 determines whether or not the third verification value and the fourth verification value match (S36). If the third verification value matches the fourth verification value (Yes in S36), the acquisition unit 30 determines that the new FW data received from the providing device 20 is valid (S37) and ends the process. If the third verification value does not match the fourth verification value (No in S36), the acquisition unit 30 determines that the new FW data received from the providing device 20 is not valid (S38) and ends the process.

図11は、中継装置26および電子制御装置24の機能構成を示す図である。電子制御装置24は、データ記憶部70と、制御部72と、状態送信部74と、開始受信部82と、データ受信部86と、書込部88と、第1鍵記憶部90と、第2検証値生成部92と、検証値送信部94と、終了受信部104とを有する。中継装置26の更新部32は、状態受信部76と、開始検知部78と、開始送信部80と、データ送信部84と、検証値受信部96と、第2検証部98と、確定部100と、通知部102とを有する。   FIG. 11 is a diagram illustrating functional configurations of the relay device 26 and the electronic control device 24. The electronic control unit 24 includes a data storage unit 70, a control unit 72, a status transmission unit 74, a start reception unit 82, a data reception unit 86, a writing unit 88, a first key storage unit 90, 2 includes a verification value generation unit 92, a verification value transmission unit 94, and an end reception unit 104. The update unit 32 of the relay device 26 includes a state reception unit 76, a start detection unit 78, a start transmission unit 80, a data transmission unit 84, a verification value reception unit 96, a second verification unit 98, and a determination unit 100. And a notification unit 102.

データ記憶部70は、ファームウェアの実体データ(現FWデータ)を記憶する。制御部72は、データ記憶部70に記憶された現FWデータに基づき対象装置を制御する。   The data storage unit 70 stores firmware entity data (current FW data). The control unit 72 controls the target device based on the current FW data stored in the data storage unit 70.

状態送信部74は、電子制御装置24の状態を検知する。例えば、状態送信部74は、通常動作中の状態、更新待ちの状態、更新対象のデータの受信中の状態、書き込み中の状態、検証中の状態、または、データを有効化している状態の何れかを検知する。状態送信部74は、検知した状態を示すECU状態情報を中継装置26に送信する。   The state transmission unit 74 detects the state of the electronic control device 24. For example, the state transmission unit 74 may be any of a normal operation state, an update waiting state, a reception target data reception state, a writing state, a verification state, or a data validation state. Is detected. The state transmission unit 74 transmits ECU state information indicating the detected state to the relay device 26.

状態受信部76は、電子制御装置24からECU状態情報を受信する。状態受信部76は、受信したECU状態情報を状態記憶部40に記憶させる。   The state receiving unit 76 receives ECU state information from the electronic control unit 24. The state receiving unit 76 causes the state storage unit 40 to store the received ECU state information.

開始検知部78は、提供装置20から正当な新FWデータおよび現FWデータの検証が完了し、未だ新FWデータを電子制御装置24に書き込んでいないファームウェアについて、更新可能か否かを判断する。例えば、開始検知部78は、制御対象システム22の状態が管理データ記憶部34に記憶された更新タイミング情報と一致、且つ、ECU状態情報が通常動作中を示している場合、更新可能と判断する。開始検知部78は、更新可能である場合、開始送信部80およびデータ送信部84に開始指示を与える。   The start detection unit 78 determines whether it is possible to update the firmware for which valid new FW data and current FW data have been verified from the providing device 20 and the new FW data has not yet been written to the electronic control device 24. For example, the start detection unit 78 determines that the control target system 22 is updatable when the state of the control target system 22 matches the update timing information stored in the management data storage unit 34 and the ECU state information indicates normal operation. . The start detection unit 78 gives a start instruction to the start transmission unit 80 and the data transmission unit 84 when the update is possible.

開始送信部80は、開始指示を受け取ると、更新対象の電子制御装置24に更新開始を示す情報を送信する。これにより、更新対象の電子制御装置24は、データの受信の準備等をすることができる。また、開始送信部80は、他の電子制御装置24に、更新対象の電子制御装置24がファームウェアの更新を開始する旨を示す情報を送信する。これにより、他の電子制御装置24は、更新期間中に動作の不具合が生じないように、動作の制限をしたり、ユーザに警告したりすることができる。   When the start transmission unit 80 receives the start instruction, the start transmission unit 80 transmits information indicating the start of update to the electronic control device 24 to be updated. As a result, the electronic control device 24 to be updated can prepare for receiving data. In addition, the start transmission unit 80 transmits information indicating that the electronic control device 24 to be updated starts firmware update to the other electronic control device 24. Thus, the other electronic control unit 24 can limit the operation or warn the user so that no malfunction occurs during the update period.

開始受信部82は、中継装置26から更新開始を示す情報を受信する。開始受信部82は、更新開始を示す情報を受信した場合、制御部72による動作を制限させる。これにより、開始受信部82は、更新期間中に、対象装置に動作の不具合が生じないように制御することができる。   The start receiving unit 82 receives information indicating update start from the relay device 26. The start receiving unit 82 restricts the operation of the control unit 72 when receiving information indicating update start. Thereby, the start receiving part 82 can control so that the malfunction of an operation | movement does not arise in an object apparatus during an update period.

データ送信部84は、開始検知部78から開始指示を受け取ると、提供装置20から受信した新FWデータを電子制御装置24に送信して、電子制御装置24に記憶されている現FWデータを新FWデータに更新させる。具体的には、データ送信部84は、一時記憶部38に記憶された新FWデータを電子制御装置24に送信するとともに、更新指示を送信する。   When the data transmission unit 84 receives the start instruction from the start detection unit 78, the data transmission unit 84 transmits the new FW data received from the providing device 20 to the electronic control device 24, and updates the current FW data stored in the electronic control device 24. Update to FW data. Specifically, the data transmission unit 84 transmits new FW data stored in the temporary storage unit 38 to the electronic control device 24 and transmits an update instruction.

なお、一時記憶部38には、正当であると判断された新FWデータが記憶される。従って、データ送信部84は、正当であると判断された新FWデータを電子制御装置24へ送信することができる。また、データ送信部84は、開始検知部78から開始指示を受けた場合に新FWデータを送信するので、電子制御装置24による制御の対象装置が予め定められた状態となった場合に、新FWデータを送信することができる。   The temporary storage unit 38 stores new FW data determined to be valid. Therefore, the data transmission unit 84 can transmit the new FW data determined to be valid to the electronic control unit 24. Further, since the data transmission unit 84 transmits new FW data when receiving a start instruction from the start detection unit 78, when the target device to be controlled by the electronic control unit 24 is in a predetermined state, the new data is transmitted. FW data can be transmitted.

データ受信部86は、中継装置26から、新FWデータおよび更新指示を受信する。書込部88は、更新指示を受信した場合、データ記憶部70に記憶されている現FWデータを、中継装置26から受信した新FWデータに更新する。例えば、書込部88は、データ記憶部70における現FWデータが記憶されている領域に新FWデータを上書きしたり、データ記憶部70に記憶されている現FWデータを削除してデータ記憶部70の予め定められた領域に新FWデータを書き込んだりする。   The data receiving unit 86 receives new FW data and an update instruction from the relay device 26. When receiving the update instruction, the writing unit 88 updates the current FW data stored in the data storage unit 70 to the new FW data received from the relay device 26. For example, the writing unit 88 overwrites the area where the current FW data is stored in the data storage unit 70 with the new FW data, or deletes the current FW data stored in the data storage unit 70 to store the data storage unit New FW data is written in a predetermined area of 70.

第1鍵記憶部90は、データ記憶部70に書き込まれたデータを検証するために用いる鍵データを記憶する。本実施形態においては、第1鍵記憶部90は、現FWの開発者IDに対応する共有鍵データおよび新FWの開発者IDに対応する共有鍵データを記憶する。現FWの開発者IDと新FWの開発者IDとが同一であれば、第1鍵記憶部90は、1つの共有鍵データを記憶する。   The first key storage unit 90 stores key data used to verify the data written in the data storage unit 70. In the present embodiment, the first key storage unit 90 stores shared key data corresponding to the developer ID of the current FW and shared key data corresponding to the developer ID of the new FW. If the developer ID of the current FW and the developer ID of the new FW are the same, the first key storage unit 90 stores one shared key data.

なお、第1鍵記憶部90は、中継装置26と提供装置20とが共有する共有鍵データとは異なる鍵データを記憶していてもよい。この場合、第1鍵記憶部90は、この鍵データを中継装置26と共有しており、第三者に対して秘匿している。更新部32は、この鍵データを記憶する記憶部およびこの鍵データからMAC値を生成するための検証値生成部を有する。また、この鍵データは、定期的に更新されてもよいし、中継装置26と電子制御装置24とが秘匿化通信をする毎に新たに生成されてもよい。   The first key storage unit 90 may store key data different from the shared key data shared by the relay device 26 and the providing device 20. In this case, the first key storage unit 90 shares this key data with the relay device 26 and keeps it secret from a third party. The update unit 32 includes a storage unit that stores the key data and a verification value generation unit that generates a MAC value from the key data. Further, this key data may be periodically updated, or may be newly generated every time the relay device 26 and the electronic control device 24 carry out concealment communication.

第2検証値生成部92は、更新処理においてデータ記憶部70に書き込まれた新FWデータを検証するためのMAC値(第5検証値)を算出する。具体的には、第2検証値生成部92は、新FWの開発者IDに対応する共有鍵データを第1鍵記憶部90から読み出す。そして、第2検証値生成部92は、読み出した共有鍵データと、更新処理においてデータ記憶部70に書き込まれた新FWデータとによりMAC値を算出する。   The second verification value generation unit 92 calculates a MAC value (fifth verification value) for verifying the new FW data written in the data storage unit 70 in the update process. Specifically, the second verification value generation unit 92 reads the shared key data corresponding to the developer ID of the new FW from the first key storage unit 90. Then, the second verification value generation unit 92 calculates the MAC value from the read shared key data and the new FW data written in the data storage unit 70 in the update process.

検証値送信部94は、更新処理においてデータ記憶部70に書き込まれた新FWデータを検証するためのMAC値を中継装置26に送信する。検証値受信部96は、電子制御装置24から、更新処理においてデータ記憶部70に書き込まれた新FWデータを検証するためのMAC値を受信する。   The verification value transmission unit 94 transmits the MAC value for verifying the new FW data written in the data storage unit 70 in the update process to the relay device 26. The verification value receiving unit 96 receives a MAC value for verifying the new FW data written in the data storage unit 70 in the update process from the electronic control unit 24.

第2検証部98は、更新処理において電子制御装置24に書き込まれた新FWデータが正当であるか否かを検証する。具体的には、第2検証部98は、更新処理において電子制御装置24に書き込まれた新FWデータを検証するための第5検証値と、電子制御装置24へと送信した新FWデータを検証するための第6検証値とが一致しない場合に、更新処理により電子制御装置24に書き込まれた新FWデータが正当ではないと判断する。   The second verification unit 98 verifies whether the new FW data written in the electronic control device 24 in the update process is valid. Specifically, the second verification unit 98 verifies the fifth verification value for verifying the new FW data written in the electronic control unit 24 in the update process and the new FW data transmitted to the electronic control unit 24. In the case where the sixth verification value for doing so does not match, it is determined that the new FW data written in the electronic control unit 24 by the update process is not valid.

ここで、第5検証値は、第2検証値生成部92により算出された、データ記憶部70に書き込まれた新FWデータに対するMAC値である。また、第6検証値は、提供装置20から受信した新FWデータのMAC値である。すなわち、第2検証部98は、提供装置20から受信した新FWデータが、改竄されずに電子制御装置24に書き込まれたか否かを検証する。   Here, the fifth verification value is a MAC value calculated by the second verification value generation unit 92 for the new FW data written in the data storage unit 70. The sixth verification value is a MAC value of new FW data received from the providing device 20. That is, the second verification unit 98 verifies whether the new FW data received from the providing device 20 has been written in the electronic control device 24 without being tampered.

第2検証部98は、更新処理において電子制御装置24に書き込まれた新FWデータが正当であると判断した場合、確定部100および通知部102に通知する。   When the second verification unit 98 determines that the new FW data written in the electronic control unit 24 is valid in the update process, the second verification unit 98 notifies the determination unit 100 and the notification unit 102.

確定部100は、更新処理において電子制御装置24に書き込まれた新FWデータが正当である旨の通知を受けた場合、一時記憶部38に記憶されている情報を読み出して、管理データ記憶部34に記憶させる。具体的には、確定部100は、新FWのMAC値、新FWのバージョン番号および新FWの開発者IDを一時記憶部38から読み出し、同一のファームウェアについての管理データに含まれる、現FWのMAC値、現FWのバージョン番号および現FWの開発者IDとして、管理データ記憶部34に書き込む。これにより、中継装置26は、管理データ記憶部34に記憶される管理データを更新することができる。なお、確定部100は、管理データ記憶部34に必要な情報を記憶させた後、一時記憶部38に記憶されている情報を削除してもよい。   When receiving the notification that the new FW data written in the electronic control unit 24 is valid in the update process, the determination unit 100 reads the information stored in the temporary storage unit 38 and the management data storage unit 34. Remember me. Specifically, the determining unit 100 reads the MAC value of the new FW, the version number of the new FW, and the developer ID of the new FW from the temporary storage unit 38, and includes the current FW included in the management data for the same firmware. The MAC value, the version number of the current FW, and the developer ID of the current FW are written in the management data storage unit 34. Thereby, the relay apparatus 26 can update the management data stored in the management data storage unit 34. The determination unit 100 may delete the information stored in the temporary storage unit 38 after storing the necessary information in the management data storage unit 34.

通知部102は、第2検証部98から新FWデータが正当である旨の通知を受けた場合、他の電子制御装置24および更新対象の電子制御装置24に、ファームウェアの更新を完了したことを示す情報を送信する。これにより、他の電子制御装置24は、動作の制限を解除したり、ユーザに対する警告を解除したりすることができる。   When the notification unit 102 receives a notification from the second verification unit 98 that the new FW data is valid, it notifies the other electronic control unit 24 and the update target electronic control unit 24 that the firmware has been updated. Send information to indicate. As a result, the other electronic control unit 24 can cancel the restriction of the operation or cancel the warning for the user.

終了受信部104は、中継装置26から、ファームウェアの更新を完了したことを示す情報を受信する。終了受信部104は、更新を完了したことを示す情報を受信した場合、制御部72による動作の制限を解除させる。これにより、制御部72は、新FWデータに基づき対象装置を制御することができる。   The end reception unit 104 receives information indicating that the firmware update has been completed from the relay device 26. When the end reception unit 104 receives information indicating that the update has been completed, the end reception unit 104 releases the restriction on the operation by the control unit 72. Thereby, the control part 72 can control an object apparatus based on new FW data.

一方、第2検証部98は、更新処理において電子制御装置24に書き込まれた新FWデータが正当ではないと判断した場合、更新処理が失敗したことを、データ送信部84に通知する。   On the other hand, when the second verification unit 98 determines that the new FW data written in the electronic control unit 24 is not valid in the update process, the second verification unit 98 notifies the data transmission unit 84 that the update process has failed.

データ送信部84は、更新処理が失敗した場合、提供装置20から受信した現FWデータを電子制御装置24に送信して、電子制御装置24に現FWデータを復元させる。具体的には、データ送信部84は、一時記憶部38に記憶された現FWデータを電子制御装置24に送信するとともに、復元指示を送信する。なお、一時記憶部38には、正当であると判断された現FWデータが記憶される。従って、データ送信部84は、正当であると判断された現FWデータを電子制御装置24へ送信することができる。   When the update process fails, the data transmission unit 84 transmits the current FW data received from the providing device 20 to the electronic control device 24, and causes the electronic control device 24 to restore the current FW data. Specifically, the data transmission unit 84 transmits the current FW data stored in the temporary storage unit 38 to the electronic control device 24 and transmits a restoration instruction. The temporary storage unit 38 stores current FW data determined to be valid. Therefore, the data transmission unit 84 can transmit the current FW data determined to be valid to the electronic control unit 24.

データ受信部86は、中継装置26から、現FWデータおよび復元指示を受信する。書込部88は、復元指示を受信した場合、データ記憶部70に記憶されていた現FWデータを復元する。例えば、書込部88は、データ記憶部70における現FWデータが元々記憶されていた領域に、受信した現FWデータを上書きする。また、書込部88は、更新処理において書き込まれた新FWデータを削除してから、現FWデータを書き込んでもよい。   The data receiving unit 86 receives the current FW data and the restoration instruction from the relay device 26. When receiving the restoration instruction, the writing unit 88 restores the current FW data stored in the data storage unit 70. For example, the writing unit 88 overwrites the received current FW data in the area where the current FW data was originally stored in the data storage unit 70. The writing unit 88 may write the current FW data after deleting the new FW data written in the update process.

第2検証値生成部92は、復元処理においてデータ記憶部70に書き込まれた現FWデータを検証するためのMAC値(第7検証値)を算出する。具体的には、第2検証値生成部92は、第1鍵記憶部90に記憶された現FWの開発者IDに対応する共有鍵データを第1鍵記憶部90から読み出す。そして、第2検証値生成部92は、読み出した共有鍵データと、復元処理においてデータ記憶部70に書き込まれた現FWデータとによりMAC値を算出する。   The second verification value generation unit 92 calculates a MAC value (seventh verification value) for verifying the current FW data written in the data storage unit 70 in the restoration process. Specifically, the second verification value generation unit 92 reads the shared key data corresponding to the developer ID of the current FW stored in the first key storage unit 90 from the first key storage unit 90. Then, the second verification value generation unit 92 calculates a MAC value from the read shared key data and the current FW data written in the data storage unit 70 in the restoration process.

検証値送信部94は、復元処理においてデータ記憶部70に書き込まれた現FWデータを検証するためのMAC値を中継装置26に送信する。検証値受信部96は、電子制御装置24から、復元処理においてデータ記憶部70に書き込まれた現FWデータを検証するためのMAC値を受信する。   The verification value transmission unit 94 transmits the MAC value for verifying the current FW data written in the data storage unit 70 in the restoration process to the relay device 26. The verification value receiving unit 96 receives a MAC value for verifying the current FW data written in the data storage unit 70 in the restoration process from the electronic control unit 24.

第2検証部98は、復元処理において電子制御装置24に書き込まれた現FWデータが正当であるか否かを検証する。具体的には、第2検証部98は、復元処理において電子制御装置24に書き込まれた現FWデータを検証するための第7検証値と、電子制御装置24へと送信した現FWデータを検証するための第8検証値とが一致しない場合に、復元処理により電子制御装置24に書き込まれた現FWデータが正当ではないと判断する。   The second verification unit 98 verifies whether the current FW data written in the electronic control unit 24 in the restoration process is valid. Specifically, the second verification unit 98 verifies the seventh verification value for verifying the current FW data written in the electronic control unit 24 in the restoration process, and the current FW data transmitted to the electronic control unit 24. In the case where the eighth verification value for matching does not match, it is determined that the current FW data written in the electronic control unit 24 by the restoration process is not valid.

ここで、第7検証値は、第2検証値生成部92により算出された、データ記憶部70に書き込まれた現FWデータに対するMAC値である。また、第8検証値は、管理データ記憶部34に記憶されている現FWデータのMAC値である。すなわち、第2検証部98は、管理データ記憶部34に元々記憶されていた現FWデータと同一のデータが、電子制御装置24に書き込まれたか否かを検証する。   Here, the seventh verification value is a MAC value for the current FW data written in the data storage unit 70 calculated by the second verification value generation unit 92. The eighth verification value is the MAC value of the current FW data stored in the management data storage unit 34. In other words, the second verification unit 98 verifies whether the same data as the current FW data originally stored in the management data storage unit 34 has been written in the electronic control unit 24.

第2検証部98は、復元処理において電子制御装置24に書き込まれた現FWデータが正当であると判断した場合、通知部102に通知する。通知部102は、第2検証部98から現FWデータが正当である旨の通知を受けた場合、他の電子制御装置24および更新対象の電子制御装置24に、処理が完了したことを示す情報を送信する。これにより、他の電子制御装置24は、動作の制限を解除したり、ユーザに対する警告を解除したりすることができる。   The second verification unit 98 notifies the notification unit 102 when it is determined that the current FW data written in the electronic control unit 24 is valid in the restoration process. When the notification unit 102 receives a notification from the second verification unit 98 that the current FW data is valid, the notification unit 102 notifies the other electronic control device 24 and the update target electronic control device 24 that the processing has been completed. Send. As a result, the other electronic control unit 24 can cancel the restriction of the operation or cancel the warning for the user.

終了受信部104は、中継装置26から処理が完了したことを示す情報を受信する。終了受信部104は、処理が完了したことを示す情報を受信した場合、制御部72による動作の制限を解除させる。これにより、制御部72は、現FWデータに基づき対象装置を制御することができる。   The end receiving unit 104 receives information indicating that the processing is completed from the relay device 26. When the end reception unit 104 receives information indicating that the processing is completed, the end reception unit 104 releases the restriction on the operation by the control unit 72. Accordingly, the control unit 72 can control the target device based on the current FW data.

また、第2検証部98は、復元処理において電子制御装置24に書き込まれた現FWデータが正当でないと判断した場合、復元処理が失敗したことをデータ送信部84に通知する。データ送信部84は、復元処理が失敗した場合、再度、提供装置20から受信した現FWデータを電子制御装置24に送信して、電子制御装置24に現FWデータを復元させる。これにより、第2検証部98は、電子制御装置24に繰り返して復元処理を実行させることができる。   If the second verification unit 98 determines that the current FW data written in the electronic control unit 24 is not valid in the restoration process, the second verification unit 98 notifies the data transmission unit 84 that the restoration process has failed. When the restoration process fails, the data transmission unit 84 transmits the current FW data received from the providing device 20 to the electronic control device 24 again, and causes the electronic control device 24 to restore the current FW data. Accordingly, the second verification unit 98 can cause the electronic control device 24 to repeatedly execute the restoration process.

ただし、第2検証部98は、復元処理において電子制御装置24に書き込んだ現FWデータが正当でなかった回数(エラー回数)が一定回数以上となった場合、データ送信部84による現FWデータの再送信を終了させる。また、第2検証部98は、現FWデータが正当ではないと判断された回数(エラー回数)を、一時記憶部38に記憶させてもよい。   However, if the number of times that the current FW data written to the electronic control unit 24 in the restoration process is not valid (the number of errors) becomes equal to or greater than a certain number, the second verification unit 98 End retransmission. Further, the second verification unit 98 may store the number of times that the current FW data is determined to be invalid (number of errors) in the temporary storage unit 38.

そして、第2検証部98は、電子制御装置24に正当なデータが書き込まれていないことを通知部102に通知する。通知部102は、第2検証部98から、正当なデータが書き込まれていないことの通知を受けると、他の電子制御装置24および更新対象の電子制御装置24に、正当なデータが書き込まれていないことを示す情報を送信する。これにより、他の電子制御装置24は、更新対象の電子制御装置24に関連する動作を制限したり、ユーザに対する警告をしたりすることができる。   Then, the second verification unit 98 notifies the notification unit 102 that valid data has not been written in the electronic control unit 24. When the notification unit 102 receives a notification from the second verification unit 98 that valid data has not been written, the valid data has been written to the other electronic control device 24 and the electronic control device 24 to be updated. Send information indicating that there is no. As a result, the other electronic control device 24 can limit operations related to the electronic control device 24 to be updated, and can give a warning to the user.

また、通知部102は、正当なデータが書き込まれていないことを示す通知を受け取ると、更新対象の電子制御装置24に、正当なデータが書き込まれていないことを示す情報を送信する。終了受信部104は、正当なデータが書き込まれていないことを示す情報を受信した場合、制御部72による動作を制限する。これにより、制御部72は、正当でないデータに基づく対象装置の制御を禁止することができる。   When the notification unit 102 receives a notification indicating that valid data is not written, the notification unit 102 transmits information indicating that valid data is not written to the electronic control device 24 to be updated. When the end reception unit 104 receives information indicating that valid data is not written, the end reception unit 104 limits the operation of the control unit 72. Thereby, the control part 72 can prohibit control of the object apparatus based on invalid data.

以上の構成により、中継装置26は、電子制御装置24に記憶された現FWデータを、提供装置20から受信した新FWデータに更新することができる。また、中継装置26は、更新処理において電子制御装置24に書き込まれた新FWデータが正当ではない場合には、提供装置20から受信した現FWデータにより、電子制御装置24に記憶された現FWデータを復元することができる。   With the above configuration, the relay device 26 can update the current FW data stored in the electronic control device 24 to the new FW data received from the providing device 20. Further, when the new FW data written in the electronic control device 24 in the update process is not valid, the relay device 26 uses the current FW data received from the providing device 20 to store the current FW stored in the electronic control device 24. Data can be restored.

図12は、中継装置26による更新処理フローを示す図である。更新部32は、図12に示す更新処理を実行する。   FIG. 12 is a diagram showing an update processing flow by the relay device 26. The update unit 32 executes the update process shown in FIG.

まず、ステップS41において、更新部32は、更新対象のファームウェアについての更新タイミング情報を管理データ記憶部34から読み出す。続いて、ステップS42において、更新部32は、更新対象の電子制御装置24についてのECU状態情報を状態記憶部40から読み出す。   First, in step S <b> 41, the update unit 32 reads update timing information regarding the firmware to be updated from the management data storage unit 34. Subsequently, in step S <b> 42, the update unit 32 reads ECU state information regarding the electronic control device 24 to be updated from the state storage unit 40.

続いて、ステップS43において、更新部32は、更新処理を開始するか否かを判断する。具体的には、更新部32は、制御対象システム22の状態が更新タイミング情報と一致し、且つ、ECU状態情報が通常動作中を示している場合、更新可能と判断する。更新部32は、更新可能ではない場合(S43のNo)、処理をステップS44に進めて一定時間待機した後に、再度、ステップS42から処理を繰り返す。更新部32は、更新可能である場合(S43のYes)、処理をステップS45に進める。   Subsequently, in step S43, the update unit 32 determines whether or not to start the update process. Specifically, the update unit 32 determines that the update is possible when the state of the control target system 22 matches the update timing information and the ECU state information indicates that the normal operation is being performed. If the update unit 32 is not updatable (No in S43), the process proceeds to step S44 and waits for a predetermined time, and then repeats the process from step S42 again. If updating is possible (Yes in S43), the updating unit 32 advances the process to Step S45.

ステップS45において、更新部32は、更新対象の電子制御装置24に更新開始を示す情報を送信する。続いて、ステップS46において、更新部32は、他の電子制御装置24に、更新対象の電子制御装置24におけるファームウェアの更新の開始を示す情報を送信する。   In step S <b> 45, the update unit 32 transmits information indicating update start to the update-target electronic control device 24. Subsequently, in step S <b> 46, the update unit 32 transmits information indicating the start of firmware update in the update target electronic control device 24 to the other electronic control device 24.

続いて、ステップS47において、更新部32は、提供装置20から受信した新FWデータを電子制御装置24に送信して、電子制御装置24に記憶されている現FWデータを新FWデータに更新させる。具体的には、更新部32は、一時記憶部38に記憶されている正当であると判断された新FWデータを、更新指示とともに電子制御装置24に送信する。   Subsequently, in step S47, the updating unit 32 transmits the new FW data received from the providing device 20 to the electronic control device 24, and updates the current FW data stored in the electronic control device 24 to the new FW data. . Specifically, the update unit 32 transmits the new FW data determined to be valid stored in the temporary storage unit 38 to the electronic control device 24 together with the update instruction.

ここで、更新対象の電子制御装置24は、中継装置26から、新FWデータおよび更新指示を受信した場合、記憶している現FWデータを、中継装置26から受信した新FWデータに更新する。続いて、電子制御装置24は、更新処理においてデータ記憶部70に書き込まれた新FWデータを検証するためのMAC値(第5検証値)を算出する。   Here, when receiving the new FW data and the update instruction from the relay device 26, the electronic control device 24 to be updated updates the stored current FW data to the new FW data received from the relay device 26. Subsequently, the electronic control unit 24 calculates a MAC value (fifth verification value) for verifying the new FW data written in the data storage unit 70 in the update process.

続いて、ステップS48において、更新部32は、更新対象の電子制御装置24から、書き込んだ新FWデータを検証するためのMAC値(第5検証値)を受信する。   Subsequently, in step S48, the updating unit 32 receives a MAC value (fifth verification value) for verifying the written new FW data from the electronic control device 24 to be updated.

続いて、ステップS49において、更新部32は、更新処理において電子制御装置24に書き込まれた新FWデータが正当であるか否かを検証する。ステップS49の処理については、図13のフローにおいてさらに詳細に説明する。更新部32は、正当である場合(S49のYes)、処理をステップS50に進め、正当でない場合(S49のNo)、処理をステップS52に進める。   Subsequently, in step S49, the update unit 32 verifies whether or not the new FW data written in the electronic control device 24 in the update process is valid. The process of step S49 will be described in more detail with reference to the flow of FIG. If it is valid (Yes in S49), the updating unit 32 advances the process to Step S50, and if not valid (No in S49), advances the process to Step S52.

ステップS50において、更新部32は、一時記憶部38に記憶されている情報を読み出して、管理データ記憶部34に転送する。具体的には、更新部32は、一時記憶部38から新FWのMAC値、新FWのバージョン番号および新FWの開発者IDを読み出して、現FWのMAC値、現FWのバージョン番号および現FWの開発者IDとして管理データ記憶部34に記憶させる。   In step S <b> 50, the update unit 32 reads information stored in the temporary storage unit 38 and transfers the information to the management data storage unit 34. Specifically, the update unit 32 reads the MAC value of the new FW, the version number of the new FW, and the developer ID of the new FW from the temporary storage unit 38, and the MAC value of the current FW, the version number of the current FW, and the current FW It is stored in the management data storage unit 34 as the FW developer ID.

続いて、ステップS51において、更新部32は、更新対象の電子制御装置24および他の電子制御装置24に、更新対象の電子制御装置24におけるファームウェアの更新の完了を示す終了通知を送信する。そして、更新部32は、本ファームウェアについて更新処理を終了する。   Subsequently, in step S <b> 51, the update unit 32 transmits an end notification indicating completion of firmware update in the update target electronic control device 24 to the update target electronic control device 24 and the other electronic control devices 24. And the update part 32 complete | finishes an update process about this firmware.

一方、ステップS52において、更新部32は、提供装置20から受信した現FWデータを電子制御装置24に送信して、電子制御装置24に現FWデータを復元させる。具体的には、更新部32は、一時記憶部38に記憶されている正当であると判断された現FWデータを、復元指示とともに電子制御装置24に送信する。   On the other hand, in step S52, the updating unit 32 transmits the current FW data received from the providing device 20 to the electronic control device 24, and causes the electronic control device 24 to restore the current FW data. Specifically, the update unit 32 transmits the current FW data determined to be valid stored in the temporary storage unit 38 to the electronic control unit 24 together with a restoration instruction.

ここで、更新対象の電子制御装置24は、中継装置26から、現FWデータおよび復元指示を受信した場合、中継装置26から受信した現FWデータを記憶する。具体的には、電子制御装置24は、更新処理において書き込まれた新FWデータを削除して、データ記憶部70における現FWデータが元々記憶されていた領域に、受信した現FWデータを書き込む。そして、電子制御装置24は、復元処理においてデータ記憶部70に書き込まれた現FWデータを検証するためのMAC値(第7検証値)を算出する。   Here, when receiving the current FW data and the restoration instruction from the relay device 26, the electronic control device 24 to be updated stores the current FW data received from the relay device 26. Specifically, the electronic control unit 24 deletes the new FW data written in the update process, and writes the received current FW data in the area where the current FW data was originally stored in the data storage unit 70. Then, the electronic control unit 24 calculates a MAC value (seventh verification value) for verifying the current FW data written in the data storage unit 70 in the restoration process.

続いて、ステップS53において、更新部32は、更新対象の電子制御装置24から、書き込んだ現FWデータを検証するためのMAC値(第7検証値)を受信する。   Subsequently, in step S53, the updating unit 32 receives a MAC value (seventh verification value) for verifying the written current FW data from the electronic control device 24 to be updated.

続いて、ステップS54において、更新部32は、復元処理において電子制御装置24に書き込まれた現FWデータが正当であるか否かを検証する。ステップS54の処理については、図14のフローにおいてさらに詳細に説明する。更新部32は、正当である場合(S54のYes)、処理をステップS51に進め、終了通知を送信して、本ファームウェアについて更新処理を終了する。更新部32は、正当でない場合(S54のNo)、処理をステップS55に進める。   Subsequently, in step S54, the updating unit 32 verifies whether or not the current FW data written in the electronic control unit 24 in the restoration process is valid. The process of step S54 will be described in more detail with reference to the flow of FIG. If it is valid (Yes in S54), the update unit 32 advances the process to step S51, transmits an end notification, and ends the update process for this firmware. If the update unit 32 is not valid (No in S54), the process proceeds to step S55.

ステップS55において、更新部32は、復元処理において電子制御装置24に書き込まれた現FWデータが正当でなかった回数(エラー回数)が、一定回数以上であるか否かを判断する。エラー回数が一定回数未満である場合(S55のNo)、更新部32は、処理をステップS52に戻して、現FWデータの送信から処理を繰り返す。エラー回数が一定回数以上である場合(S55のYes)、処理をステップS56に進める。   In step S55, the updating unit 32 determines whether or not the number of times that the current FW data written in the electronic control unit 24 in the restoration process is invalid (number of errors) is equal to or greater than a certain number. If the number of errors is less than the predetermined number (No in S55), the updating unit 32 returns the process to step S52 and repeats the process from the transmission of the current FW data. If the number of errors is equal to or greater than a certain number (Yes in S55), the process proceeds to step S56.

ステップS56において、更新部32は、更新対象の電子制御装置24および他の電子制御装置24に、更新対象の電子制御装置24に正当なデータが書き込まれていないことを示す失敗通知を送信する。そして、更新部32は、本ファームウェアについて更新処理を終了する。   In step S <b> 56, the update unit 32 transmits a failure notification indicating that valid data has not been written in the update-target electronic control device 24 to the update-target electronic control device 24 and other electronic control devices 24. And the update part 32 complete | finishes an update process about this firmware.

図13は、更新処理において電子制御装置24に書き込まれた新FWデータの正当性を判断するフローを示す図である。更新部32は、ステップS49において、図13に示す処理を実行する。   FIG. 13 is a diagram showing a flow for determining the validity of the new FW data written in the electronic control unit 24 in the update process. In step S49, the update unit 32 executes the process shown in FIG.

まず、更新部32は、更新処理において電子制御装置24に書き込まれた新FWデータを検証するための第5検証値を取得する(S61)。第5検証値は、電子制御装置24により算出された、電子制御装置24に書き込まれた新FWデータに対するMAC値である。続いて、更新部32は、一時記憶部38から新FWのMAC値(第6検証値)を読み出す(S62)。   First, the update unit 32 acquires a fifth verification value for verifying the new FW data written in the electronic control unit 24 in the update process (S61). The fifth verification value is a MAC value for the new FW data written in the electronic control device 24 calculated by the electronic control device 24. Subsequently, the update unit 32 reads the MAC value (sixth verification value) of the new FW from the temporary storage unit 38 (S62).

続いて、更新部32は、第5検証値と第6検証値とが一致するか否かを判断する(S63)。更新部32は、第5検証値と第6検証値とが一致する場合(S63のYes)、電子制御装置24に書き込まれた新FWデータが正当である(S64)として、処理を終了する。更新部32は、第5検証値と第6検証値とが一致しない場合(S63のNo)、電子制御装置24に書き込まれた新FWデータが正当ではない(S65)として、処理を終了する。   Subsequently, the updating unit 32 determines whether or not the fifth verification value and the sixth verification value match (S63). If the fifth verification value and the sixth verification value match (Yes in S63), the updating unit 32 determines that the new FW data written in the electronic control device 24 is valid (S64) and ends the process. If the fifth verification value and the sixth verification value do not match (No in S63), the updating unit 32 determines that the new FW data written in the electronic control device 24 is not valid (S65) and ends the process.

図14は、復元処理において電子制御装置24に書き込まれた現FWデータの正当性を判断するフローを示す図である。更新部32は、ステップS54において、図14に示す処理を実行する。   FIG. 14 is a diagram showing a flow for determining the validity of the current FW data written in the electronic control unit 24 in the restoration process. In step S54, the update unit 32 executes the process illustrated in FIG.

まず、更新部32は、復元処理において電子制御装置24に書き込まれた現FWデータを検証するための第7検証値を取得する(S71)。第7検証値は、電子制御装置24により算出された、電子制御装置24に書き込まれた現FWデータに対するMAC値である。続いて、更新部32は、管理データ記憶部34から現FWのMAC値(第8検証値)を読み出す(S72)。   First, the update unit 32 acquires a seventh verification value for verifying the current FW data written in the electronic control unit 24 in the restoration process (S71). The seventh verification value is a MAC value for the current FW data written in the electronic control unit 24 calculated by the electronic control unit 24. Subsequently, the update unit 32 reads the MAC value (eighth verification value) of the current FW from the management data storage unit 34 (S72).

続いて、更新部32は、第7検証値と第8検証値とが一致するか否かを判断する(S73)。更新部32は、第7検証値と第8検証値とが一致する場合(S73のYes)、電子制御装置24に書き込まれた現FWデータが正当である(S74)として、処理を終了する。更新部32は、第7検証値と第8検証値とが一致しない場合(S73のNo)、電子制御装置24に書き込まれた現FWデータが正当ではない(S75)として、処理を終了する。   Subsequently, the updating unit 32 determines whether or not the seventh verification value matches the eighth verification value (S73). If the seventh verification value matches the eighth verification value (Yes in S73), the updating unit 32 determines that the current FW data written in the electronic control device 24 is valid (S74), and ends the process. If the seventh verification value and the eighth verification value do not match (No in S73), the updating unit 32 determines that the current FW data written in the electronic control device 24 is not valid (S75) and ends the process.

以上のように、本実施形態に係るネットワークシステム10は、電子制御装置24に、データを更新するための別個のバッファを備えなくてもよい。これにより、本実施形態に係るネットワークシステム10によれば、電子制御装置24のコストを小さくすることができる。   As described above, the network system 10 according to the present embodiment may not include a separate buffer for updating data in the electronic control device 24. Thereby, according to the network system 10 which concerns on this embodiment, the cost of the electronic control apparatus 24 can be made small.

本実施形態に係るネットワークシステム10は、中継装置26が予め現FWデータおよび新FWデータの両者を提供装置20から受信する。そして、電子制御装置24に対する現FWデータから新FWデータへの更新が失敗した場合、中継装置26が、予め受信している現FWデータを電子制御装置24に送信して、電子制御装置24に現FWデータを復元させる。これにより、本実施形態に係るネットワークシステム10によれば、更新処理が失敗した場合に提供装置20にアクセスしなくてよいので、全体の更新時間を短くすることができる。   In the network system 10 according to the present embodiment, the relay device 26 receives both the current FW data and the new FW data from the providing device 20 in advance. Then, when the update from the current FW data to the new FW data for the electronic control device 24 fails, the relay device 26 transmits the current FW data received in advance to the electronic control device 24 and sends it to the electronic control device 24. The current FW data is restored. Thereby, according to the network system 10 which concerns on this embodiment, when the update process fails, it is not necessary to access the provision apparatus 20, Therefore The whole update time can be shortened.

(第1変形例)
図15は、第1変形例に係る提供装置20および中継装置26の機能構成を示す図である。図16は、最新バージョン情報を示す図である。
(First modification)
FIG. 15 is a diagram illustrating a functional configuration of the providing device 20 and the relay device 26 according to the first modification. FIG. 16 is a diagram showing the latest version information.

なお、第1変形例について説明をするにあたり、図1から図14を参照して説明したブロックと略同一の機能および構成を有するブロックについては、同一の符号を付けて相違点を除き説明を省略する。第2変形例以降においても同様である。   In the description of the first modification, blocks having substantially the same functions and configurations as the blocks described with reference to FIGS. 1 to 14 are denoted by the same reference numerals and description thereof is omitted except for differences. To do. The same applies to the second and subsequent modifications.

第1変形例に係る提供装置20は、バージョン送信部122をさらに有する。第1変形例に係る中継装置26の取得部30は、バージョン受信部124とバージョン判定部126とをさらに有する。   The providing device 20 according to the first modification further includes a version transmission unit 122. The acquisition unit 30 of the relay device 26 according to the first modification further includes a version reception unit 124 and a version determination unit 126.

バージョン送信部122は、それぞれのファームウェアについて、提供装置20から送信可能な新FWデータのバージョンを表す最新バージョン情報を中継装置26に送信する。最新バージョン情報は、図16に示すように、ECUIDと、FWIDおよびMAC値を含む。MAC値は、最新のFWデータのMAC値である。バージョン送信部122は、複数のファームウェアについての最新バージョン情報を含むリストを送信してよい。バージョン送信部122は、最新バージョン情報を、例えば一定期間毎に送信する。   The version transmission unit 122 transmits the latest version information indicating the version of new FW data that can be transmitted from the providing apparatus 20 to the relay apparatus 26 for each firmware. As shown in FIG. 16, the latest version information includes ECUID, FWID, and MAC value. The MAC value is the MAC value of the latest FW data. The version transmission unit 122 may transmit a list including the latest version information about a plurality of firmware. The version transmission unit 122 transmits the latest version information at regular intervals, for example.

バージョン受信部124は、提供装置20から送信可能な新FWデータのバージョンを表す最新バージョン情報を受信する。バージョン判定部126は、受信した最新バージョン情報に基づき、電子制御装置24に記憶されている現FWデータのバージョンより、提供装置20から送信可能な新FWデータのバージョンが新しいかを判断する。   The version receiving unit 124 receives the latest version information indicating the version of new FW data that can be transmitted from the providing apparatus 20. Based on the received latest version information, the version determination unit 126 determines whether the version of the new FW data that can be transmitted from the providing device 20 is newer than the version of the current FW data stored in the electronic control device 24.

要求送信部52は、電子制御装置24に記憶されている現FWデータのバージョンより、提供装置20から送信可能な新FWデータのバージョンが新しい場合、バージョン判定部126から通知を受ける。そして、要求送信部52は、電子制御装置24に記憶されている現FWデータのバージョンより、提供装置20から送信可能な新FWデータのバージョンが新しいことを条件として、そのファームウェアについての取得要求を提供装置20に送信する。   The request transmission unit 52 receives a notification from the version determination unit 126 when the version of the new FW data that can be transmitted from the providing device 20 is newer than the version of the current FW data stored in the electronic control unit 24. Then, the request transmission unit 52 makes an acquisition request for the firmware on the condition that the version of the new FW data that can be transmitted from the providing device 20 is newer than the version of the current FW data stored in the electronic control device 24. To the providing device 20.

図17は、第1変形例に係る中継装置26による取得処理フローを示す図である。第1変形例において、取得部30は、図17に示す取得処理を実行する。   FIG. 17 is a diagram illustrating an acquisition processing flow by the relay device 26 according to the first modification. In the first modification, the acquisition unit 30 executes the acquisition process illustrated in FIG.

まず、ステップS81において、取得部30は、提供装置20から最新バージョン情報を受信する。続いて、ステップS82において、取得部30は、ECUIDおよびFWIDが最新バージョン情報と一致する管理データが管理データ記憶部34に記憶されているかを判断する。一致する管理データが無い場合(S82のNo)、取得部30は、本フローを終了する。一致する管理データが有る場合(S82のYes)、取得部30は、処理をステップS83に進める。   First, in step S <b> 81, the acquisition unit 30 receives the latest version information from the providing device 20. Subsequently, in step S <b> 82, the acquisition unit 30 determines whether management data in which the ECU ID and the FWID match the latest version information is stored in the management data storage unit 34. If there is no matching management data (No in S82), the acquisition unit 30 ends this flow. If there is matching management data (Yes in S82), the acquisition unit 30 advances the process to Step S83.

ステップS83において、取得部30は、最新バージョン情報に含まれるMAC値と、ECUIDおよびFWIDが一致する管理データに含まれる現FWのMAC値とを比較する。MAC値が一致した場合(S83のYes)、取得部30は、電子制御装置24に記憶されている現FWデータのバージョンと、提供装置20から送信可能な最新のバージョンとが同一であるとして、本フローを終了する。一致しなかった場合(S83のNo)、取得部30は、電子制御装置24に記憶されている現FWデータのバージョンより、提供装置20から送信可能な新FWデータのバージョンが新しいと判断し、処理をステップS84に進める。   In step S83, the acquisition unit 30 compares the MAC value included in the latest version information with the MAC value of the current FW included in the management data having the same ECU ID and FWID. When the MAC values match (Yes in S83), the acquisition unit 30 assumes that the version of the current FW data stored in the electronic control device 24 is the same as the latest version that can be transmitted from the providing device 20. This flow ends. If they do not match (No in S83), the acquisition unit 30 determines that the version of the new FW data that can be transmitted from the providing device 20 is newer than the version of the current FW data stored in the electronic control device 24, The process proceeds to step S84.

ステップS84において、取得部30は、最新バージョン情報に含まれるECUIDおよびFWIDにより特定されるファームウェアについて、取得要求を提供装置20に送信する。提供装置20は、中継装置26から取得要求を受信すると、図8の場合と同様に応答情報を中継装置26に送信する。   In step S84, the acquisition unit 30 transmits an acquisition request to the providing device 20 for the firmware specified by the ECU ID and the FWID included in the latest version information. When receiving the acquisition request from the relay device 26, the providing device 20 transmits response information to the relay device 26 as in the case of FIG.

続いて、ステップS85において、取得部30は、提供装置20から応答情報を受信する。そして、以後、取得部30は、図8のステップS14からステップS17までの処理と同様の処理を実行する。ただし、ステップS17において、エラー回数が一定回数未満の場合(S17のNo)、取得部30は、処理をステップS84に戻す。   Subsequently, in step S <b> 85, the acquisition unit 30 receives response information from the providing device 20. Thereafter, the acquisition unit 30 executes processing similar to the processing from step S14 to step S17 in FIG. However, in step S17, when the number of errors is less than the predetermined number (No in S17), the acquisition unit 30 returns the process to step S84.

このような第1変形例に係る中継装置26は、電子制御装置24に記憶されている現FWデータのバージョンより、提供装置20から送信可能な新FWデータのバージョンが新しい場合に、取得要求を送信することができる。従って、中継装置26によれば、効率良く取得要求を送信することができる。   The relay device 26 according to the first modified example issues an acquisition request when the version of new FW data that can be transmitted from the providing device 20 is newer than the version of the current FW data stored in the electronic control device 24. Can be sent. Therefore, according to the relay apparatus 26, an acquisition request can be transmitted efficiently.

(第2変形例)
図18は、第2変形例に係る中継装置26および電子制御装置24の機能構成を示す図である。第2変形例に係る電子制御装置24は、記憶しているデータが正当であるか否かの検証を実行することができる。従って、第2変形例においては、電子制御装置24に書き込まれた新FWデータおよび現FWデータの検証を、電子制御装置24が実行する。
(Second modification)
FIG. 18 is a diagram illustrating a functional configuration of the relay device 26 and the electronic control device 24 according to the second modification. The electronic control device 24 according to the second modification can execute verification of whether or not the stored data is valid. Therefore, in the second modified example, the electronic control unit 24 executes verification of the new FW data and the current FW data written in the electronic control unit 24.

第2変形例に係る電子制御装置24は、図11に示した構成と比較して、第3検証部142および結果送信部144をさらに有し、検証値送信部94を有さない構成である。また、第2変形例に係る中継装置26の更新部32は、図11に示した構成と比較して、結果受信部146をさらに有し、検証値受信部96および第2検証部98を有さない構成である。   The electronic control device 24 according to the second modification has a configuration that further includes a third verification unit 142 and a result transmission unit 144 and does not include the verification value transmission unit 94, as compared with the configuration illustrated in FIG. . Further, the updating unit 32 of the relay device 26 according to the second modification further includes a result receiving unit 146, and a verification value receiving unit 96 and a second verification unit 98, as compared with the configuration illustrated in FIG. It is a configuration that does not.

第2変形例において、データ送信部84は、開始検知部78から開始指示を受け取ると、提供装置20から受信した新FWデータ、および、提供装置20から受信した新FWデータを検証するための第6検証値を、更新指示とともに電子制御装置24に送信する。第6検証値は、提供装置20から受信した新FWデータのMAC値である。これにより、データ送信部84は、電子制御装置24に現FWデータを新FWデータに更新させることができるとともに、電子制御装置24に書き込まれた新FWデータの正当性を検証させることができる。   In the second modification, when the data transmission unit 84 receives a start instruction from the start detection unit 78, the data transmission unit 84 verifies the new FW data received from the providing device 20 and the new FW data received from the providing device 20. 6 The verification value is transmitted to the electronic control unit 24 together with the update instruction. The sixth verification value is the MAC value of the new FW data received from the providing device 20. As a result, the data transmission unit 84 can cause the electronic control device 24 to update the current FW data to the new FW data, and can verify the validity of the new FW data written to the electronic control device 24.

第3検証部142は、更新処理において電子制御装置24に書き込まれた新FWデータが正当であるか否かを検証する。具体的には、第3検証部142は、更新処理において電子制御装置24に書き込まれた新FWデータを検証するための第5検証値と、中継装置26から受信した新FWデータを検証するための第6検証値とが一致しない場合に、更新処理により電子制御装置24に書き込まれた新FWデータが正当ではないと判断する。   The third verification unit 142 verifies whether the new FW data written in the electronic control device 24 in the update process is valid. Specifically, the third verification unit 142 verifies the fifth verification value for verifying the new FW data written in the electronic control device 24 in the update process and the new FW data received from the relay device 26. If the new verification value does not match the new verification value, it is determined that the new FW data written in the electronic control unit 24 by the update process is not valid.

ここで、第5検証値は、第2検証値生成部92により算出された、データ記憶部70に書き込まれた新FWデータに対するMAC値である。また、第6検証値は、中継装置26から受信した新FWデータのMAC値である。   Here, the fifth verification value is a MAC value calculated by the second verification value generation unit 92 for the new FW data written in the data storage unit 70. The sixth verification value is the MAC value of the new FW data received from the relay device 26.

結果送信部144は、更新処理において電子制御装置24に書き込まれた新FWデータが正当であるか否かの結果を中継装置26に送信する。結果受信部146は、更新処理において電子制御装置24に書き込まれた新FWデータが正当であるか否かの結果を電子制御装置24から受信する。   The result transmission unit 144 transmits the result of whether or not the new FW data written in the electronic control device 24 in the update process is valid to the relay device 26. The result receiving unit 146 receives a result from the electronic control unit 24 as to whether the new FW data written in the electronic control unit 24 in the update process is valid.

結果受信部146は、更新処理において電子制御装置24に書き込まれた新FWデータが正当であったことを示す結果を受信した場合、その結果を、確定部100および通知部102に通知する。確定部100は、結果受信部146から、書き込まれた新FWデータが正当である旨の通知を受けた場合、一時記憶部38に記憶されている情報を読み出して、管理データ記憶部34に記憶させる。通知部102は、結果受信部146から、書き込まれた新FWデータが正当である旨の通知を受けた場合、他の電子制御装置24および更新対象の電子制御装置24に、更新対象の電子制御装置24におけるファームウェアの更新が完了したことを示す情報を送信する。   When the result reception unit 146 receives a result indicating that the new FW data written in the electronic control unit 24 is valid in the update process, the result reception unit 146 notifies the determination unit 100 and the notification unit 102 of the result. When the confirmation unit 100 receives a notification from the result reception unit 146 that the written new FW data is valid, the determination unit 100 reads the information stored in the temporary storage unit 38 and stores it in the management data storage unit 34. Let When the notification unit 102 receives a notification from the result reception unit 146 that the written new FW data is valid, the other electronic control device 24 and the update target electronic control device 24 are notified of the update target electronic control. Information indicating that the firmware update in the device 24 has been completed is transmitted.

一方、結果受信部146は、更新処理において電子制御装置24に書き込まれた新FWデータが正当でなかったことを示す結果を受信した場合、更新処理が失敗したことを、データ送信部84に通知する。   On the other hand, when the result receiving unit 146 receives a result indicating that the new FW data written in the electronic control unit 24 in the update process is not valid, the result receiving unit 146 notifies the data transmitting unit 84 that the update process has failed. To do.

データ送信部84は、更新処理が失敗した場合、提供装置20から受信した現FWデータ、および、現FWデータを検証するための第8検証値を、復元指示とともに電子制御装置24に送信する。第8検証値は、管理データ記憶部34に記憶されている現FWデータのMAC値である。これにより、データ送信部84は、電子制御装置24に現FWデータを復元させることができるとともに、電子制御装置24に書き込まれた現FWデータの正当性を検証させることができる。   When the update process fails, the data transmission unit 84 transmits the current FW data received from the providing device 20 and the eighth verification value for verifying the current FW data to the electronic control device 24 together with the restoration instruction. The eighth verification value is the MAC value of the current FW data stored in the management data storage unit 34. As a result, the data transmission unit 84 can cause the electronic control unit 24 to restore the current FW data and can verify the validity of the current FW data written in the electronic control unit 24.

第3検証部142は、復元処理において電子制御装置24に書き込まれた現FWデータが正当であるか否かを検証する。具体的には、第3検証部142は、復元処理において電子制御装置24に書き込まれた現FWデータを検証するための第7検証値と、中継装置26から受信した現FWデータを検証するための第8検証値とが一致しない場合に、復元処理により電子制御装置24に書き込まれた現FWデータが正当ではないと判断する。   The third verification unit 142 verifies whether the current FW data written in the electronic control unit 24 in the restoration process is valid. Specifically, the third verification unit 142 verifies the seventh verification value for verifying the current FW data written in the electronic control device 24 in the restoration process and the current FW data received from the relay device 26. When the current verification data does not match the eighth verification value, it is determined that the current FW data written in the electronic control unit 24 by the restoration process is not valid.

ここで、第7検証値は、第2検証値生成部92により算出された、データ記憶部70に書き込まれた現FWデータにおけるMAC値である。また、第8検証値は、中継装置26から受信した現FWデータのMAC値である。   Here, the seventh verification value is the MAC value in the current FW data written in the data storage unit 70 calculated by the second verification value generation unit 92. The eighth verification value is the MAC value of the current FW data received from the relay device 26.

結果送信部144は、復元処理において電子制御装置24に書き込まれた現FWデータが正当であるか否かの結果を中継装置26に送信する。結果受信部146は、復元処理において電子制御装置24に書き込まれた現FWデータが正当であるか否かの結果を電子制御装置24から受信する。   The result transmission unit 144 transmits the result of whether or not the current FW data written in the electronic control device 24 in the restoration process is valid to the relay device 26. The result receiving unit 146 receives from the electronic control unit 24 the result of whether or not the current FW data written in the electronic control unit 24 in the restoration process is valid.

結果受信部146は、復元処理において電子制御装置24に書き込まれた現FWデータが正当であったことを示す結果を受信した場合、その結果を、通知部102に通知する。通知部102は、結果受信部146から、書き込まれた現FWデータが正当である旨の通知を受けた場合、他の電子制御装置24および復元対象の電子制御装置24に、更新対象の電子制御装置24における処理が完了したことを示す情報を送信する。   When the result receiving unit 146 receives a result indicating that the current FW data written in the electronic control unit 24 is valid in the restoration process, the result receiving unit 146 notifies the notification unit 102 of the result. When the notification unit 102 receives a notification from the result reception unit 146 that the written current FW data is valid, the other electronic control device 24 and the electronic control device 24 to be restored receive the electronic control to be updated. Information indicating that the processing in the device 24 is completed is transmitted.

また、結果受信部146は、復元処理において電子制御装置24に書き込まれた現FWデータが正当でなかったことを示す結果を受信した場合、復元処理が失敗したことをデータ送信部84に通知する。   In addition, when the result receiving unit 146 receives a result indicating that the current FW data written in the electronic control unit 24 in the restoration process is not valid, the result receiving unit 146 notifies the data transmission unit 84 that the restoration process has failed. .

データ送信部84は、復元処理が失敗した場合、現FWデータおよび第8検証値を復元指示とともに電子制御装置24に送信する処理を繰り返す。これにより、データ送信部84は、電子制御装置24に対して繰り返して復元処理を実行させることができる。   When the restoration process fails, the data transmission unit 84 repeats the process of sending the current FW data and the eighth verification value to the electronic control unit 24 together with the restoration instruction. As a result, the data transmission unit 84 can cause the electronic control device 24 to repeatedly execute the restoration process.

ただし、結果受信部146は、復元処理において電子制御装置24に書き込んだ現FWデータが正当でなかったことを示す結果を受信した回数(エラー回数)が一定回数以上となった場合、データ送信部84による現FWデータの送信を終了させる。そして、結果受信部146は、電子制御装置24に正当なデータが書き込まれていないことを通知部102に通知する。通知部102は、結果受信部146から、正当なデータが書き込まれていないことを示す通知を受けると、他の電子制御装置24および更新対象の電子制御装置24に、更新対象の電子制御装置24に正当なデータが書き込まれていないことを示す情報を送信する。   However, the result receiving unit 146 is a data transmitting unit when the number of times (error count) of receiving the result indicating that the current FW data written in the electronic control unit 24 in the restoration process is not valid is equal to or greater than a certain number. The transmission of the current FW data by 84 is terminated. Then, the result reception unit 146 notifies the notification unit 102 that valid data is not written in the electronic control device 24. When the notification unit 102 receives a notification from the result reception unit 146 indicating that valid data has not been written, the notification unit 102 notifies the other electronic control device 24 and the update target electronic control device 24 of the update target electronic control device 24. Information indicating that no legitimate data has been written to is transmitted.

図19は、第2変形例に係る中継装置26による更新処理フローを示す図である。第2変形例において、更新部32は、図19に示す更新処理を実行する。   FIG. 19 is a diagram illustrating an update processing flow by the relay device 26 according to the second modification. In the second modification, the update unit 32 executes the update process illustrated in FIG.

まず、更新部32は、図12のステップS41からステップS46までと同様の処理を実行する。ステップS46を終了すると、更新部32は、処理をステップS91に進める。   First, the updating unit 32 executes the same processing as in steps S41 to S46 in FIG. When step S46 ends, the updating unit 32 advances the process to step S91.

ステップS91において、更新部32は、提供装置20から受信した新FWデータ、および、提供装置20から受信した新FWデータのMAC値(第6検証値)を、更新指示とともに電子制御装置24に送信する。続いて、ステップS92において、更新部32は、電子制御装置24から、書き込んだ新FWデータが正当であるか否かの結果を受信する。   In step S91, the updating unit 32 transmits the new FW data received from the providing device 20 and the MAC value (sixth verification value) of the new FW data received from the providing device 20 to the electronic control device 24 together with an update instruction. To do. Subsequently, in step S <b> 92, the updating unit 32 receives from the electronic control device 24 the result of whether or not the written new FW data is valid.

続いて、ステップS93において、更新部32は、更新処理において電子制御装置24に書き込まれた新FWデータが正当であるか否かを判断する。更新部32は、正当である場合(S93のYes)、処理をステップS50に進め、正当でない場合(S93のNo)、処理をステップS94に進める。   Subsequently, in step S93, the update unit 32 determines whether or not the new FW data written in the electronic control device 24 in the update process is valid. If it is valid (Yes in S93), the updating unit 32 advances the process to Step S50, and if not valid (No in S93), advances the process to Step S94.

ステップS50およびステップS51において、更新部32は、図12の場合と同様に処理を実行する。ステップS51を終了すると、更新部32は、本ファームウェアについて更新処理を終了する。   In step S50 and step S51, the update unit 32 performs the same process as in FIG. When step S51 ends, the update unit 32 ends the update process for this firmware.

ステップS94において、更新部32は、提供装置20から受信した現FWデータおよび現FWデータのMAC値(第8検証値)を、復元指示とともに電子制御装置24に送信する。続いて、ステップS95において、更新部32は、電子制御装置24から、復元処理において書き込んだ現FWデータが正当であるか否かの検証結果を受信する。   In step S94, the updating unit 32 transmits the current FW data received from the providing device 20 and the MAC value (eighth verification value) of the current FW data to the electronic control device 24 together with a restoration instruction. Subsequently, in step S95, the update unit 32 receives a verification result from the electronic control unit 24 as to whether or not the current FW data written in the restoration process is valid.

続いて、ステップS96において、更新部32は、復元処理において電子制御装置24に書き込まれた現FWデータが正当であるか否かを判断する。更新部32は、正当である場合(S96のYes)、処理をステップS51に進め、正当でない場合(S96のNo)、処理をステップS97に進める。   Subsequently, in step S96, the updating unit 32 determines whether or not the current FW data written in the electronic control unit 24 in the restoration process is valid. If the update unit 32 is valid (Yes in S96), the process proceeds to step S51. If not valid (No in S96), the update unit 32 proceeds to step S97.

ステップS97において、更新部32は、復元処理のエラー回数が、一定回数以上であるか否かを判断する。エラー回数が一定回数未満である場合(S97のNo)、更新部32は、処理をステップS94に戻して、現FWデータの送信から処理を繰り返す。エラー回数が一定回数以上である場合(S97のYes)、処理をステップS56に進める。   In step S97, the update unit 32 determines whether or not the number of errors in the restoration process is equal to or greater than a certain number. If the number of errors is less than the predetermined number (No in S97), the updating unit 32 returns the process to step S94 and repeats the process from the transmission of the current FW data. If the number of errors is equal to or greater than a certain number (Yes in S97), the process proceeds to step S56.

ステップS56において、更新部32は、図12の場合と同様に処理を実行する。そして、ステップS56を終了すると、更新部32は、本ファームウェアについて更新処理を終了する。   In step S56, the update unit 32 performs the same process as in FIG. When step S56 ends, the update unit 32 ends the update process for this firmware.

このような第2変形例に係る中継装置26は、電子制御装置24に書き込まれたデータの正当性を、電子制御装置24において検証をさせることができる。   The relay device 26 according to the second modification can cause the electronic control device 24 to verify the validity of the data written in the electronic control device 24.

(第3変形例)
図20は、第3変形例に係る中継装置26および電子制御装置24の機能構成を示す図である。図21は、第3変形例に係る状態記憶部40に記憶される情報の内容を示す図である。
(Third Modification)
FIG. 20 is a diagram illustrating a functional configuration of the relay device 26 and the electronic control device 24 according to the third modification. FIG. 21 is a diagram illustrating the content of information stored in the state storage unit 40 according to the third modification.

第3変形例に係る中継装置26は、電子制御装置24に書き込まれたデータの正当性を、電子制御装置24で検証するか、中継装置26で検証するかを切り替えることができる。第3変形例において、電子制御装置24は、図11に示す構成、または、図18に示す構成である。電子制御装置24が図11に示す構成の場合、電子制御装置24に書き込まれたデータの正当性を中継装置26が検証する。電子制御装置24が図18に示す構成の場合、電子制御装置24に書き込まれたデータの正当性を電子制御装置24が検証する。   The relay device 26 according to the third modification can switch whether the electronic control device 24 verifies the validity of the data written in the electronic control device 24 or the relay device 26. In the third modification, the electronic control unit 24 has the configuration shown in FIG. 11 or the configuration shown in FIG. When the electronic control device 24 has the configuration shown in FIG. 11, the relay device 26 verifies the validity of the data written in the electronic control device 24. When the electronic control unit 24 has the configuration shown in FIG. 18, the electronic control unit 24 verifies the validity of the data written in the electronic control unit 24.

第3変形例に係る中継装置26の更新部32は、図11に示した構成に加えて、結果受信部146と、切替部152とをさらに有する。結果受信部146は、図18に示した構成と同様の機能を有する。   The updating unit 32 of the relay device 26 according to the third modification further includes a result receiving unit 146 and a switching unit 152 in addition to the configuration shown in FIG. The result receiving unit 146 has the same function as the configuration illustrated in FIG.

第3変形例において、状態記憶部40は、図21に示すように、検証主体情報をさらに記憶する。検証主体情報は、電子制御装置24に書き込まれたデータが正当であるか否かの検証を、中継装置26で実行するか電子制御装置24で実行するかを示す。   In the third modification, the state storage unit 40 further stores verification subject information as shown in FIG. The verification subject information indicates whether the relay device 26 or the electronic control device 24 performs verification of whether the data written in the electronic control device 24 is valid.

切替部152は、更新対象の電子制御装置24についての検証主体情報を状態記憶部40から読み出す。切替部152は、読み出した検証主体情報に基づき、検証を中継装置26で実行させるか電子制御装置24で実行させるかを切り替える。   The switching unit 152 reads verification subject information about the electronic control device 24 to be updated from the state storage unit 40. The switching unit 152 switches whether the verification is executed by the relay device 26 or the electronic control device 24 based on the read verification subject information.

切替部152は、検証を中継装置26で実行させる場合、検証値受信部96および第2検証部98の機能を有効化し、結果受信部146の機能を停止させる。切替部152は、検証を電子制御装置24で実行させる場合、検証値受信部96および第2検証部98の機能を停止させ、結果受信部146の機能を有効化させる。   When the verification is performed by the relay device 26, the switching unit 152 enables the functions of the verification value receiving unit 96 and the second verification unit 98 and stops the function of the result receiving unit 146. When the verification is executed by the electronic control unit 24, the switching unit 152 stops the functions of the verification value receiving unit 96 and the second verification unit 98 and enables the function of the result receiving unit 146.

図22は、第3変形例に係る中継装置26による更新処理フローを示す図である。第3変形例において、更新部32は、図22に示す更新処理を実行する。   FIG. 22 is a diagram illustrating an update processing flow by the relay device 26 according to the third modification. In the third modification, the update unit 32 executes the update process shown in FIG.

まず、更新部32は、図12のステップS41からステップS46までと同様の処理を実行する。ステップS46を終了すると、更新部32は、処理をステップS111に進める。   First, the updating unit 32 executes the same processing as in steps S41 to S46 in FIG. When step S46 ends, the updating unit 32 advances the process to step S111.

ステップS111において、更新部32は、更新対象の電子制御装置24についての検証主体情報を状態記憶部40から読み出す。続いて、ステップS112において、更新部32は、読み出した検証主体情報に基づき、検証を中継装置26で実行させるか、電子制御装置24で実行させるかを判断する。   In step S <b> 111, the update unit 32 reads verification subject information regarding the electronic control device 24 to be updated from the state storage unit 40. Subsequently, in step S <b> 112, the updating unit 32 determines whether to perform verification by the relay device 26 or the electronic control device 24 based on the read verification subject information.

更新部32は、検証を中継装置26で実行させる場合(S112のYes)、処理をステップS113の第1更新フローに進める。更新部32は、検証を電子制御装置24で実行させる場合(S112のNo)、処理をステップS114の第2更新フローに進める。   When the update unit 32 causes the relay device 26 to execute verification (Yes in S112), the update unit 32 advances the processing to the first update flow in Step S113. When the verification is executed by the electronic control device 24 (No in S112), the update unit 32 advances the process to the second update flow in Step S114.

ステップS113の第1更新フローは、図12に示すステップS47以降の処理フローと同様である。また、ステップS114の第2更新フローは、図19に示すステップS91以降の処理フローと同様である。   The first update flow in step S113 is the same as the process flow after step S47 shown in FIG. Further, the second update flow in step S114 is the same as the process flow after step S91 shown in FIG.

以上の処理を実行することにより、更新部32は、電子制御装置24に書き込まれたデータの検証を中継装置26または電子制御装置24に実行させることができる。   By executing the above processing, the updating unit 32 can cause the relay device 26 or the electronic control device 24 to verify the data written in the electronic control device 24.

図23は、第2更新処理フローの他の一例を示す図である。電子制御装置24は、記憶しているデータを更新する場合、外部から受信したデータを一時的に記憶するためのバッファを有する場合がある。このような構成の電子制御装置24は、中継装置26から受信した新FWデータをバッファに一時的に格納し、バッファに格納した状態において新FWデータの正当性を検証することができる。   FIG. 23 is a diagram illustrating another example of the second update processing flow. When updating the stored data, the electronic control unit 24 may have a buffer for temporarily storing data received from the outside. The electronic control device 24 having such a configuration can temporarily store the new FW data received from the relay device 26 in the buffer, and verify the validity of the new FW data in the state stored in the buffer.

そして、電子制御装置24は、バッファに格納した新FWデータが正当であると判断した場合、新FWデータをバッファからデータ記憶部70に転送する。これにより、電子制御装置24は、記憶している現FWデータを新FWデータに更新することができる。   If the electronic control unit 24 determines that the new FW data stored in the buffer is valid, the electronic control unit 24 transfers the new FW data from the buffer to the data storage unit 70. Thereby, the electronic control unit 24 can update the stored current FW data to new FW data.

一方、電子制御装置24は、バッファに格納した新FWデータが正当ではないと判断した場合、バッファに記憶している新FWデータをデータ記憶部70には転送せずに、削除する。この場合、電子制御装置24は、データ記憶部70には現FWデータが残っており、再度、現FWデータを書き込む必要がない。   On the other hand, when it is determined that the new FW data stored in the buffer is not valid, the electronic control unit 24 deletes the new FW data stored in the buffer without transferring it to the data storage unit 70. In this case, the electronic control unit 24 does not need to write the current FW data again because the current FW data remains in the data storage unit 70.

そこで、電子制御装置24がこのようなバッファを有する構成の場合、更新部32は、ステップS114の第2更新フローにおいて、図23に示す処理を実行してもよい。   Therefore, when the electronic control unit 24 has such a buffer, the updating unit 32 may execute the process illustrated in FIG. 23 in the second update flow in step S114.

まず、ステップS121において、更新部32は、提供装置20から受信した新FWデータ、および、提供装置20から受信した新FWデータのMAC値(第6検証値)を、更新指示とともに電子制御装置24に送信する。続いて、ステップS122において、更新部32は、電子制御装置24から、新FWデータが正当であるか否かの検証結果を受信する。   First, in step S121, the update unit 32 updates the new FW data received from the providing apparatus 20 and the MAC value (sixth verification value) of the new FW data received from the providing apparatus 20 together with an update instruction. Send to. Subsequently, in step S122, the update unit 32 receives a verification result as to whether or not the new FW data is valid from the electronic control device 24.

続いて、ステップS123において、更新部32は、電子制御装置24に送信した新FWデータが正当であったか否かを判断する。更新部32は、正当である場合(S123のYes)、処理をステップS124に進め、正当でない場合(S123のNo)、処理をステップS125に進める。   Subsequently, in step S123, the update unit 32 determines whether or not the new FW data transmitted to the electronic control device 24 is valid. If the update unit 32 is valid (Yes in S123), the process proceeds to step S124. If not valid (No in S123), the update unit 32 proceeds to step S125.

ステップS124において、更新部32は、一時記憶部38に記憶されている情報を読み出して、管理データ記憶部34に転送する。具体的には、更新部32は、一時記憶部38から新FWのMAC値、新FWのバージョン番号および新FWの開発者IDを読み出して、現FWのMAC値、現FWのバージョン番号および現FWの開発者IDとして管理データ記憶部34に記憶させる。更新部32は、ステップS124を終えると、処理をステップS125に進める。   In step S <b> 124, the update unit 32 reads the information stored in the temporary storage unit 38 and transfers it to the management data storage unit 34. Specifically, the update unit 32 reads the MAC value of the new FW, the version number of the new FW, and the developer ID of the new FW from the temporary storage unit 38, and the MAC value of the current FW, the version number of the current FW and the current FW It is stored in the management data storage unit 34 as the FW developer ID. After completing step S124, the updating unit 32 advances the process to step S125.

ステップS125において、更新部32は、更新対象の電子制御装置24および他の電子制御装置24に、更新対象の電子制御装置24がファームウェアの更新を完了した旨を示す終了通知を送信する。この場合、送信した新FWデータが正当であれば、電子制御装置24は新FWデータに基づき動作する。また、送信した新FWデータが正当でなければ、電子制御装置24は現FWデータに基づき動作をする。そして、更新部32は、本ファームウェアについて更新処理を終了する。   In step S <b> 125, the update unit 32 transmits an end notification indicating that the update target electronic control device 24 has completed the firmware update to the update target electronic control device 24 and the other electronic control devices 24. In this case, if the transmitted new FW data is valid, the electronic control unit 24 operates based on the new FW data. If the transmitted new FW data is not valid, the electronic control unit 24 operates based on the current FW data. And the update part 32 complete | finishes an update process about this firmware.

(第4変形例)
図24は、第4変形例に係る中継装置26の機能構成を示す図である。第4変形例は、図1から図14を参照して説明したネットワークシステム10を変形した構成であるが、第1変形例、第2変形例および第3変形例に適用されてもよい。
(Fourth modification)
FIG. 24 is a diagram illustrating a functional configuration of the relay device 26 according to the fourth modification. The fourth modification is a configuration obtained by modifying the network system 10 described with reference to FIGS. 1 to 14, but may be applied to the first modification, the second modification, and the third modification.

中継装置26は、現FWデータ記憶部201(現データ記憶部)をさらに備える。現FWデータ記憶部201は、制御対象システム22に備えられるそれぞれの電子制御装置24に記憶されている現FWデータを記憶する。   The relay device 26 further includes a current FW data storage unit 201 (current data storage unit). The current FW data storage unit 201 stores current FW data stored in each electronic control unit 24 provided in the controlled system 22.

取得部30は、提供装置20から新FWデータを受信する。取得部30は、提供装置20から新FWデータを受信した場合、受信した新FWデータが正当であるか否かを判断する。更新部32は、提供装置20から受信した正当である新FWデータを電子制御装置24に送信して、電子制御装置24に現FWデータを新FWデータに更新させる。更新部32は、現FWデータを新FWデータに更新する更新処理が成功した場合、電子制御装置24に送信した新FWデータを現FWデータ記憶部201に転送して、現FWデータとして記憶させる。   The acquisition unit 30 receives new FW data from the providing device 20. When receiving the new FW data from the providing device 20, the acquiring unit 30 determines whether the received new FW data is valid. The update unit 32 transmits the valid new FW data received from the providing device 20 to the electronic control device 24, and causes the electronic control device 24 to update the current FW data to the new FW data. When the update process for updating the current FW data to the new FW data is successful, the update unit 32 transfers the new FW data transmitted to the electronic control unit 24 to the current FW data storage unit 201 and stores it as the current FW data. .

また、取得部30は、提供装置20から新FWデータを受信した場合、現FWデータ記憶部201に記憶されている現FWデータが正当であるか否かも判断する。更新部32は、更新処理が失敗した場合、現FWデータ記憶部201に記憶されている正当である現FWデータを電子制御装置24に送信して、電子制御装置24に現FWデータを復元させる。   In addition, when receiving the new FW data from the providing device 20, the acquiring unit 30 also determines whether or not the current FW data stored in the current FW data storage unit 201 is valid. When the update process fails, the updating unit 32 transmits the current FW data that is valid stored in the current FW data storage unit 201 to the electronic control unit 24, and causes the electronic control unit 24 to restore the current FW data. .

また、取得部30は、現FWデータ記憶部201に記憶されている現FWデータが正当でないと判断された場合、提供装置20から現FWデータを受信する。取得部30は、提供装置20から現FWデータを受信した場合、受信した現FWデータが正当であるか否かを判断する。更新部32は、現FWデータ記憶部201に記憶されている現FWデータが正当でなかった場合であって且つ更新処理が失敗した場合、受信した正当な現FWデータを電子制御装置24に送信して、電子制御装置24に現FWデータを復元させる。そして、更新部32は、復元処理が成功した場合、電子制御装置24に送信した現FWデータを現FWデータ記憶部201に転送して、記憶させる。   In addition, when it is determined that the current FW data stored in the current FW data storage unit 201 is not valid, the acquisition unit 30 receives the current FW data from the providing device 20. When receiving the current FW data from the providing device 20, the acquiring unit 30 determines whether the received current FW data is valid. The update unit 32 transmits the received valid current FW data to the electronic control unit 24 when the current FW data stored in the current FW data storage unit 201 is not valid and the update process fails. Then, the electronic control unit 24 restores the current FW data. Then, when the restoration process is successful, the update unit 32 transfers the current FW data transmitted to the electronic control device 24 to the current FW data storage unit 201 for storage.

図25は、現FWデータ記憶部201に記憶される現ファームウェア情報の内容を示す図である。現FWデータ記憶部201は、それぞれの電子制御装置24に記憶されたそれぞれのファームウェア毎に、図25に示す現ファームウェア情報を記憶する。   FIG. 25 is a diagram showing the contents of the current firmware information stored in the current FW data storage unit 201. The current FW data storage unit 201 stores current firmware information shown in FIG. 25 for each firmware stored in each electronic control unit 24.

現ファームウェア情報は、ECUID、FWIDおよび現FWデータを含む。ECUIDは、その電子制御装置24の識別子である。FWIDは、そのファームウェアの識別子である。   The current firmware information includes ECUID, FWID, and current FW data. The ECU ID is an identifier of the electronic control device 24. The FWID is an identifier of the firmware.

現FWデータは、そのファームウェアの実体データである。つまり、現FWデータは、電子制御装置24に現在書き込まれているべきファームウェアの実体データである。   The current FW data is the actual data of the firmware. That is, the current FW data is firmware entity data that should be currently written in the electronic control unit 24.

図26は、第4変形例に係る提供装置20および中継装置26の機能構成を示す図である。   FIG. 26 is a diagram illustrating a functional configuration of the providing device 20 and the relay device 26 according to the fourth modification.

要求送信部52は、要求識別子と、ECUIDと、FWIDと、バージョン特定情報とを含む取得要求を、提供装置20に送信する。要求識別子は、新FWデータの送信を要求する取得要求か、現FWデータの送信を要求する取得要求かを識別する情報である。   The request transmission unit 52 transmits an acquisition request including a request identifier, ECU ID, FWID, and version specifying information to the providing device 20. The request identifier is information for identifying an acquisition request for requesting transmission of new FW data or an acquisition request for requesting transmission of current FW data.

要求送信部52は、ファームウェア毎に、予め定められた更新タイミングで(例えば定期的に)、新FWデータの送信を要求する取得要求を提供装置20に送信する。また、要求送信部52は、ファームウェアの更新において、現FWデータ記憶部201に記憶されている現FWデータが正当でないと判断された場合、そのファームウェアの現FWデータの送信を要求する取得要求を提供装置20に送信する。   The request transmission unit 52 transmits an acquisition request for requesting transmission of new FW data to the providing device 20 at a predetermined update timing (for example, periodically) for each firmware. Further, when it is determined that the current FW data stored in the current FW data storage unit 201 is not valid in the firmware update, the request transmission unit 52 issues an acquisition request for requesting transmission of the current FW data of the firmware. To the providing device 20.

特定部56は、新FWデータの取得要求を受信した場合、そのファームウェアについて、電子制御装置24が記憶している現FWデータのバージョンよりも新しいバージョンの実体データ(新FWデータ)が、存在するか否かを判断する。   When the identification unit 56 receives an acquisition request for new FW data, there is a version of the actual data (new FW data) of the firmware that is newer than the version of the current FW data stored in the electronic control unit 24. Determine whether or not.

応答送信部58は、新FWデータの取得要求を受信した場合であって且つ新FWデータが存在しない場合、ECUID、FWIDおよび更新フラグを含む応答情報を送信する。応答送信部58は、新FWデータの取得要求を受信した場合であって且つ新FWデータが存在する場合、ECUID、FWID、更新フラグ、新FWデータ、新FWのMAC値(第3検証値)、新FWのバージョン番号および新FWの開発者IDを含む応答情報を送信する。更新フラグは、新FWデータが存在しない場合には0、新FWデータが存在する場合には0以外の値となる。   The response transmission unit 58 transmits response information including an ECU ID, an FWID, and an update flag when a new FW data acquisition request is received and there is no new FW data. The response transmission unit 58 receives the new FW data acquisition request and when the new FW data exists, the ECU ID, the FWID, the update flag, the new FW data, and the new FW MAC value (third verification value) The response information including the version number of the new FW and the developer ID of the new FW is transmitted. The update flag has a value of 0 when no new FW data exists and a value other than 0 when new FW data exists.

また、応答送信部58は、現FWデータの取得要求を受信した場合、ECUID、FWID、更新フラグ、現FWデータ、現FWのMAC値(第9検証値)、現FWのバージョン番号および現FWの開発者IDを含む応答情報を送信する。更新フラグは、0以外の値となる。   When the response transmission unit 58 receives the acquisition request for the current FW data, the ECU ID, the FWID, the update flag, the current FW data, the MAC value (the ninth verification value) of the current FW, the version number of the current FW, and the current FW Response information including the developer ID is sent. The update flag has a value other than 0.

応答受信部60は、新FWデータの取得要求を送信した場合であって且つ新FWデータが存在しない場合、ECUID、FWIDおよび更新フラグを含む応答情報を受信する。応答受信部60は、新FWデータの取得要求を送信した場合であって且つ新FWデータが存在する場合、ECUID、FWID、更新フラグ、新FWデータ、新FWのMAC値(第3検証値)、新FWのバージョン番号および新FWの開発者IDを含む応答情報を受信する。また、応答受信部60は、現FWデータの取得要求を送信した場合、ECUID、FWID、更新フラグ、現FWデータ、現FWのMAC値(第9検証値)、現FWのバージョン番号および現FWの開発者IDを含む応答情報を受信する。   The response receiving unit 60 receives response information including an ECU ID, an FWID, and an update flag when a new FW data acquisition request is transmitted and there is no new FW data. When the response receiving unit 60 transmits a request for acquiring new FW data and there is new FW data, the ECU ID, FWID, update flag, new FW data, and new FW MAC value (third verification value) The response information including the version number of the new FW and the developer ID of the new FW is received. When the response receiving unit 60 transmits an acquisition request for the current FW data, the ECU ID, the FWID, the update flag, the current FW data, the MAC value (the ninth verification value) of the current FW, the version number of the current FW, and the current FW The response information including the developer ID is received.

第1検証値生成部62は、新FWデータの取得要求を送信した場合、提供装置20から受信した新FWデータについて、MAC値(第4検証値)を算出する。また、新FWデータの取得要求を送信した場合、第1検証値生成部62は、現FWデータ記憶部201に記憶された現FWデータについて、MAC値(第10検証値)を算出する。具体的には、第1検証値生成部62は、現FWの開発者IDに対応する共有鍵データを共有鍵記憶部36から読み出す。第1検証値生成部62は、読み出した共有鍵データと、現FWデータ記憶部201に記憶された現FWデータとによりMAC値を算出する。   When the first verification value generation unit 62 transmits an acquisition request for new FW data, the first verification value generation unit 62 calculates a MAC value (fourth verification value) for the new FW data received from the providing device 20. When a new FW data acquisition request is transmitted, the first verification value generation unit 62 calculates a MAC value (tenth verification value) for the current FW data stored in the current FW data storage unit 201. Specifically, the first verification value generation unit 62 reads the shared key data corresponding to the developer ID of the current FW from the shared key storage unit 36. The first verification value generation unit 62 calculates a MAC value from the read shared key data and the current FW data stored in the current FW data storage unit 201.

また、第1検証値生成部62は、現FWデータの取得要求を送信した場合、提供装置20から受信した現FWデータについて、MAC値(第11検証値)を算出する。具体的には、第1検証値生成部62は、現FWの開発者IDに対応する共有鍵データを共有鍵記憶部36から読み出す。第1検証値生成部62は、読み出した共有鍵データと、提供装置20から受信した現FWデータとによりMAC値を算出する。   Further, when the first verification value generation unit 62 transmits an acquisition request for current FW data, the first verification value generation unit 62 calculates a MAC value (an eleventh verification value) for the current FW data received from the providing device 20. Specifically, the first verification value generation unit 62 reads the shared key data corresponding to the developer ID of the current FW from the shared key storage unit 36. The first verification value generation unit 62 calculates a MAC value from the read shared key data and the current FW data received from the providing device 20.

第1検証部64は、提供装置20から受信した新FWデータが正当であるか否かを判断する。具体的には、第1検証部64は、提供装置20から受信した第3検証値と、共有鍵データと提供装置20から受信した新FWデータとにより算出された第4検証値とが一致する場合に、提供装置20から受信した新FWデータが正当であると判断する。これにより、第1検証部64は、提供装置20から受信した新FWデータの開発者が、中継装置26と同一の共有鍵データを保持しているか否かを検証することができる。   The first verification unit 64 determines whether the new FW data received from the providing device 20 is valid. Specifically, the first verification unit 64 matches the third verification value received from the providing device 20 with the fourth verification value calculated from the shared key data and the new FW data received from the providing device 20. In this case, it is determined that the new FW data received from the providing device 20 is valid. Thereby, the first verification unit 64 can verify whether the developer of the new FW data received from the providing device 20 holds the same shared key data as the relay device 26.

なお、第1検証部64は、提供装置20から受信した新FWデータが正当でない場合、要求送信部52に対して、再度、新FWデータの取得要求を送信させてもよい。第1検証部64は、一定回数、同一の取得要求を送信しても新FWデータが正当ではない場合、取得要求の送信を中止させる。   In addition, when the new FW data received from the providing device 20 is not valid, the first verification unit 64 may cause the request transmission unit 52 to transmit a new FW data acquisition request again. If the new FW data is not valid even if the same acquisition request is transmitted a certain number of times, the first verification unit 64 stops transmitting the acquisition request.

また、新FWデータの取得要求を送信した場合、第1検証部64は、現FWデータ記憶部201に記憶された現FWデータが正当であるか否かを判断する。具体的には、第1検証部64は、電子制御装置24に記憶されている現FWデータを検証するための第1検証値と、現FWデータ記憶部201に記憶された現FWデータを検証するための第10検証値とが一致する場合に、現FWデータ記憶部201に記憶された現FWデータが正当であると判断する。   Further, when the acquisition request for new FW data is transmitted, the first verification unit 64 determines whether or not the current FW data stored in the current FW data storage unit 201 is valid. Specifically, the first verification unit 64 verifies the first verification value for verifying the current FW data stored in the electronic control unit 24 and the current FW data stored in the current FW data storage unit 201. If the tenth verification value for matching the current FW data, the current FW data stored in the current FW data storage unit 201 is determined to be valid.

ここで、第1検証値は、管理データ記憶部34に記憶されている現FWのMAC値である。第10検証値は、第1検証値生成部62により算出された、現FWデータ記憶部201に記憶された現FWデータについてのMAC値である。すなわち、第1検証部64は、現FWデータ記憶部201に記憶された現FWデータが、電子制御装置24に記憶されている現FWデータと同一であるか否かを検証する。   Here, the first verification value is the MAC value of the current FW stored in the management data storage unit 34. The tenth verification value is a MAC value for the current FW data stored in the current FW data storage unit 201 calculated by the first verification value generation unit 62. That is, the first verification unit 64 verifies whether or not the current FW data stored in the current FW data storage unit 201 is the same as the current FW data stored in the electronic control unit 24.

第1検証部64は、現FWデータ記憶部201に記憶された現FWデータが正当でない場合、要求送信部52に対して、現FWデータの取得要求を送信させる。   If the current FW data stored in the current FW data storage unit 201 is not valid, the first verification unit 64 causes the request transmission unit 52 to transmit an acquisition request for the current FW data.

現FWデータの取得要求を送信した場合、第1検証部64は、提供装置20から受信した現FWデータが正当であるか否かを判断する。具体的には、第1検証部64は、提供装置20から受信した第9検証値と、共有鍵データと提供装置20から受信した現FWデータとにより算出された第11検証値とが一致する場合に、提供装置20から受信した現FWデータが正当であると判断する。   When the current FW data acquisition request is transmitted, the first verification unit 64 determines whether or not the current FW data received from the providing device 20 is valid. Specifically, the first verification unit 64 matches the ninth verification value received from the providing device 20 with the eleventh verification value calculated from the shared key data and the current FW data received from the providing device 20. In this case, it is determined that the current FW data received from the providing device 20 is valid.

ここで、第9検証値は、現FWデータの取得要求に応じて、提供装置20から受信した現FWデータのMAC値(現FWのMAC値)である。第11検証値は、第1検証値生成部62により算出された現FWデータのMAC値である。すなわち、第1検証部64は、提供装置20から受信した現FWデータの開発者が、中継装置26と同一の共有鍵データを保持しているか否かを検証する。   Here, the ninth verification value is the MAC value (the MAC value of the current FW) of the current FW data received from the providing device 20 in response to the acquisition request for the current FW data. The eleventh verification value is the MAC value of the current FW data calculated by the first verification value generation unit 62. That is, the first verification unit 64 verifies whether the developer of the current FW data received from the providing device 20 holds the same shared key data as that of the relay device 26.

なお、第1検証部64は、提供装置20から受信した現FWデータが正当でない場合、要求送信部52に対して、再度、現FWデータの取得要求を送信させてもよい。第1検証部64は、一定回数、同一の取得要求を送信しても現FWデータが正当ではない場合、取得要求の送信を中止させる。   In addition, when the current FW data received from the providing device 20 is not valid, the first verification unit 64 may cause the request transmission unit 52 to transmit an acquisition request for the current FW data again. The first verification unit 64 stops transmitting the acquisition request if the current FW data is not valid even if the same acquisition request is transmitted a certain number of times.

第1検証部64は、提供装置20から受信した新FWデータ、および、現FWデータ記憶部201に記憶された現FWデータ(または提供装置20から受信した現FWデータ)が正当であることを条件として、応答受信部60が受信した情報等を一時記憶部38に記憶させる。具体的には、第1検証部64は、提供装置20から受信した、ECUID、FWID、新FWデータ、新FWのMAC値、新FWのバージョン番号、新FWの開発者IDを、一時記憶部38に記憶させる。さらに、第1検証部64は、現FWデータ記憶部201に記憶された現FWデータ(または提供装置20から受信した現FWデータ)を、一時記憶部38に記憶させる。   The first verification unit 64 confirms that the new FW data received from the providing device 20 and the current FW data stored in the current FW data storage unit 201 (or the current FW data received from the providing device 20) are valid. As a condition, the information received by the response receiving unit 60 is stored in the temporary storage unit 38. Specifically, the first verification unit 64 temporarily stores the ECU ID, FWID, new FW data, new FW MAC value, new FW version number, and new FW developer ID received from the providing device 20. 38. Further, the first verification unit 64 causes the temporary storage unit 38 to store the current FW data stored in the current FW data storage unit 201 (or the current FW data received from the providing device 20).

以上の構成により、中継装置26は、提供装置20から新FWデータを受信することができる。さらに、中継装置26は、現FWデータ記憶部201に記憶された現FWデータが正当であるか否かを判断することができる。また、中継装置26は、現FWデータ記憶部201に記憶された現FWデータが正当でない場合には、提供装置20から現FWデータを受信することができる。中継装置26は、受信した現FWデータが正当であるか否かを判断することができる。そして、中継装置26は、新FWデータおよび現FWデータが正当であることを条件として、一時記憶部38に新FWデータおよび現FWデータを記憶させることができる。   With the above configuration, the relay device 26 can receive new FW data from the providing device 20. Further, the relay device 26 can determine whether or not the current FW data stored in the current FW data storage unit 201 is valid. Further, when the current FW data stored in the current FW data storage unit 201 is not valid, the relay device 26 can receive the current FW data from the providing device 20. The relay device 26 can determine whether or not the received current FW data is valid. The relay device 26 can store the new FW data and the current FW data in the temporary storage unit 38 on condition that the new FW data and the current FW data are valid.

なお、要求送信部52は、ファームウェアの更新タイミングに関わらず(例えば定期的に)、現FWデータの送信を要求する取得要求を提供装置20に送信してもよい。これにより、取得部30は、予め正当な現FWデータを取得して現FWデータ記憶部201に記憶させておくことができる。なお、この場合、応答情報に含まれる更新フラグは、0となる。   Note that the request transmission unit 52 may transmit an acquisition request for requesting transmission of the current FW data to the providing apparatus 20 regardless of the firmware update timing (for example, periodically). Thereby, the acquisition unit 30 can acquire valid current FW data in advance and store it in the current FW data storage unit 201. In this case, the update flag included in the response information is 0.

また、この場合、第1検証部64は、提供装置20から受信した応答情報に含まれる現FWのMAC値と、管理データ記憶部34に記憶されている現FWのMAC値とが一致するか否かを判断してもよい。一致しない場合、現FWのMAC値を生成するために用いた共有鍵データが更新された可能性がある。従って、一致しない場合、第1検証部64は、MAC値が一致しない旨をユーザ等に通知する。これにより、第1検証部64は、共有鍵データの更新を促すことができる。   In this case, the first verification unit 64 also checks whether the MAC value of the current FW included in the response information received from the providing device 20 matches the MAC value of the current FW stored in the management data storage unit 34. It may be determined whether or not. If they do not match, the shared key data used to generate the MAC value of the current FW may have been updated. Therefore, if they do not match, the first verification unit 64 notifies the user or the like that the MAC values do not match. Thereby, the 1st verification part 64 can prompt the update of shared key data.

図27は、第4変形例に係る中継装置26による取得処理フローを示す図である。本変形例に係る取得部30は、図27に示す取得処理を実行する。   FIG. 27 is a diagram illustrating an acquisition processing flow by the relay device 26 according to the fourth modification. The acquisition unit 30 according to this modification executes the acquisition process shown in FIG.

まず、ステップS201において、取得部30は、何れかのファームウェアについて、予め定められたタイミングにおいて、新FWデータの取得要求を提供装置20に送信する。   First, in step S <b> 201, the acquisition unit 30 transmits a new FW data acquisition request to the providing apparatus 20 at a predetermined timing for any firmware.

提供装置20は、新FWデータの取得要求に応じて、対応するファームウェアについての応答情報を中継装置26に送信する。具体的には、提供装置20は、対応する新FWデータが存在しない場合、ECUID、FWID、および、値が0とされた更新フラグを含む応答情報を送信する。提供装置20は、新FWデータが存在する場合、ECUID、FWID、値が0以外とされた更新フラグ、新FWデータ、新FWのMAC値、新FWのバージョン番号および新FWの開発者IDを含む応答情報を送信する。   The providing device 20 transmits response information about the corresponding firmware to the relay device 26 in response to the acquisition request for new FW data. Specifically, when there is no corresponding new FW data, providing device 20 transmits response information including an ECU ID, an FWID, and an update flag whose value is 0. When the new FW data exists, the providing device 20 sets the ECU ID, the FWID, the update flag whose value is other than 0, the new FW data, the new FW MAC value, the new FW version number, and the new FW developer ID. Send response information including.

続いて、ステップS202において、取得部30は、応答情報を受信する。続いて、ステップS203において、取得部30は、応答情報に含まれる更新フラグが、0以外の値であるか否かを判断する。更新フラグが0である場合(S203のNo)、取得部30は、本フローを終了する。更新フラグが0以外の値である場合(S203のYes)、処理をステップS204に進める。   Subsequently, in step S202, the acquisition unit 30 receives response information. Subsequently, in step S203, the acquisition unit 30 determines whether or not the update flag included in the response information is a value other than zero. When the update flag is 0 (No in S203), the acquisition unit 30 ends this flow. If the update flag is a value other than 0 (Yes in S203), the process proceeds to step S204.

ステップS204において、取得部30は、受信した新FWデータが正当であるか否かを判断する。取得部30は、正当である場合(S204のYes)、処理をステップS206に進め、正当でない場合(S204のNo)、処理をステップS205に進める。   In step S204, the acquisition unit 30 determines whether the received new FW data is valid. If the acquisition unit 30 is valid (Yes in S204), the process proceeds to step S206. If the acquisition unit 30 is not valid (No in S204), the process proceeds to step S205.

ステップS205において、取得部30は、新FWデータが正当ではなかった回数(エラー回数)が、一定回数以上であるか否かを判断する。エラー回数が一定回数未満である場合(S205のNo)、取得部30は、処理をステップS201に戻す。エラー回数が一定回数以上である場合(S205のYes)、取得部30は、本フローを終了する。   In step S205, the acquisition unit 30 determines whether or not the number of times that the new FW data is not valid (number of errors) is equal to or greater than a certain number. When the number of errors is less than the predetermined number (No in S205), the acquisition unit 30 returns the process to step S201. When the number of errors is equal to or greater than the predetermined number (Yes in S205), the acquisition unit 30 ends this flow.

ステップS206において、取得部30は、現FWデータ記憶部201に記憶された現FWデータが正当であるか否かを判断する。取得部30は、正当である場合(S206のYes)、処理をステップS211に進め、正当でない場合(S206のNo)、処理をステップS207に進める。   In step S206, the acquisition unit 30 determines whether the current FW data stored in the current FW data storage unit 201 is valid. If the acquisition unit 30 is valid (Yes in S206), the process proceeds to step S211. If the acquisition unit 30 is not valid (No in S206), the process proceeds to step S207.

ステップS207において、取得部30は、同一のファームウェアについて、現FWデータの取得要求を提供装置20に送信する。提供装置20は、現FWデータの取得要求に応じて、対応するファームウェアについての応答情報を中継装置26に送信する。具体的には、提供装置20は、ECUID、FWID、値が0以外とされた更新フラグ、現FWデータ、現FWのMAC値、現FWのバージョン番号および現FWの開発者IDを含む応答情報を送信する。   In step S207, the acquisition unit 30 transmits an acquisition request for the current FW data to the providing apparatus 20 for the same firmware. The providing device 20 transmits response information about the corresponding firmware to the relay device 26 in response to the acquisition request for the current FW data. Specifically, the providing device 20 responds including an ECU ID, an FWID, an update flag whose value is other than 0, the current FW data, the MAC value of the current FW, the version number of the current FW, and the developer ID of the current FW. Send.

続いて、ステップS208において、取得部30は、応答情報を受信する。ステップS209において、取得部30は、受信した現FWデータが正当であるか否かを判断する。取得部30は、正当である場合(S209のYes)、処理をステップS211に進め、正当でない場合(S209のNo)、処理をステップS210に進める。   Subsequently, in step S208, the acquisition unit 30 receives the response information. In step S209, the acquisition unit 30 determines whether the received current FW data is valid. If the acquisition unit 30 is valid (Yes in S209), the process proceeds to step S211. If the acquisition unit 30 is not valid (No in S209), the process proceeds to step S210.

ステップS210において、取得部30は、現FWデータが正当ではなかった回数(エラー回数)が、一定回数以上であるか否かを判断する。エラー回数が一定回数未満である場合(S210のNo)、取得部30は、処理をステップS207に戻す。エラー回数が一定回数以上である場合(S210のYes)、取得部30は、本フローを終了する。   In step S210, the acquisition unit 30 determines whether or not the number of times that the current FW data is invalid (number of errors) is equal to or greater than a certain number. When the number of errors is less than the predetermined number (No in S210), the acquisition unit 30 returns the process to step S207. When the number of errors is equal to or greater than the predetermined number (Yes in S210), the acquisition unit 30 ends this flow.

ステップS211において、取得部30は、提供装置20から受信したECUID、FWID、新FWデータ、新FWのMAC値、新FWのバージョン番号および新FWの開発者IDを、一時記憶部38に書き込む。さらに、取得部30は、現FWデータ記憶部201に記憶された現FWデータ、または、提供装置20から受信した現FWデータを、一時記憶部38に書き込む。   In step S211, the acquisition unit 30 writes the ECU ID, FWID, new FW data, the new FW MAC value, the new FW version number, and the new FW developer ID received from the providing device 20 in the temporary storage unit 38. Further, the acquisition unit 30 writes the current FW data stored in the current FW data storage unit 201 or the current FW data received from the providing device 20 in the temporary storage unit 38.

ステップS211を終えると、取得部30は、本フローを終了する。この場合、取得部30は、正当な現FWデータまたは新FWデータを受信できている。   When step S211 is completed, the acquisition unit 30 ends this flow. In this case, the acquisition unit 30 can receive valid current FW data or new FW data.

図28は、第4変形例に係る中継装置26および電子制御装置24の機能構成を示す図である。   FIG. 28 is a diagram illustrating a functional configuration of the relay device 26 and the electronic control device 24 according to the fourth modification.

確定部100は、更新処理において電子制御装置24に書き込まれた新FWデータが正当である旨の通知を受けた場合、一時記憶部38に記憶されている新FWデータを読み出す。そして、確定部100は、読み出した新FWデータを現FWデータ記憶部201に転送して、現FWデータ記憶部201に書き込む。すなわち、確定部100は、更新処理が成功した場合、電子制御装置24に送信した新FWデータを、現FWデータとして現FWデータ記憶部201に書き込む。   When the confirmation unit 100 receives a notification that the new FW data written in the electronic control unit 24 is valid in the update process, the confirmation unit 100 reads the new FW data stored in the temporary storage unit 38. Then, the determination unit 100 transfers the read new FW data to the current FW data storage unit 201 and writes the new FW data in the current FW data storage unit 201. That is, when the update process is successful, the determination unit 100 writes the new FW data transmitted to the electronic control device 24 in the current FW data storage unit 201 as the current FW data.

また、第2検証部98は、更新処理において電子制御装置24に書き込まれた新FWデータが正当ではないと判断した場合、更新処理が失敗したことを、データ送信部84に通知する。データ送信部84は、更新処理が失敗した場合、一時記憶部38に記憶されている現FWデータを電子制御装置24に送信して、電子制御装置24に現FWデータを復元させる。すなわち、データ送信部84は、現FWデータ記憶部201に記憶されている正当である現FWデータを電子制御装置24に送信して、電子制御装置24に現FWデータを復元させる。また、現FWデータ記憶部201に記憶されている現FWデータが正当でなかった場合、データ送信部84は、提供装置20から受信した正当である現FWデータを電子制御装置24に送信して、電子制御装置24に現FWデータを復元させる。   If the second verification unit 98 determines that the new FW data written in the electronic control unit 24 is not valid in the update process, the second verification unit 98 notifies the data transmission unit 84 that the update process has failed. When the update process fails, the data transmission unit 84 transmits the current FW data stored in the temporary storage unit 38 to the electronic control device 24 to cause the electronic control device 24 to restore the current FW data. That is, the data transmission unit 84 transmits valid current FW data stored in the current FW data storage unit 201 to the electronic control device 24, and causes the electronic control device 24 to restore the current FW data. If the current FW data stored in the current FW data storage unit 201 is not valid, the data transmission unit 84 transmits the current FW data received from the providing device 20 to the electronic control unit 24. The electronic control unit 24 restores the current FW data.

また、確定部100は、復元処理において電子制御装置24に書き込まれた現FWデータが正当である旨の通知を受けた場合、一時記憶部38に記憶されている現FWデータを読み出す。そして、確定部100は、読み出した現FWデータを現FWデータ記憶部201に転送して、現FWデータ記憶部201に書き込む。すなわち、確定部100は、復元処理が成功した場合、電子制御装置24に送信した現FWデータを現FWデータ記憶部201に書き込む。   Further, when receiving the notification that the current FW data written in the electronic control unit 24 is valid in the restoration process, the determination unit 100 reads the current FW data stored in the temporary storage unit 38. Then, the determination unit 100 transfers the read current FW data to the current FW data storage unit 201 and writes the current FW data in the current FW data storage unit 201. That is, when the restoration process is successful, the determination unit 100 writes the current FW data transmitted to the electronic control device 24 in the current FW data storage unit 201.

このような本変形例に係る中継装置26は、電子制御装置24に記憶された現FWデータを、新FWデータに更新することができる。また、中継装置26は、更新処理において電子制御装置24に書き込まれた新FWデータが正当ではない場合には、現FWデータ記憶部201に記憶されている正当な現FWデータにより、電子制御装置24に記憶された現FWデータを復元することができる。さらに、現FWデータ記憶部201に記憶されている現FWデータが正当でなかった場合にも、中継装置26は、提供装置20から受信した正当な現FWデータにより、電子制御装置24に記憶された現FWデータを復元することができる。   The relay device 26 according to this modification example can update the current FW data stored in the electronic control device 24 to new FW data. In addition, when the new FW data written in the electronic control unit 24 in the update process is not valid, the relay device 26 uses the valid current FW data stored in the current FW data storage unit 201 to update the electronic control unit. The current FW data stored in 24 can be restored. Further, even when the current FW data stored in the current FW data storage unit 201 is not valid, the relay device 26 is stored in the electronic control device 24 by the valid current FW data received from the providing device 20. The current FW data can be restored.

図29は、第4変形例に係る中継装置26による更新処理フローを示す図である。本変形例に係る更新部32は、図29に示す更新処理を実行する。   FIG. 29 is a diagram illustrating an update process flow by the relay device 26 according to the fourth modification. The update unit 32 according to this modification executes the update process shown in FIG.

本変形例に係る更新部32は、図12に示したフローと比較して、S221およびS222の処理をさらに実行する点において異なる。   The update unit 32 according to this modification is different from the flow illustrated in FIG. 12 in that the processes of S221 and S222 are further executed.

更新部32は、ステップS50の後、処理をS221に進める。S221において、更新部32は、一時記憶部38に記憶されている新FWデータを読み出して、読み出した新FWデータを、現FWデータとして現FWデータ記憶部201に書き込む。更新部32は、S221を終えると、処理をS51に進める。   The update part 32 advances a process to S221 after step S50. In S221, the update unit 32 reads the new FW data stored in the temporary storage unit 38, and writes the read new FW data in the current FW data storage unit 201 as the current FW data. After completing S221, the update unit 32 advances the process to S51.

また、更新部32は、S54で復元処理において電子制御装置24に書き込まれた現FWデータが正当であると判断した場合(S54のYes)、処理をステップS222に進める。S222において、更新部32は、一時記憶部38に記憶されている現FWデータを読み出して、読み出した現FWデータを、現FWデータ記憶部201に書き込む。更新部32は、S222を終えると、処理をS51に進める。   If the update unit 32 determines in S54 that the current FW data written in the electronic control unit 24 in the restoration process is valid (Yes in S54), the process proceeds to step S222. In S <b> 222, the update unit 32 reads the current FW data stored in the temporary storage unit 38 and writes the read current FW data in the current FW data storage unit 201. After completing S222, the update unit 32 advances the process to S51.

以上のように、第4変形例に係る中継装置26は、電子制御装置24に書き込まれた現FWデータを現FWデータ記憶部201に記憶しておき、新FWデータへの更新処理が失敗した場合、現FWデータ記憶部201に記憶された現FWデータを用いて復元処理をすることができる。これにより、第4変形例に係る中継装置26によれば、提供装置20との通信量を減らすことができる。また、第4変形例に係るネットワークシステム10は、中継装置26が現FWデータを記憶するので、それぞれの電子制御装置24がファームェアをバックアップするためのメモリを備えなくてよい。従って、第4変形例に係るネットワークシステム10によれば、コストを小さくすることができる。   As described above, the relay device 26 according to the fourth modification stores the current FW data written in the electronic control device 24 in the current FW data storage unit 201, and the update process to the new FW data has failed. In this case, the restoration process can be performed using the current FW data stored in the current FW data storage unit 201. Thereby, according to the relay apparatus 26 which concerns on a 4th modification, the communication amount with the provision apparatus 20 can be reduced. Further, in the network system 10 according to the fourth modified example, since the relay device 26 stores the current FW data, each electronic control device 24 may not include a memory for backing up the firmware. Therefore, according to the network system 10 according to the fourth modification, the cost can be reduced.

なお、更新部32は、書き込まれた新FWデータが正当でない場合、現FWデータを電子制御装置24に書き込む復元処理を実行する。しかし、更新部32は、復元処理を一定回数以上失敗する可能性もある。現FWデータ記憶部201は、復元処理が失敗した状況を解析するためのファームウェア、電子制御装置24を最低限の機能で動作させるためのファームウェア、または、これらの両者の機能を有するファームウェアを記憶してもよい。そして、更新部32は、復元処理を一定回数以上失敗した場合、このようなファームウェアを電子制御装置24に送信して、電子制御装置24に記憶させてもよい。   Note that when the new FW data written is not valid, the update unit 32 executes a restoration process for writing the current FW data into the electronic control unit 24. However, the update unit 32 may fail the restoration process more than a certain number of times. The current FW data storage unit 201 stores firmware for analyzing a situation where the restoration process has failed, firmware for operating the electronic control unit 24 with minimum functions, or firmware having both functions. May be. The update unit 32 may transmit such firmware to the electronic control device 24 and store the firmware in the electronic control device 24 when the restoration process has failed a certain number of times.

また、電子制御装置24は、ファームウェアを更新するためのプログラムを、例えばブートローダ等を記憶したROM領域に、ファームウェアとは別個に記憶してもよい。そして、電子制御装置24は、このプログラムを実行することにより、更新処理および復元処理を実行してもよい。これにより、電子制御装置24は、更新処理中の電源遮断等により再起動された場合、または、上書きしたファームウェアが異常であった場合等に、ファームウェアを更新するためのプログラムに不具合が生じる可能性を少なくすることができる。   Further, the electronic control unit 24 may store a program for updating the firmware separately from the firmware in, for example, a ROM area storing a boot loader or the like. Then, the electronic control unit 24 may execute update processing and restoration processing by executing this program. As a result, when the electronic control unit 24 is restarted due to a power shutdown or the like during the update process, or when the overwritten firmware is abnormal, there is a possibility that a problem occurs in the program for updating the firmware. Can be reduced.

また、中継装置26は、提供装置20等にファームウェアの更新結果等を通知する場合、電子制御装置24と提供装置20とが共有する鍵により算出したMAC値を付加してもよい。これにより、提供装置20は、それぞれの電子制御装置24の更新結果を安全に取得することができる。   When the relay device 26 notifies the providing device 20 or the like of the firmware update result or the like, the relay device 26 may add a MAC value calculated using a key shared by the electronic control device 24 and the providing device 20. Thereby, the providing device 20 can safely acquire the update result of each electronic control device 24.

(第5変形例)
図30は、第5変形例に係る提供装置20および中継装置26の機能構成を示す図である。なお、第5変形例は、第4変形例をさらに変形した構成であるが、図1から図14を参照して説明したネットワークシステム10、第1変形例、第2変形例および第3変形例に適用されてもよい。
(5th modification)
FIG. 30 is a diagram illustrating a functional configuration of the providing device 20 and the relay device 26 according to the fifth modification. The fifth modification is a configuration obtained by further modifying the fourth modification. However, the network system 10, the first modification, the second modification, and the third modification described with reference to FIGS. 1 to 14 are used. May be applied.

中継装置26は、新FWデータ生成部211(新データ生成部)をさらに備える。   The relay device 26 further includes a new FW data generation unit 211 (new data generation unit).

提供情報記憶部50は、ファームウェアのそれぞれのバージョンについて、差分データをさらに記憶する。差分データは、当該バージョンの実体データから、直前のバージョンの実体データを除いたデータである。   The provided information storage unit 50 further stores difference data for each version of firmware. The difference data is data obtained by subtracting the previous version of the entity data from the version of the entity data.

応答送信部58は、新FWデータの取得要求を受信した場合であって且つ新FWデータが存在する場合、新FWデータに代えて、新FWの差分データを含む応答情報を送信する。すなわち、応答受信部60は、新FWデータの取得要求を送信した場合であって且つ新FWデータが存在する場合、ECUID、FWID、更新フラグ、新FWの差分データ、新FWのMAC値、新FWのバージョン番号および新FWの開発者IDを含む応答情報を受信する。   The response transmission unit 58 transmits response information including differential data of the new FW instead of the new FW data when the new FW data acquisition request is received and the new FW data exists. That is, when the response reception unit 60 transmits a request for acquiring new FW data and there is new FW data, the ECU ID, the FWID, the update flag, the difference data of the new FW, the MAC value of the new FW, Response information including the version number of the FW and the developer ID of the new FW is received.

新FWデータ生成部211は、新FWデータの取得要求を送信した場合であって且つ新FWデータが存在する場合、新FWデータを生成する。具体的には、新FWデータ生成部211は、応答情報に含まれる差分データと、現FWデータ記憶部201に記憶されている現FWデータとに基づき、新FWデータを生成する。   The new FW data generation unit 211 generates new FW data when a new FW data acquisition request is transmitted and there is new FW data. Specifically, the new FW data generation unit 211 generates new FW data based on the difference data included in the response information and the current FW data stored in the current FW data storage unit 201.

第1検証値生成部62は、新FWデータの取得要求を送信した場合、新FWデータ生成部211により生成された新FWデータについて、MAC値(第4検証値)を算出する。   When the first verification value generation unit 62 transmits an acquisition request for new FW data, the first verification value generation unit 62 calculates a MAC value (fourth verification value) for the new FW data generated by the new FW data generation unit 211.

第1検証部64は、提供装置20から受信した差分データに基づき生成された新FWデータが正当であるか否かを判断する。具体的には、第1検証部64は、提供装置20から受信した第3検証値と、共有鍵データと新FWデータ生成部211が生成した新FWデータとにより算出された第4検証値とが一致する場合に、提供装置20から受信した差分データに基づき生成された新FWデータが正当であると判断する。   The first verification unit 64 determines whether the new FW data generated based on the difference data received from the providing device 20 is valid. Specifically, the first verification unit 64 includes the third verification value received from the providing device 20, the fourth verification value calculated from the shared key data and the new FW data generated by the new FW data generation unit 211. Are matched, it is determined that the new FW data generated based on the difference data received from the providing device 20 is valid.

第1検証部64は、提供装置20から受信した差分データに基づき生成した新FWデータ、および、現FWデータ記憶部201に記憶された現FWデータが正当であることを条件として、応答受信部60が受信した情報等を一時記憶部38に記憶させる。   The first verification unit 64 is a response reception unit provided that the new FW data generated based on the difference data received from the providing device 20 and the current FW data stored in the current FW data storage unit 201 are valid. Information received by 60 is stored in the temporary storage unit 38.

以上のように、本変形例に係る中継装置26は、新FWデータに代えて、差分データを提供装置20から受信する。これにより、中継装置26は、提供装置20から受信するデータ量を少なくすることができる。   As described above, the relay device 26 according to the present modification receives difference data from the providing device 20 instead of the new FW data. Thereby, the relay apparatus 26 can reduce the amount of data received from the providing apparatus 20.

(第6変形例)
図31は、第6変形例に係る中継装置26の機能構成を示す図である。なお、第6変形例は、第4変形例をさらに変形した構成であるが、図1から図14を参照して説明したネットワークシステム10、第1変形例、第2変形例、第3変形例および第5変形例に適用されてもよい。
(Sixth Modification)
FIG. 31 is a diagram illustrating a functional configuration of the relay device 26 according to the sixth modification. The sixth modification has a configuration obtained by further modifying the fourth modification. However, the network system 10 described with reference to FIGS. 1 to 14, the first modification, the second modification, and the third modification. And it may be applied to the fifth modification.

第6変形例に係る中継装置26は、制御対象システム22が有する複数の電子制御装置24のファームウェアを協調して更新する。中継装置26は、システム情報記憶部221をさらに備える。システム情報記憶部221は、システム情報を記憶する。   The relay device 26 according to the sixth modified example updates the firmware of the plurality of electronic control devices 24 included in the control target system 22 in a coordinated manner. The relay device 26 further includes a system information storage unit 221. The system information storage unit 221 stores system information.

取得部30は、提供装置20から、制御対象システム22が有する複数の電子制御装置24のうちの、更新対象の少なくとも1つの電子制御装置24についての新FWデータ等を受信する。更新部32は、提供装置20から受信したそれぞれの新FWデータを対応する電子制御装置24に送信して、対応する電子制御装置24に現FWデータを新FWデータに更新させる。   The acquisition unit 30 receives new FW data or the like for at least one electronic control device 24 to be updated among the plurality of electronic control devices 24 included in the control target system 22 from the providing device 20. The update unit 32 transmits each new FW data received from the providing device 20 to the corresponding electronic control device 24, and causes the corresponding electronic control device 24 to update the current FW data to the new FW data.

また、更新部32は、何れかの1つの電子制御装置24において更新処理が失敗した場合、更新対象であった全ての電子制御装置24に現FWデータを送信して、それぞれの電子制御装置24に現FWデータを復元させる。   Further, when the update process fails in any one of the electronic control devices 24, the update unit 32 transmits the current FW data to all the electronic control devices 24 that are the update targets, and each of the electronic control devices 24. To restore the current FW data.

図32は、システム情報記憶部221に記憶されるシステム情報の内容を示す図である。システム情報記憶部221は、図32に示すシステム情報を記憶する。   FIG. 32 is a diagram showing the contents of the system information stored in the system information storage unit 221. The system information storage unit 221 stores the system information shown in FIG.

システム情報は、システム識別子およびシステムバージョン情報を含む。システム識別子は、制御対象システム22が有する複数の電子制御装置24の組を識別する情報である。制御対象システム22が車両であれば、車両の種別を識別する情報であってよい。例えば、提供装置20は、システム識別子に基づき、制御対象システム22が有する複数の電子制御装置24を特定することができる。   The system information includes a system identifier and system version information. The system identifier is information for identifying a set of a plurality of electronic control devices 24 included in the control target system 22. If the control target system 22 is a vehicle, it may be information for identifying the type of the vehicle. For example, the providing device 20 can specify a plurality of electronic control devices 24 included in the control target system 22 based on the system identifier.

システムバージョン情報は、システムリストのバージョンを表す。システムバージョン情報は、システムリストが新しくなる毎に大きくなる数値または文字であってよい。   The system version information represents the version of the system list. The system version information may be a numerical value or a character that increases each time the system list is updated.

システムリストは、制御対象システム22が有する複数の電子制御装置24のそれぞれに記憶されている現FWデータのバージョンの組を表す。例えば、システムリストは、ECUIDとFWIDとFWデータのバージョン番号との組を含むリストであってよい。   The system list represents a set of versions of the current FW data stored in each of the plurality of electronic control devices 24 included in the control target system 22. For example, the system list may be a list including a set of ECU ID, FWID, and version number of FW data.

図33は、第6変形例に係る提供装置20および中継装置26の機能構成を示す図である。提供情報記憶部50は、システムリストをバージョン毎に記憶する。   FIG. 33 is a diagram illustrating a functional configuration of the providing device 20 and the relay device 26 according to the sixth modification. The provided information storage unit 50 stores a system list for each version.

例えば、制御対象システム22が有する複数の電子制御装置24のうち、ある1つの電子制御装置24のファームウェアのバージョンが更新されても、他の電子制御装置24もファームウェアが更新されていなければ、安定して動作しない場合がある。システムリストは、このような不安定な動作をしないように保証されたファームウェアのバージョンの組を表す。また、システムリストは、適宜、バージョンが更新される。システムリストは、それぞれのバージョン毎にバージョン番号が割り当てられている。   For example, even if the firmware version of one electronic control device 24 among a plurality of electronic control devices 24 included in the control target system 22 is updated, the other electronic control device 24 is stable unless the firmware is updated. May not work. The system list represents a set of firmware versions that are guaranteed not to perform such an unstable operation. The version of the system list is updated as appropriate. The system list is assigned a version number for each version.

要求送信部52は、予め定められた更新タイミングで(例えば定期的に)、新FWデータの取得要求に代えて、一括取得要求を、提供装置20に送信する。一括取得要求は、システム情報記憶部221に記憶されたシステム識別子とシステムバージョン情報とを含む。   The request transmission unit 52 transmits a collective acquisition request to the providing apparatus 20 instead of the acquisition request for new FW data at a predetermined update timing (for example, periodically). The collective acquisition request includes the system identifier and system version information stored in the system information storage unit 221.

特定部56は、提供情報記憶部50から一括取得要求を受信した場合、一括取得要求に含まれるシステムバージョン情報により特定されるバージョンよりも新しいバージョンのシステムリストが提供されているかを判断する。新しいバージョンのシステムリストが提供されている場合、特定部56は、バージョンを更新すべき更新対象の少なくとも1つのファームウェアを特定する。具体的には、特定部56は、新しいバージョンのシステムリストにおいて、現在のバージョンのシステムリストから、バージョンが更新されているファームウェアを特定する。   When receiving the batch acquisition request from the provision information storage unit 50, the specifying unit 56 determines whether a system list of a version newer than the version specified by the system version information included in the batch acquisition request is provided. When a system list of a new version is provided, the specifying unit 56 specifies at least one firmware to be updated whose version is to be updated. Specifically, in the new version system list, the specifying unit 56 specifies the firmware whose version has been updated from the system list of the current version.

応答送信部58は、新しいバージョンのシステムリストが存在しない場合、システム識別子および更新フラグを含む応答情報を送信する。応答送信部58は、新しいバージョンのシステムリストが存在する場合、更新フラグ、並びに、特定された更新対象のファームウェアのそれぞれについての新FWデータ等を含む応答情報を送信する。なお、更新フラグは、新しいバージョンのシステムリストが存在しない場合には0、新しいバージョンのシステムリストが存在する場合には0以外の値となる。   When there is no new version of the system list, the response transmitter 58 transmits response information including a system identifier and an update flag. When a new version of the system list exists, the response transmission unit 58 transmits response information including an update flag and new FW data for each of the identified firmware to be updated. The update flag has a value of 0 when a new version of the system list does not exist and a value other than 0 when a new version of the system list exists.

応答受信部60は、新しいバージョンのシステムリストが存在しない場合、システム識別子および更新フラグを含む応答情報を受信する。応答受信部60は、新しいバージョンのシステムリストが存在する場合、更新フラグ、並びに、特定された更新対象のファームウェアのそれぞれについての新FWデータ等を含む応答情報を受信する。   When there is no new version of the system list, the response receiving unit 60 receives response information including a system identifier and an update flag. When there is a new version of the system list, the response receiving unit 60 receives response information including an update flag and new FW data for each of the identified firmware to be updated.

第1検証値生成部62は、更新対象のファームウェアのそれぞれについて、新FWデータのMAC値(第4検証値)を算出する。また、第1検証値生成部62は、更新対象のファームウェアのそれぞれについて、現FWデータ記憶部201に記憶された現FWデータのMAC値(第10検証値)を算出する。   The first verification value generation unit 62 calculates the MAC value (fourth verification value) of the new FW data for each firmware to be updated. Further, the first verification value generation unit 62 calculates the MAC value (tenth verification value) of the current FW data stored in the current FW data storage unit 201 for each of the firmware to be updated.

第1検証部64は、更新対象のファームウェアのそれぞれについて、提供装置20から受信した新FWデータが正当であるか否かを判断する。また、第1検証部64は、更新対象のファームウェアのそれぞれについて、現FWデータ記憶部201に記憶された現FWデータが正当であるか否かを判断する。   The first verification unit 64 determines whether or not the new FW data received from the providing device 20 is valid for each firmware to be updated. The first verification unit 64 determines whether the current FW data stored in the current FW data storage unit 201 is valid for each firmware to be updated.

第1検証部64は、更新対象のファームウェアのそれぞれについて、提供装置20から受信した新FWデータ、および、現FWデータ記憶部201に記憶された現FWデータが正当であることを条件として、応答受信部60が受信した情報等を一時記憶部38に記憶させる。具体的には、第1検証部64は、更新対象のファームウェアのそれぞれについて、提供装置20から受信した、ECUID、FWID、新FWデータ、新FWのMAC値、新FWのバージョン番号、新FWの開発者IDを、一時記憶部38に記憶させる。さらに、第1検証部64は、更新対象のファームウェアのそれぞれについて、現FWデータ記憶部201に記憶された現FWデータを、一時記憶部38に記憶させる。   The first verification unit 64 responds to each update target firmware on the condition that the new FW data received from the providing device 20 and the current FW data stored in the current FW data storage unit 201 are valid. Information received by the receiving unit 60 is stored in the temporary storage unit 38. Specifically, for each firmware to be updated, the first verification unit 64 receives the ECU ID, FWID, new FW data, new FW MAC value, new FW version number, and new FW version received from the providing device 20. The developer ID is stored in the temporary storage unit 38. Further, the first verification unit 64 causes the temporary storage unit 38 to store the current FW data stored in the current FW data storage unit 201 for each firmware to be updated.

以上の構成により、中継装置26は、更新対象のファームウェアのそれぞれについて、一括して、提供装置20から新FWデータを受信することができる。さらに、中継装置26は、更新対象のファームウェアのそれぞれについて、受信した新FWデータ、および、現FWデータ記憶部201に記憶された現FWデータが正当であるか否かを、一括して判断することができる。   With the above configuration, the relay device 26 can receive new FW data from the providing device 20 for each piece of firmware to be updated. Further, the relay device 26 collectively determines whether the received new FW data and the current FW data stored in the current FW data storage unit 201 are valid for each of the firmware to be updated. be able to.

なお、第1検証部64は、提供装置20から受信した何れかの新FWデータが正当でない場合、要求送信部52に対して、その新FWデータの取得要求を送信させてもよい。そして、第1検証部64は、一定回数、同一の取得要求を送信しても新FWデータが正当ではない場合、更新対象の全てのファームウェアについて、取得処理を終了する。   The first verification unit 64 may cause the request transmission unit 52 to transmit an acquisition request for the new FW data when any of the new FW data received from the providing device 20 is not valid. If the new FW data is not valid even if the same acquisition request is transmitted a certain number of times, the first verification unit 64 ends the acquisition process for all the firmware to be updated.

また、第1検証部64は、現FWデータ記憶部201に記憶された現FWデータが正当でない場合、要求送信部52に対して、現FWデータの取得要求を送信させてもよい。そして、第1検証部64は、一定回数、同一の取得要求を送信しても現FWデータが正当ではない場合、更新対象の全てのファームウェアについて、取得処理を終了する。   In addition, when the current FW data stored in the current FW data storage unit 201 is not valid, the first verification unit 64 may cause the request transmission unit 52 to transmit an acquisition request for the current FW data. Then, if the current FW data is not valid even if the same acquisition request is transmitted a fixed number of times, the first verification unit 64 ends the acquisition process for all firmware to be updated.

図34は、第6変形例に係る中継装置26による取得処理フローを示す図である。本変形例に係る取得部30は、図34に示す取得処理を実行する。   FIG. 34 is a diagram illustrating an acquisition processing flow by the relay device 26 according to the sixth modification. The acquisition unit 30 according to this modification executes the acquisition process shown in FIG.

まず、ステップS231において、取得部30は、予め定められたタイミングにおいて、一括取得要求を提供装置20に送信する。   First, in step S231, the acquisition unit 30 transmits a batch acquisition request to the providing apparatus 20 at a predetermined timing.

提供装置20は、一括取得要求に応じて、対応する応答情報を中継装置26に送信する。提供装置20は、新しいバージョンのシステムリストが提供されていない場合には、値が0とされた更新フラグを含む応答情報を送信する。また、提供装置20は、新しいバージョンのシステムリストが提供されている場合には、値が0以外とされた更新フラグ、および、更新対象のファームウェアのそれぞれについての新FWデータ等を含む応答情報を送信する。   The providing device 20 transmits corresponding response information to the relay device 26 in response to the collective acquisition request. If the new version of the system list is not provided, the providing apparatus 20 transmits response information including an update flag having a value of 0. Further, when a new version of the system list is provided, the providing apparatus 20 sends response information including an update flag whose value is other than 0 and new FW data for each firmware to be updated. Send.

続いて、ステップS232において、取得部30は、応答情報を受信する。続いて、ステップS233において、取得部30は、応答情報に含まれる更新フラグが、0以外の値であるか否かを判断する。更新フラグが0である場合(S233のNo)、取得部30は、本フローを終了する。更新フラグが0以外の値である場合(S233のYes)、処理をステップS234に進める。   Subsequently, in step S232, the acquisition unit 30 receives response information. Subsequently, in step S233, the acquisition unit 30 determines whether or not the update flag included in the response information is a value other than zero. When the update flag is 0 (No in S233), the acquisition unit 30 ends this flow. If the update flag is a value other than 0 (Yes in S233), the process proceeds to step S234.

S234において、取得部30は、更新対象のファームウェアのうちの1つを検証対象のファームウェアとして特定する。続いて、ステップS235において、取得部30は、検証対象のファームウェアについて、新FWデータが正当であるか否かを判断する。取得部30は、正当である場合(S235のYes)、処理をステップS236に進め、正当でない場合(S235のNo)、本フローを終了する。   In S234, the acquisition unit 30 identifies one of the update target firmware as the verification target firmware. Subsequently, in step S235, the acquisition unit 30 determines whether the new FW data is valid for the firmware to be verified. If the acquisition unit 30 is valid (Yes in S235), the process proceeds to step S236. If the acquisition unit 30 is not valid (No in S235), the flow ends.

ステップS236において、取得部30は、検証対象のファームウェアについて、現FWデータ記憶部201に記憶された現FWデータが正当であるか否かを判断する。取得部30は、正当である場合(S236のYes)、処理をステップS237に進め、正当でない場合(S236のNo)、本フローを終了する。   In step S236, the acquisition unit 30 determines whether or not the current FW data stored in the current FW data storage unit 201 is valid for the firmware to be verified. If the acquisition unit 30 is valid (Yes in S236), the process proceeds to step S237. If the acquisition unit 30 is not valid (No in S236), the flow ends.

ステップS237において、取得部30は、検証対象のファームウェアについて、提供装置20から受信した新FWデータ等を一時記憶部38に書き込む。さらに、取得部30は、検証対象のファームウェアについて、現FWデータ記憶部201に記憶された現FWデータを一時記憶部38に書き込む。   In step S237, the acquisition unit 30 writes new FW data and the like received from the providing device 20 in the temporary storage unit 38 for the firmware to be verified. Further, the acquisition unit 30 writes the current FW data stored in the current FW data storage unit 201 into the temporary storage unit 38 for the firmware to be verified.

続いて、ステップS238において、取得部30は、更新対象の全てのファームウェアを検証したか否かを判断する。まだ全てを検証していない場合には(S238のNo)、取得部30は、処理をS234に戻し、他のファームウェアを検証対象として特定して処理を続ける。全てを検証した場合には(S238のYes)、取得部30は、本フローを終了する。   Subsequently, in step S238, the acquisition unit 30 determines whether or not all firmware to be updated has been verified. If not all have been verified yet (No in S238), the acquisition unit 30 returns the process to S234, specifies another firmware as the verification target, and continues the process. When all are verified (Yes in S238), the acquisition unit 30 ends this flow.

図35は、第6変形例に係る中継装置26および電子制御装置24の機能構成を示す図である。   FIG. 35 is a diagram illustrating a functional configuration of the relay device 26 and the electronic control device 24 according to the sixth modification.

開始検知部78は、更新対象のファームウェアを記憶するそれぞれの電子制御装置24が、更新可能か否かを判断する。開始検知部78は、更新対象のファームウェアを記憶するそれぞれの電子制御装置24が全て更新可能である場合、開始送信部80およびデータ送信部84に開始指示を与える。   The start detection unit 78 determines whether or not each electronic control unit 24 that stores the firmware to be updated can be updated. The start detection unit 78 gives a start instruction to the start transmission unit 80 and the data transmission unit 84 when all of the electronic control devices 24 that store the firmware to be updated can be updated.

開始送信部80は、開始指示を受け取ると、更新対象のファームウェアを記憶するそれぞれの電子制御装置24に更新開始を示す情報を送信する。   When the start transmission unit 80 receives the start instruction, the start transmission unit 80 transmits information indicating the start of update to each electronic control unit 24 that stores the firmware to be updated.

データ送信部84は、開始検知部78から開始指示を受け取ると、更新対象のファームウェアを記憶するそれぞれの電子制御装置24に、提供装置20から受信した対応する新FWデータを電子制御装置24に送信して、電子制御装置24に記憶されている現FWデータを新FWデータに更新させる。   When the data transmission unit 84 receives the start instruction from the start detection unit 78, the data transmission unit 84 transmits the corresponding new FW data received from the providing device 20 to each electronic control device 24 that stores the firmware to be updated, to the electronic control device 24. Then, the current FW data stored in the electronic control unit 24 is updated to new FW data.

検証値受信部96は、更新対象のファームウェアを記憶するそれぞれの電子制御装置24から、更新処理においてデータ記憶部70に書き込まれた新FWデータを検証するためのMAC値を受信する。   The verification value receiving unit 96 receives a MAC value for verifying the new FW data written in the data storage unit 70 in the update process from each electronic control unit 24 that stores the firmware to be updated.

第2検証部98は、更新対象のファームウェアのそれぞれについて、更新処理において電子制御装置24に書き込まれた新FWデータが正当であるか否かを検証する。第2検証部98は、更新対象のファームウェアのそれぞれについて、更新処理において電子制御装置24に書き込まれた新FWデータが正当であると判断した場合、確定部100および通知部102に通知する。   The second verification unit 98 verifies whether or not the new FW data written in the electronic control unit 24 in the update process is valid for each firmware to be updated. When the second verification unit 98 determines that the new FW data written in the electronic control device 24 in the update process is valid for each firmware to be updated, the second verification unit 98 notifies the determination unit 100 and the notification unit 102.

確定部100は、更新対象のファームウェアのそれぞれについて、更新処理において電子制御装置24に書き込まれた新FWデータが正当である旨の通知を受けた場合、一時記憶部38に記憶されている情報を読み出して、管理データ記憶部34に記憶させる。   When the confirmation unit 100 receives notification that the new FW data written in the electronic control unit 24 is valid in the update process for each of the firmware to be updated, the determination unit 100 displays the information stored in the temporary storage unit 38. The data is read and stored in the management data storage unit 34.

通知部102は、更新対象のファームウェアの全てについて、第2検証部98から新FWデータが正当である旨の通知を受けた場合、他の電子制御装置24および更新対象の電子制御装置24に、ファームウェアの更新を完了したことを示す情報を送信する。   When the notification unit 102 receives notification from the second verification unit 98 that the new FW data is valid for all the firmware to be updated, the notification unit 102 sends the notification to the other electronic control device 24 and the electronic control device 24 to be updated. Information indicating that the firmware update has been completed is transmitted.

一方、第2検証部98は、何れか1つの電子制御装置24に書き込まれた新FWデータが正当ではないと判断した場合、更新処理が失敗したことを、データ送信部84に通知する。   On the other hand, when the second verification unit 98 determines that the new FW data written in any one of the electronic control devices 24 is not valid, the second verification unit 98 notifies the data transmission unit 84 that the update process has failed.

データ送信部84は、更新処理が失敗した場合、更新対象のファームウェアのそれぞれについて、対応する現FWデータを電子制御装置24に送信して、電子制御装置24に現FWデータを復元させる。具体的には、データ送信部84は、更新対象のファームウェアのそれぞれについて、一時記憶部38に記憶された現FWデータを電子制御装置24に送信するとともに、復元指示を送信する。なお、データ送信部84は、まだ新FWデータへ送信しておらず更新を開始していない電子制御装置24については、復元処理をさせなくてもよい。   When the update process fails, the data transmission unit 84 transmits the corresponding current FW data to the electronic control device 24 for each firmware to be updated, and causes the electronic control device 24 to restore the current FW data. Specifically, the data transmission unit 84 transmits the current FW data stored in the temporary storage unit 38 to the electronic control unit 24 and the restoration instruction for each firmware to be updated. Note that the data transmission unit 84 may not perform the restoration process for the electronic control device 24 that has not yet been transmitted to the new FW data and has not started updating.

検証値受信部96は、復元対象のファームウェアのそれぞれについて、電子制御装置24から、復元処理においてデータ記憶部70に書き込まれた現FWデータを検証するためのMAC値を受信する。   The verification value receiving unit 96 receives a MAC value for verifying the current FW data written in the data storage unit 70 in the restoration process from the electronic control unit 24 for each of the firmware to be restored.

第2検証部98は、復元対象のファームウェアのそれぞれについて、復元処理において電子制御装置24に書き込まれた現FWデータが正当であるか否かを検証する。第2検証部98は、復元対象のファームウェアのそれぞれについて、復元処理において電子制御装置24に書き込まれた現FWデータが正当であると判断した場合、通知部102に通知する。通知部102は、復元対象のファームウェアの全てについて、第2検証部98から現FWデータが正当である旨の通知を受けた場合、他の電子制御装置24および更新対象の電子制御装置24に、処理が完了したことを示す情報を送信する。   The second verification unit 98 verifies whether the current FW data written in the electronic control unit 24 in the restoration process is valid for each restoration target firmware. When the second verification unit 98 determines that the current FW data written in the electronic control device 24 in the restoration process is valid for each restoration target firmware, the second verification unit 98 notifies the notification unit 102 of the firmware. When the notification unit 102 receives notification from the second verification unit 98 that the current FW data is valid for all of the firmware to be restored, the notification unit 102 notifies the other electronic control device 24 and the electronic control device 24 to be updated to Information indicating that the process has been completed is transmitted.

また、第2検証部98は、復元対象のファームウェアの何れかについて、復元処理において電子制御装置24に書き込まれた現FWデータが正当でないと判断した場合、電子制御装置24に正当なデータが書き込まれていないことを通知部102に通知する。通知部102は、第2検証部98から、正当なデータが書き込まれていないことの通知を受けると、他の電子制御装置24および更新対象の電子制御装置24に、正当なデータが書き込まれていないことを示す情報を送信する。   If the second verification unit 98 determines that the current FW data written in the electronic control device 24 in the restoration process is not valid for any of the firmware to be restored, the valid data is written in the electronic control device 24. The notification unit 102 is notified that the information has not been received. When the notification unit 102 receives a notification from the second verification unit 98 that valid data has not been written, the valid data has been written to the other electronic control device 24 and the electronic control device 24 to be updated. Send information indicating that there is no.

確定部100は、更新対象のファームウェアのそれぞれについて、更新処理において電子制御装置24に書き込まれた新FWデータが正当である旨の通知を受けた場合、一時記憶部38に記憶されている新FWデータを現FWデータ記憶部201に転送して、現FWデータ記憶部201に書き込む。また、確定部100は、復元処理において電子制御装置24に書き込まれた現FWデータが正当である旨の通知を受けた場合、一時記憶部38に記憶されている現FWデータを現FWデータ記憶部201に転送して、現FWデータ記憶部201に書き込む。   When the confirmation unit 100 receives notification that the new FW data written in the electronic control unit 24 is valid in the update process for each of the firmware to be updated, the confirmation unit 100 stores the new FW stored in the temporary storage unit 38. Data is transferred to the current FW data storage unit 201 and written to the current FW data storage unit 201. Further, when receiving a notification that the current FW data written in the electronic control unit 24 is valid in the restoration process, the determination unit 100 stores the current FW data stored in the temporary storage unit 38 into the current FW data storage. The data is transferred to the unit 201 and written to the current FW data storage unit 201.

図36は、第6変形例に係る中継装置26による更新処理フローを示す図である。更新部32は、図36に示す更新処理を実行する。   FIG. 36 is a diagram illustrating an update processing flow by the relay device 26 according to the sixth modification. The update unit 32 executes the update process shown in FIG.

まず、ステップS241において、更新部32は、更新対象のファームウェアのそれぞれについて、更新タイミング情報を管理データ記憶部34から読み出す。続いて、ステップS242において、更新部32は、更新対象のファームウェアを記憶するそれぞれの電子制御装置24についてのECU状態情報を状態記憶部40から読み出す。   First, in step S <b> 241, the update unit 32 reads update timing information from the management data storage unit 34 for each piece of firmware to be updated. Subsequently, in step S <b> 242, the update unit 32 reads out ECU state information for each electronic control unit 24 that stores firmware to be updated from the state storage unit 40.

続いて、ステップS243において、更新部32は、読み出したECU状態情報等に基づき、更新対象のファームウェアを記憶する全ての電子制御装置24が更新可能か否かを判断する。更新部32は、更新可能ではない場合(S243のNo)、処理をステップS244に進めて一定時間待機した後に、再度、ステップS242から処理を繰り返す。更新部32は、更新可能である場合(S243のYes)、処理をステップS245に進める。   Subsequently, in step S243, the updating unit 32 determines whether or not all the electronic control devices 24 storing the firmware to be updated can be updated based on the read ECU state information and the like. If the update unit 32 is not updatable (No in S243), the process proceeds to step S244 and waits for a predetermined time, and then repeats the process from step S242. If updating is possible (Yes in S243), the updating unit 32 advances the process to Step S245.

ステップS245において、更新部32は、更新対象のファームウェアを記憶するそれぞれの電子制御装置24に更新開始を示す情報を送信する。続いて、ステップS246において、更新部32は、他の電子制御装置24に、更新対象の電子制御装置24におけるファームウェアの更新の開始を示す情報を送信する。   In step S245, the update unit 32 transmits information indicating update start to each electronic control unit 24 that stores the firmware to be updated. Subsequently, in step S <b> 246, the update unit 32 transmits information indicating the start of firmware update in the update target electronic control device 24 to the other electronic control device 24.

続いて、ステップS247において、更新部32は、更新対象の少なくとも1つのファームウェアのうちの1つのファームウェアを、書き込み対象のファームウェアとして特定する。   Subsequently, in step S247, the update unit 32 specifies one firmware among the at least one firmware to be updated as the firmware to be written.

続いて、ステップS248において、更新部32は、書き込み対象のファームウェアについて、提供装置20から受信した新FWデータを電子制御装置24に送信して、電子制御装置24に記憶されている現FWデータを新FWデータに更新させる。   Subsequently, in step S248, the update unit 32 transmits the new FW data received from the providing device 20 to the electronic control device 24 for the firmware to be written, and the current FW data stored in the electronic control device 24 is transmitted. Update to new FW data.

続いて、ステップS249において、更新部32は、更新対象の電子制御装置24から、書き込んだ新FWデータを検証するためのMAC値を受信する。   Subsequently, in step S249, the updating unit 32 receives a MAC value for verifying the written new FW data from the electronic control device 24 to be updated.

続いて、ステップS250において、更新部32は、書き込み対象のファームウェアについて、更新処理において電子制御装置24に書き込まれた新FWデータが正当であるか否かを検証する。正当でない場合(S250のNo)、更新部32は、処理をS251に進めてロールバック処理を実行する。なお、S251のロールバック処理については、図37でさらに説明する。   Subsequently, in step S250, the update unit 32 verifies whether the new FW data written in the electronic control unit 24 in the update process is valid for the firmware to be written. If it is not valid (No in S250), the updating unit 32 advances the process to S251 and executes a rollback process. Note that the rollback processing in S251 will be further described with reference to FIG.

正当である場合(S250のYes)、更新部32は、処理をS252に進める。ステップS252において、更新部32は、一時記憶部38に記憶されている、書き込み対象のファームウェアについての新FWのMAC値、新FWのバージョン番号および新FWの開発者IDを読み出して、現FWのMAC値、現FWのバージョン番号および現FWの開発者IDとして管理データ記憶部34に記憶させる。   If it is valid (Yes in S250), the updating unit 32 advances the process to S252. In step S252, the update unit 32 reads the MAC value of the new FW, the version number of the new FW, and the developer ID of the new FW stored in the temporary storage unit 38, and the current FW developer ID. The management data storage unit 34 stores the MAC value, the version number of the current FW, and the developer ID of the current FW.

続いて、S253において、更新部32は、一時記憶部38に記憶されている、書き込み対象のファームウェアについての新FWデータを読み出して、読み出した新FWデータを現FWデータとして、現FWデータ記憶部201に書き込む。更新部32は、S253を終えると、処理をS254に進める。   Subsequently, in S253, the update unit 32 reads the new FW data for the firmware to be written, which is stored in the temporary storage unit 38, and sets the read new FW data as the current FW data as the current FW data storage unit. Write to 201. After completing S253, the update unit 32 advances the process to S254.

続いて、ステップS254において、更新部32は、更新対象の全てのファームウェアについて、新FWデータを書き込んだか否かを判断する。全てをまだ書き込んでいない場合には(S254のNo)、更新部32は、処理をS247に戻し、他のファームウェアを書き込み対象として特定して処理を続ける。全てを書き込んだ場合には(S254のYes)、更新部32は、本フローを終了する。   Subsequently, in step S254, the update unit 32 determines whether or not new FW data has been written for all firmware to be updated. If all have not yet been written (No in S254), the updating unit 32 returns the process to S247, specifies other firmware as a write target, and continues the process. When all are written (Yes in S254), the updating unit 32 ends this flow.

図37は、第6変形例に係る中継装置26によるロールバック処理フローを示す図である。更新部32は、図36で示したS251において、図37に示すロールバック処理を実行する。   FIG. 37 is a diagram showing a rollback processing flow by the relay device 26 according to the sixth modification. The update unit 32 executes the rollback process shown in FIG. 37 in S251 shown in FIG.

まず、ステップS261において、更新部32は、更新対象のファームウェアのうちの1つのファームウェアを、復元対象のファームウェアとして特定する。なお、更新部32は、新FWデータへ送信しておらず更新を開始していないファームウェアについては、復元対象から除いてよい。   First, in step S <b> 261, the update unit 32 specifies one of the firmware to be updated as the firmware to be restored. Note that the update unit 32 may exclude firmware that has not been transmitted to the new FW data and has not started to be updated.

続いて、ステップS262において、更新部32は、復元対象のファームウェアについて、一時記憶部38に記憶された現FWデータを電子制御装置24に送信して、電子制御装置24に現FWデータを復元させる。   Subsequently, in step S262, the update unit 32 transmits the current FW data stored in the temporary storage unit 38 to the electronic control device 24 for the firmware to be restored, and causes the electronic control device 24 to restore the current FW data. .

続いて、ステップS263において、更新部32は、復元対象の電子制御装置24から、書き込んだ現FWデータを検証するためのMAC値を受信する。   Subsequently, in step S263, the updating unit 32 receives a MAC value for verifying the written current FW data from the electronic control device 24 to be restored.

続いて、ステップS264において、更新部32は、復元処理において電子制御装置24に書き込まれた現FWデータが正当であるか否かを検証する。更新部32は、正当でない場合(S264のNo)、処理をステップS265に進め、正当である場合(S264のYes)、処理をステップS266に進める。   Subsequently, in step S264, the updating unit 32 verifies whether or not the current FW data written in the electronic control unit 24 in the restoration process is valid. If the update unit 32 is not valid (No in S264), the process proceeds to step S265. If the update unit 32 is valid (Yes in S264), the process proceeds to step S266.

ステップS265において、更新部32は、復元対象の電子制御装置24および他の電子制御装置24に、復元対象の電子制御装置24に正当なデータが書き込まれていないことを示す失敗通知を送信する。ステップS265を終えると、更新部32は、処理をS268に進める。   In step S <b> 265, the updating unit 32 transmits a failure notification indicating that valid data is not written in the electronic control device 24 to be restored to the electronic control device 24 to be restored and the other electronic control device 24. When step S265 ends, the update unit 32 advances the process to step S268.

ステップS266において、更新部32は、一時記憶部38に記憶されている、書き込み対象のファームウェアについての現FWのMAC値、現FWのバージョン番号および現FWの開発者IDを読み出して管理データ記憶部34に記憶させる。   In step S266, the update unit 32 reads the MAC value of the current FW, the version number of the current FW, and the developer ID of the current FW stored in the temporary storage unit 38, and the management data storage unit 34 is stored.

続いて、ステップS267において、更新部32は、一時記憶部38に記憶されている、書き込み対象のファームウェアについての現FWデータを読み出して、読み出した現FWデータを、現FWデータ記憶部201に書き込む。更新部32は、ステップS267を終えると、処理をS268に進める。   Subsequently, in step S267, the update unit 32 reads the current FW data for the firmware to be written, which is stored in the temporary storage unit 38, and writes the read current FW data in the current FW data storage unit 201. . The update part 32 advances a process to S268, after finishing step S267.

続いて、ステップS268において、更新部32は、更新対象の全てのファームウェアについて、現FWデータを書き込んだか否かを判断する。まだ全てを書き込んでいない場合には(S268のNo)、更新部32は、処理をS261に戻し、他のファームウェアを復元対象として特定して処理を続ける。全てを書き込んだ場合には(S268のYes)、更新部32は、本フローを終了する。   Subsequently, in step S268, the update unit 32 determines whether or not the current FW data has been written for all the firmware to be updated. If not all has been written yet (No in S268), the updating unit 32 returns the process to S261, specifies another firmware as a restoration target, and continues the process. When all are written (Yes in S268), the updating unit 32 ends this flow.

このような本変形例に係る中継装置26は、複数の電子制御装置24のファームウェアを協調して更新することができる。これにより、中継装置26は、複数の電子制御装置24のファームウェアを、安定して動作をするバージョンの組み合わせとなるように更新することができる。なお、第6変形例に係る構成は、図1から図14を参照して説明したネットワークシステム10に適用されてもよい。   Such a relay device 26 according to this modification can update firmware of a plurality of electronic control devices 24 in a coordinated manner. Thereby, the relay device 26 can update the firmware of the plurality of electronic control devices 24 so as to be a combination of versions that operate stably. The configuration according to the sixth modification may be applied to the network system 10 described with reference to FIGS. 1 to 14.

(第7変形例)
図38は、第7変形例に係るネットワークシステム10を示す図である。なお、第7変形例は、第4変形例をさらに変形した構成であるが、第5変形例および第6変形例に適用されてもよい。
(Seventh Modification)
FIG. 38 is a diagram illustrating a network system 10 according to a seventh modification. The seventh modification is a configuration obtained by further modifying the fourth modification, but may be applied to the fifth modification and the sixth modification.

制御対象システム22は、中継装置26の外部に、記憶装置251をさらに備える。記憶装置251は、内部ネットワークを介して中継装置26と接続されていてもよいし、内部ネットワークとは異なるネットワークで中継装置26と接続されていてもよい。中継装置26は、情報を記憶装置251に書き込むことができる。また、中継装置26は、記憶装置251に記憶されている情報を読み出すことができる。   The control target system 22 further includes a storage device 251 outside the relay device 26. The storage device 251 may be connected to the relay device 26 via an internal network, or may be connected to the relay device 26 via a network different from the internal network. The relay device 26 can write information in the storage device 251. The relay device 26 can read information stored in the storage device 251.

図39は、第7変形例に係る中継装置26および記憶装置251の機能構成を示す図である。中継装置26は、第1通信部261をさらに有する。記憶装置251は、第2通信部262と、現FWデータ記憶部201とを有する。   FIG. 39 is a diagram illustrating a functional configuration of the relay device 26 and the storage device 251 according to the seventh modification. The relay device 26 further includes a first communication unit 261. The storage device 251 includes a second communication unit 262 and a current FW data storage unit 201.

第1通信部261および第2通信部262は、互いに情報を送受信する。現FWデータ記憶部201は、第1通信部261および第2通信部262を介して、中継装置26の取得部30および更新部32からアクセスがされる。取得部30および更新部32は、外部の記憶装置251に対して、現FWデータの書き込みおよび読み出しをする。   The first communication unit 261 and the second communication unit 262 transmit / receive information to / from each other. The current FW data storage unit 201 is accessed from the acquisition unit 30 and the update unit 32 of the relay device 26 via the first communication unit 261 and the second communication unit 262. The acquisition unit 30 and the update unit 32 write and read current FW data to and from the external storage device 251.

また、更新部32の確定部100は、書き込まれた新FWデータまたは現FWデータが正当である旨の通知(更新結果通知)を電子制御装置24から受け取る。確定部100は、電子制御装置24から送信された更新結果通知と新FWデータ(または現FWデータ)との組を外部の記憶装置251に送信して、記憶させてもよい。これにより、制御対象システム22は、外部の記憶装置251に記憶されている現FWデータが、電子制御装置24に書き込まれていることを保証することができる。   Further, the confirmation unit 100 of the update unit 32 receives a notification (update result notification) from the electronic control device 24 that the written new FW data or current FW data is valid. The determination unit 100 may transmit the update result notification and the new FW data (or current FW data) transmitted from the electronic control device 24 to the external storage device 251 for storage. Thereby, the control target system 22 can guarantee that the current FW data stored in the external storage device 251 is written in the electronic control device 24.

このような制御対象システム22は、例えば中継装置26のプログラムが故障した場合であっても、現FWデータ記憶部201に記憶されている現FWデータが不正に書き換えられたり故障したりすることを回避することができる。また、中継装置26および記憶装置251は、共有鍵を用いて現FWデータのMAC値を算出して、送受信する現FWデータを検証してもよい。これにより、制御対象システム22は記憶装置251に記憶される現FWデータの不正な書き換えを防止することができる。   Such a control target system 22 detects that the current FW data stored in the current FW data storage unit 201 is illegally rewritten or fails even when the program of the relay device 26 fails, for example. It can be avoided. Further, the relay device 26 and the storage device 251 may verify the current FW data to be transmitted and received by calculating the MAC value of the current FW data using the shared key. Thereby, the controlled system 22 can prevent unauthorized rewriting of the current FW data stored in the storage device 251.

また、制御対象システム22は、電子制御装置24毎に、記憶装置251を備えてもよい。また、制御対象システム22は、電子制御装置24毎に、中継装置26および記憶装置251に共有鍵を保持させてもよい。これにより、制御対象システム22は、現FWデータの不正な書き換えをより強力に防止することができる。   Further, the control target system 22 may include a storage device 251 for each electronic control device 24. Further, the control target system 22 may cause the relay device 26 and the storage device 251 to hold a shared key for each electronic control device 24. Thereby, the controlled system 22 can more strongly prevent unauthorized rewriting of the current FW data.

さらに、中継装置26は、更新結果通知に、電子制御装置24に書き込まれた新FWデータ(または現FWデータ)のハッシュ値を付与した情報のMAC値を生成してもよい。そして、中継装置26は、生成したMAC値と、更新結果通知と、新FWデータ(または現FWデータ)とを記憶装置251に送信する。この場合、記憶装置251の第2通信部262は、受信した新FWデータ(または現FWデータ)のハッシュ値を生成し、更新結果通知にハッシュ値を付与した情報のMAC値を生成して、比較する。これにより、第2通信部262は、受信した新FWデータ(または現FWデータ)が確かに電子制御装置24に記憶されているものであることを、中継装置26にマルウェアが進入しているような状況下であっても保証できる。   Further, the relay device 26 may generate a MAC value of information obtained by adding a hash value of new FW data (or current FW data) written in the electronic control device 24 to the update result notification. Then, the relay device 26 transmits the generated MAC value, the update result notification, and the new FW data (or the current FW data) to the storage device 251. In this case, the second communication unit 262 of the storage device 251 generates a hash value of the received new FW data (or current FW data), generates a MAC value of information obtained by adding the hash value to the update result notification, Compare. As a result, the second communication unit 262 indicates that the malware has entered the relay device 26 that the received new FW data (or current FW data) is certainly stored in the electronic control device 24. Can be guaranteed even under difficult circumstances.

なお、中継装置26および記憶装置251は、記憶装置251が生成した乱数を用いたチャレンジレスポンス方式を利用して、更新結果通知をやり取りしてもよい。これにより、中継装置26および記憶装置251は、過去に有効であった更新結果通知を利用した攻撃を防ぎ、セキュリティを向上させることができる。中継装置26および記憶装置251は、チャレンジレスポンス方式ではなく、公開鍵を用いた方式で過去に有効であった更新結果通知を利用した攻撃を防いでもよい。   Note that the relay device 26 and the storage device 251 may exchange update result notifications using a challenge response method using a random number generated by the storage device 251. Thereby, the relay device 26 and the storage device 251 can prevent an attack using an update result notification that has been effective in the past, and improve security. The relay device 26 and the storage device 251 may prevent an attack using an update result notification that has been effective in the past by a method using a public key instead of a challenge response method.

図40は、実施形態に係る情報処理装置300のハードウェア構成の一例を示す図である。上述した中継装置26は、例えば図40に示すような情報処理装置300により実現することができる。   FIG. 40 is a diagram illustrating an example of a hardware configuration of the information processing apparatus 300 according to the embodiment. The relay device 26 described above can be realized by an information processing device 300 as shown in FIG. 40, for example.

情報処理装置300は、通常のコンピュータと同様の構成をしている。すなわち、情報処理装置300は、CPU302と、ROM304と、RAM306と、記憶装置308と、外部通信装置310と、内部通信装置312とを有する。CPU302、ROM304、RAM306、記憶装置308、外部通信装置310および内部通信装置312は、バスにより接続されている。CPU302、ROM304、RAM306は1つのチップで構成され、それと、記憶装置308、外部通信装置310および内部通信装置312がバスにより接続されてもよい。   The information processing apparatus 300 has the same configuration as a normal computer. That is, the information processing apparatus 300 includes a CPU 302, a ROM 304, a RAM 306, a storage device 308, an external communication device 310, and an internal communication device 312. CPU 302, ROM 304, RAM 306, storage device 308, external communication device 310, and internal communication device 312 are connected by a bus. The CPU 302, the ROM 304, and the RAM 306 may be configured as one chip, and the storage device 308, the external communication device 310, and the internal communication device 312 may be connected by a bus.

CPU302は、記憶装置308に記憶されたプログラムをRAM306に展開して実行し、各部を制御して入出力を行ったり、データの加工を行ったりする。ROM304には、OSの起動用プログラムを記憶装置308からRAM306に読み出すスタートプログラムが記憶されている。RAM306は、CPU302の作業領域としてデータを記憶する。   The CPU 302 expands and executes the program stored in the storage device 308 in the RAM 306, and controls each unit to perform input / output and process data. The ROM 304 stores a start program for reading an OS startup program from the storage device 308 to the RAM 306. The RAM 306 stores data as a work area for the CPU 302.

記憶装置308は、例えば、ハードディスクドライブまたはフラッシュメモリ等である。記憶装置308は、オペレーティングシステム、アプリケーションプログラムおよびデータを記憶している。これらのプログラムは、インストール可能な形式または実行可能な形式のファイルで、コンピュータで読み取り可能な記録メディアに記録して配布される。また、プログラムは、サーバからダウンロードすることにより配布されてもよい。   The storage device 308 is, for example, a hard disk drive or a flash memory. The storage device 308 stores an operating system, application programs, and data. These programs are files in an installable or executable format, and are recorded and distributed on a computer-readable recording medium. The program may be distributed by downloading from a server.

外部通信装置310は、外部ネットワークに接続するためのインターフェイス装置である。内部通信装置312は、内部ネットワークに接続するためのインターフェイス装置である。   The external communication device 310 is an interface device for connecting to an external network. The internal communication device 312 is an interface device for connecting to an internal network.

本実施形態の情報処理装置300で実行されるプログラムは、インストール可能な形式または実行可能な形式のファイルでCD−ROM、フレキシブルディスク(FD)、CD−R、DVD等のコンピュータで読み取り可能な記録媒体に記録されて提供される。   The program executed by the information processing apparatus 300 according to the present embodiment is an installable format or executable format file, and is a computer-readable recording such as a CD-ROM, a flexible disk (FD), a CD-R, and a DVD. Provided by being recorded on a medium.

また、本実施形態の情報処理装置300で実行されるプログラムを、インターネット等のネットワークに接続されたコンピュータ上に格納し、ネットワーク経由でダウンロードさせることにより提供するように構成してもよい。また、本実施形態の情報処理装置300で実行されるプログラムをインターネット等のネットワーク経由で提供または配布するように構成してもよい。また、本実施形態のプログラムを、ROM304等に予め組み込んで提供するように構成してもよい。   The program executed by the information processing apparatus 300 according to the present embodiment may be configured to be stored by being stored on a computer connected to a network such as the Internet and downloaded via the network. The program executed by the information processing apparatus 300 according to the present embodiment may be configured to be provided or distributed via a network such as the Internet. Further, the program of the present embodiment may be configured to be provided by being incorporated in advance in the ROM 304 or the like.

情報処理装置300を中継装置26として機能させるためのプログラムは、取得モジュール(要求送信モジュール、応答受信モジュール、第1検証値生成モジュール、第1検証モジュールおよび状況更新モジュール等を含む)と、更新モジュール(状態受信モジュール、開始検知モジュール、開始送信モジュール、データ送信モジュール、検証値受信モジュール、第2検証モジュール、確定モジュールおよび通知モジュール等)とを有する。情報処理装置300は、実際のハードウェアとしてはプロセッサ(CPU302)が記憶媒体(記憶装置308等)からプログラムを読み出して実行することにより上記各部が主記憶装置(RAM306)上にロードされ、取得部30(要求送信部52、応答受信部60、第1検証値生成部62、第1検証部64および状況更新部66等を含む)と、更新部32(状態受信部76、開始検知部78、開始送信部80、データ送信部84、検証値受信部96、第2検証部98、確定部100および通知部102等)とが、主記憶装置上に生成されるようになっている。   A program for causing the information processing device 300 to function as the relay device 26 includes an acquisition module (including a request transmission module, a response reception module, a first verification value generation module, a first verification module, a status update module, and the like), and an update module (Status reception module, start detection module, start transmission module, data transmission module, verification value reception module, second verification module, confirmation module, notification module, etc.). In the information processing apparatus 300, as actual hardware, the processor (CPU 302) reads a program from a storage medium (such as the storage device 308) and executes the program so that the above-described units are loaded on the main storage device (RAM 306). 30 (including a request transmission unit 52, a response reception unit 60, a first verification value generation unit 62, a first verification unit 64, a status update unit 66, etc.) and an update unit 32 (a status reception unit 76, a start detection unit 78, A start transmission unit 80, a data transmission unit 84, a verification value reception unit 96, a second verification unit 98, a determination unit 100, a notification unit 102, and the like) are generated on the main storage device.

本発明のいくつかの実施形態および変形例を説明したが、これらの実施形態および変形例は、例として提示したものであり、発明の範囲を限定することは意図していない。これら新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。   Although several embodiments and modifications of the present invention have been described, these embodiments and modifications are presented by way of example and are not intended to limit the scope of the invention. These novel embodiments can be implemented in various other forms, and various omissions, replacements, and changes can be made without departing from the scope of the invention. These embodiments and modifications thereof are included in the scope and gist of the invention, and are included in the invention described in the claims and the equivalents thereof.

10 ネットワークシステム
20 提供装置
22 制御対象システム
24 電子制御装置
26 中継装置
30 取得部
32 更新部
34 管理データ記憶部
36 共有鍵記憶部
38 一時記憶部
40 状態記憶部
50 提供情報記憶部
52 要求送信部
54 要求受信部
56 特定部
58 応答送信部
60 応答受信部
62 第1検証値生成部
64 第1検証部
66 状況更新部
70 データ記憶部
72 制御部
74 状態送信部
76 状態受信部
78 開始検知部
80 開始送信部
82 開始受信部
84 データ送信部
86 データ受信部
88 書込部
90 第1鍵記憶部
92 第2検証値生成部
94 検証値送信部
96 検証値受信部
98 第2検証部
100 確定部
102 通知部
104 終了受信部
122 バージョン送信部
124 バージョン受信部
126 バージョン判定部
142 第3検証部
144 結果送信部
146 結果受信部
152 切替部
201 現FWデータ記憶部
211 新FWデータ生成部
221 システム情報記憶部
251 記憶装置
261 第1通信部
262 第2通信部
DESCRIPTION OF SYMBOLS 10 Network system 20 Provision apparatus 22 Control object system 24 Electronic control apparatus 26 Relay apparatus 30 Acquisition part 32 Update part 34 Management data storage part 36 Shared key storage part 38 Temporary storage part 40 Status storage part 50 Provision information storage part 52 Request transmission part 54 request reception unit 56 identification unit 58 response transmission unit 60 response reception unit 62 first verification value generation unit 64 first verification unit 66 status update unit 70 data storage unit 72 control unit 74 status transmission unit 76 status reception unit 78 start detection unit 80 Start transmission unit 82 Start reception unit 84 Data transmission unit 86 Data reception unit 88 Writing unit 90 First key storage unit 92 Second verification value generation unit 94 Verification value transmission unit 96 Verification value reception unit 98 Second verification unit 100 Confirmation Unit 102 notification unit 104 end reception unit 122 version transmission unit 124 version reception unit 126 version determination unit 142 third inspection Part 144 result transmission unit 146 result receiving unit 152 switching unit 201 the current FW data storage unit 211 the new FW data generation unit 221 system information storage unit 251 stores device 261 first communication portion 262 the second communication unit

Claims (20)

電子制御装置に記憶されている現データを新データに更新させるための中継装置であって、
前記電子制御装置を識別する装置識別子と、前記現データを識別するデータ識別子と、前記現データのバージョンを特定可能なバージョン特定情報とを含む取得要求を、提供装置に送信する要求送信部と、
前記取得要求に応じて、前記提供装置から前記新データを受信する応答受信部と、
前記提供装置から受信した前記新データを前記電子制御装置に送信して前記電子制御装置に記憶されている前記現データを前記新データに更新させ、更新処理が失敗した場合、前記現データを前記電子制御装置に送信して前記電子制御装置に前記現データを復元させるデータ送信部と、
を備える中継装置。
A relay device for updating current data stored in an electronic control device to new data,
A request transmitting unit that transmits an acquisition request including a device identifier for identifying the electronic control device, a data identifier for identifying the current data, and version specifying information capable of specifying a version of the current data to a providing device;
In response to the acquisition request, a response receiving unit that receives the new data from the providing device;
When the new data received from the providing device is transmitted to the electronic control device and the current data stored in the electronic control device is updated to the new data. A data transmission unit for transmitting to the electronic control unit and causing the electronic control unit to restore the current data;
A relay device comprising:
前記応答受信部は、前記取得要求に応じて、前記提供装置から前記新データと前記現データとを受信し、
前記データ送信部は、前記更新処理が失敗した場合、前記提供装置から受信した前記現データを前記電子制御装置に送信して前記電子制御装置に前記現データを復元させる
請求項1に記載の中継装置。
The response receiving unit receives the new data and the current data from the providing device in response to the acquisition request,
The relay according to claim 1, wherein, when the update process fails, the data transmission unit transmits the current data received from the providing device to the electronic control device and causes the electronic control device to restore the current data. apparatus.
前記提供装置から受信した前記現データおよび前記新データが正当であるか否かを判断する第1検証部をさらに備え、
前記データ送信部は、正当であると判断された前記現データおよび前記新データを前記電子制御装置へ送信する
請求項2に記載の中継装置。
A first verification unit for determining whether the current data and the new data received from the providing device are valid;
The relay device according to claim 2, wherein the data transmission unit transmits the current data and the new data determined to be valid to the electronic control device.
前記第1検証部は、前記電子制御装置に記憶されている前記現データを検証するための第1検証値と、前記提供装置から受信した前記現データを検証するための第2検証値とが一致する場合に、前記提供装置から受信した前記現データが正当であると判断する
請求項3に記載の中継装置。
The first verification unit includes a first verification value for verifying the current data stored in the electronic control device and a second verification value for verifying the current data received from the providing device. The relay device according to claim 3, wherein, when they match, it is determined that the current data received from the providing device is valid.
前記応答受信部は、前記新データを検証するための第3検証値を前記提供装置からさらに受信し、
前記第1検証部は、前記第3検証値と、共有鍵データと前記提供装置から受信した前記新データとにより算出された第4検証値とが一致する場合に、前記提供装置から受信した前記新データが正当であると判断する
請求項3または4に記載の中継装置。
The response receiving unit further receives a third verification value for verifying the new data from the providing device,
The first verification unit receives the third verification value received from the providing apparatus when the fourth verification value calculated by the shared key data and the new data received from the providing apparatus matches. The relay apparatus according to claim 3, wherein the new data is determined to be valid.
前記更新処理により前記電子制御装置に書き込まれた前記新データが正当であるか否かを検証する第2検証部をさらに備え、
前記データ送信部は、前記更新処理において前記電子制御装置に書き込まれた前記新データが正当ではない場合、前記提供装置から受信した前記現データを前記電子制御装置へ送信して前記電子制御装置に前記現データを復元させる
請求項3から5の何れか1項に記載の中継装置。
A second verification unit that verifies whether the new data written to the electronic control unit by the update process is valid;
The data transmission unit transmits the current data received from the providing device to the electronic control device to the electronic control device when the new data written to the electronic control device in the update process is not valid. The relay device according to claim 3, wherein the current data is restored.
前記第2検証部は、前記更新処理において前記電子制御装置に書き込まれた前記新データを検証するための第5検証値と、前記電子制御装置へと送信した前記新データを検証するための第6検証値とが一致しない場合に、前記更新処理により前記電子制御装置に書き込まれた前記新データが正当ではないと判断する
請求項6に記載の中継装置。
The second verification unit includes a fifth verification value for verifying the new data written in the electronic control unit in the update process, and a second value for verifying the new data transmitted to the electronic control unit. 7. The relay device according to claim 6, wherein when the verification value does not match, it is determined that the new data written to the electronic control device by the update process is not valid.
前記第2検証部は、復元処理において前記電子制御装置に書き込まれた前記現データが正当であるか否かをさらに判断し、
前記中継装置は、前記電子制御装置に書き込まれた前記現データが正当ではない場合、前記電子制御装置に書き込まれたデータが正当でないことを外部に通知する通知部をさらに備える
請求項6または7に記載の中継装置。
The second verification unit further determines whether or not the current data written in the electronic control device in the restoration process is valid,
The relay device further includes a notification unit that notifies the outside that the data written to the electronic control device is not valid when the current data written to the electronic control device is not valid. The relay device described in 1.
前記第2検証部は、前記復元処理において前記電子制御装置に書き込まれた前記現データを検証するための第7検証値と、前記電子制御装置へと送信した前記現データを検証するための第8検証値とが一致しない場合に、前記電子制御装置に書き込まれた前記現データが正当ではないと判断する
請求項8に記載の中継装置。
The second verification unit includes a seventh verification value for verifying the current data written in the electronic control device in the restoration process, and a second value for verifying the current data transmitted to the electronic control device. 9. The relay device according to claim 8, wherein when the verification value does not match, the current data written in the electronic control device is determined not to be valid.
前記データ送信部は、前記提供装置から受信した前記新データおよび前記新データを検証するための第6検証値を前記電子制御装置に送信して前記電子制御装置に記憶されている前記現データを前記新データに更新させ、
前記中継装置は、前記更新処理において前記電子制御装置に書き込まれた前記新データが正当であるか否かの結果を前記電子制御装置から受信する結果受信部をさらに備え、
前記データ送信部は、前記更新処理において前記電子制御装置に書き込まれた前記新データが正当でなかったことを示す結果を受信した場合、前記提供装置から受信した前記現データおよび前記現データを検証するための第8検証値を前記電子制御装置へ送信して前記電子制御装置に前記現データを復元させる
請求項3から5の何れか1項に記載の中継装置。
The data transmitting unit transmits the new data received from the providing device and a sixth verification value for verifying the new data to the electronic control device and stores the current data stored in the electronic control device. Update to the new data,
The relay device further includes a result receiving unit that receives a result from the electronic control device whether or not the new data written to the electronic control device in the update process is valid,
The data transmission unit verifies the current data and the current data received from the providing device when receiving a result indicating that the new data written to the electronic control device is not valid in the update process. The relay device according to any one of claims 3 to 5, wherein an eighth verification value to be transmitted is transmitted to the electronic control device to cause the electronic control device to restore the current data.
前記提供装置から送信可能な前記新データのバージョンを表す情報を受信するバージョン受信部と、
前記電子制御装置に記憶されている前記現データのバージョンより、前記提供装置から送信可能な前記新データのバージョンが新しいかを判断するバージョン判定部と、
をさらに備え、
前記要求送信部は、前記電子制御装置に記憶されている前記現データのバージョンより、前記提供装置から送信可能な前記新データのバージョンが新しいことを条件として、前記取得要求を前記提供装置に送信する
請求項1から10の何れか1項に記載の中継装置。
A version receiving unit that receives information representing a version of the new data that can be transmitted from the providing device;
A version determination unit that determines whether the version of the new data that can be transmitted from the providing device is newer than the version of the current data stored in the electronic control device;
Further comprising
The request transmission unit transmits the acquisition request to the providing apparatus on the condition that the version of the new data that can be transmitted from the providing apparatus is newer than the version of the current data stored in the electronic control apparatus. The relay device according to any one of claims 1 to 10.
前記電子制御装置に書き込まれた前記新データが正当であるか否かの検証を前記中継装置で実行するか前記電子制御装置で実行するかを示す検証主体情報を記憶する状態記憶部と、
前記検証主体情報に基づき、前記検証を前記中継装置で実行させるか前記電子制御装置で実行させるかを切り替える切替部と、
をさらに備える請求項1に記載の中継装置。
A state storage unit that stores verification entity information indicating whether the relay device or the electronic control device executes verification of whether the new data written to the electronic control device is valid;
A switching unit for switching whether to execute the verification by the relay device or the electronic control device based on the verification subject information;
The relay device according to claim 1, further comprising:
前記現データを記憶する現データ記憶部と、
前記更新処理が成功した場合、前記電子制御装置に送信した前記新データを、前記現データとして前記現データ記憶部に書き込む確定部と、
をさらに備え、
前記要求送信部は、前記新データの送信を要求する前記取得要求を、前記提供装置に送信し、
前記応答受信部は、前記新データの送信を要求する前記取得要求に応じて、前記提供装置から前記新データを受信し、
前記データ送信部は、前記更新処理が失敗した場合、前記現データ記憶部に記憶されている前記現データを前記電子制御装置に送信して前記電子制御装置に前記現データを復元させる
請求項1に記載の中継装置。
A current data storage unit for storing the current data;
If the update process is successful, a confirmation unit that writes the new data transmitted to the electronic control device as the current data in the current data storage unit;
Further comprising
The request transmission unit transmits the acquisition request for requesting transmission of the new data to the providing device,
The response receiving unit receives the new data from the providing device in response to the acquisition request for requesting transmission of the new data,
The data transmission unit, when the update process fails, transmits the current data stored in the current data storage unit to the electronic control unit, and causes the electronic control unit to restore the current data. The relay device described in 1.
前記提供装置から受信した前記新データおよび前記現データ記憶部に記憶されている前記現データが正当であるか否かを判断する第1検証部をさらに備え、
前記データ送信部は、正当である前記現データおよび前記新データを前記電子制御装置へ送信する
請求項13に記載の中継装置。
A first verification unit that determines whether the new data received from the providing device and the current data stored in the current data storage unit are valid;
The relay device according to claim 13, wherein the data transmission unit transmits the current data and the new data that are valid to the electronic control device.
前記要求送信部は、前記現データ記憶部に記憶されている前記現データが正当でないと判断された場合、前記現データの送信を要求する前記取得要求を、前記提供装置に送信し、
前記応答受信部は、前記現データの送信を要求する前記取得要求に応じて、前記提供装置から前記現データを受信し、
前記データ送信部は、前記更新処理が失敗した場合、前記提供装置から受信した前記現データを前記電子制御装置に送信して前記電子制御装置に前記現データを復元させる
請求項14に記載の中継装置。
The request transmission unit, when it is determined that the current data stored in the current data storage unit is not valid, transmits the acquisition request for requesting transmission of the current data to the providing device,
The response receiving unit receives the current data from the providing device in response to the acquisition request for requesting transmission of the current data;
The relay according to claim 14, wherein, when the update process fails, the data transmission unit transmits the current data received from the providing device to the electronic control device and causes the electronic control device to restore the current data. apparatus.
前記新データから前記現データを除いた差分データと、前記現データ記憶部に記憶された前記現データとに基づき、前記新データを生成する新データ生成部をさらに備え、
前記応答受信部は、前記新データの送信を要求する前記取得要求に応じて、前記提供装置から前記差分データを受信し、
前記新データ生成部は、前記提供装置から受信した前記差分データと、前記現データ記憶部に記憶された前記現データとに基づき、前記新データを生成し
前記データ送信部は、前記新データ生成部が生成した前記新データを前記電子制御装置に送信して前記電子制御装置に記憶されている前記現データを前記新データに更新させる
請求項13から15の何れか1項に記載の中継装置。
Based on the difference data obtained by removing the current data from the new data, and the current data stored in the current data storage unit, further comprising a new data generation unit that generates the new data,
The response receiving unit receives the difference data from the providing device in response to the acquisition request for requesting transmission of the new data,
The new data generation unit generates the new data based on the difference data received from the providing device and the current data stored in the current data storage unit, and the data transmission unit generates the new data generation The relay device according to any one of claims 13 to 15, wherein the new data generated by a unit is transmitted to the electronic control device to update the current data stored in the electronic control device to the new data. .
前記要求送信部は、複数の前記電子制御装置の組を識別するシステム識別子と、複数の前記電子制御装置のそれぞれに記憶されている前記現データのバージョンの組を表すシステムリストのバージョンを表すシステムバージョン情報とを含む前記取得要求を、前記提供装置に送信し、
前記応答受信部は、前記取得要求に応じて、前記新データへの更新を必要とする更新対象の少なくとも1つの前記電子制御装置のそれぞれについての前記新データを受信し、
前記データ送信部は、
前記提供装置から受信したそれぞれの前記新データを対応する前記電子制御装置に送信して、対応する前記電子制御装置に記憶されている前記現データを前記新データに更新させ、
何れかの前記電子制御装置において前記更新処理が失敗した場合、前記更新処理が失敗した前記電子制御装置および前記更新処理が成功したそれぞれの前記電子制御装置に、対応する前記現データを送信して、前記現データを復元させる
請求項1に記載の中継装置。
The request transmission unit includes a system identifier that identifies a set of a plurality of electronic control devices, and a system list version that represents a set of versions of the current data stored in each of the plurality of electronic control devices. Sending the acquisition request including version information to the providing device;
The response receiving unit receives the new data for each of the at least one electronic control device to be updated that needs to be updated to the new data in response to the acquisition request,
The data transmitter is
Transmitting each new data received from the providing device to the corresponding electronic control device, and updating the current data stored in the corresponding electronic control device to the new data;
When the update process fails in any of the electronic control devices, the corresponding current data is transmitted to the electronic control device in which the update process has failed and each of the electronic control devices in which the update process has succeeded. The relay apparatus according to claim 1, wherein the current data is restored.
前記更新処理が成功した場合、前記電子制御装置に送信した前記新データを、前記現データとして、外部に設けられている現データ記憶部に書き込む確定部をさらに備え、
前記要求送信部は、前記新データの送信を要求する前記取得要求を、前記提供装置に送信し、
前記応答受信部は、前記新データの送信を要求する前記取得要求に応じて、前記提供装置から前記新データを受信し、
前記データ送信部は、前記更新処理が失敗した場合、前記現データ記憶部に記憶されている前記現データを前記電子制御装置に送信して前記電子制御装置に前記現データを復元させる
請求項1に記載の中継装置。
When the update process is successful, the new data transmitted to the electronic control device further comprises a determination unit that writes the current data as a current data in a current data storage unit provided outside,
The request transmission unit transmits the acquisition request for requesting transmission of the new data to the providing device,
The response receiving unit receives the new data from the providing device in response to the acquisition request for requesting transmission of the new data,
The data transmission unit, when the update process fails, transmits the current data stored in the current data storage unit to the electronic control unit, and causes the electronic control unit to restore the current data. The relay device described in 1.
電子制御装置に記憶されている現データを新データに更新させるための中継装置により実行される中継方法であって、
前記電子制御装置を識別する装置識別子と、前記現データを識別するデータ識別子と、前記現データのバージョンを特定可能なバージョン特定情報とを含む取得要求を、提供装置に送信し、
前記取得要求に応じて、前記提供装置から前記新データを受信し、
前記提供装置から受信した前記新データを前記電子制御装置に送信して前記電子制御装置に記憶されている前記現データを前記新データに更新させ、更新処理が失敗した場合、前記現データを前記電子制御装置に送信して前記電子制御装置に前記現データを復元させる
中継方法。
A relay method executed by a relay device for updating current data stored in an electronic control device to new data,
An acquisition request including a device identifier for identifying the electronic control device, a data identifier for identifying the current data, and version specifying information capable of specifying the version of the current data is transmitted to the providing device,
In response to the acquisition request, the new data is received from the providing device,
When the new data received from the providing device is transmitted to the electronic control device and the current data stored in the electronic control device is updated to the new data. A relay method for transmitting to an electronic control unit and causing the electronic control unit to restore the current data.
情報処理装置を、電子制御装置に記憶されている現データを新データに更新させるための中継装置として機能させるためのプログラムであって、
前記情報処理装置を、
前記電子制御装置を識別する装置識別子と、前記現データを識別するデータ識別子と、前記現データのバージョンを特定可能なバージョン特定情報とを含む取得要求を、提供装置に送信する要求送信部と、
前記取得要求に応じて、前記提供装置から前記新データを受信する応答受信部と、
前記提供装置から受信した前記新データを前記電子制御装置に送信して前記電子制御装置に記憶されている前記現データを前記新データに更新させ、更新処理が失敗した場合、前記現データを前記電子制御装置に送信して前記電子制御装置に前記現データを復元させるデータ送信部と、
して機能させるためのプログラム。
A program for causing an information processing device to function as a relay device for updating current data stored in an electronic control device to new data,
The information processing apparatus;
A request transmitting unit that transmits an acquisition request including a device identifier for identifying the electronic control device, a data identifier for identifying the current data, and version specifying information capable of specifying a version of the current data to a providing device;
In response to the acquisition request, a response receiving unit that receives the new data from the providing device;
When the new data received from the providing device is transmitted to the electronic control device and the current data stored in the electronic control device is updated to the new data. A data transmission unit for transmitting to the electronic control unit and causing the electronic control unit to restore the current data;
Program to make it function.
JP2016183123A 2015-11-13 2016-09-20 Relay device, relay method and program Active JP6678548B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US15/347,387 US10437680B2 (en) 2015-11-13 2016-11-09 Relay apparatus, relay method, and computer program product

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2015223106 2015-11-13
JP2015223106 2015-11-13

Publications (2)

Publication Number Publication Date
JP2017097851A true JP2017097851A (en) 2017-06-01
JP6678548B2 JP6678548B2 (en) 2020-04-08

Family

ID=58817046

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016183123A Active JP6678548B2 (en) 2015-11-13 2016-09-20 Relay device, relay method and program

Country Status (1)

Country Link
JP (1) JP6678548B2 (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019017175A1 (en) * 2017-07-19 2019-01-24 株式会社オートネットワーク技術研究所 Transmission device, transmission method, and computer program
JP2019036251A (en) * 2017-08-21 2019-03-07 株式会社東芝 Update controller, software update system, and update control method
WO2019116896A1 (en) * 2017-12-11 2019-06-20 株式会社オートネットワーク技術研究所 On-vehicle update device, program, and program or data update method
JP2019174987A (en) * 2018-03-27 2019-10-10 株式会社東芝 Communication adapter and firmware update method
JP2020021142A (en) * 2018-07-30 2020-02-06 トヨタ自動車株式会社 Program updating system, program updating server, and vehicle
JP2020027636A (en) * 2018-08-10 2020-02-20 株式会社デンソー Master device for vehicle, method for verifying update data, and program for verifying update data
JPWO2018230084A1 (en) * 2017-06-13 2020-04-09 住友電気工業株式会社 Update control device, control method, and computer program
JP2021060797A (en) * 2019-10-07 2021-04-15 トヨタ自動車株式会社 Program update system, program transmitter, and program transmission method
CN112703706A (en) * 2018-09-25 2021-04-23 株式会社自动网络技术研究所 Relay device system and relay device
CN113168382A (en) * 2018-11-28 2021-07-23 株式会社自动网络技术研究所 Monitoring device, monitoring program, and monitoring method
JP2021524633A (en) * 2018-05-23 2021-09-13 ロベルト・ボッシュ・ゲゼルシャフト・ミト・ベシュレンクテル・ハフツングRobert Bosch Gmbh A method and control for exchanging an executable first program code for an executable second program code
CN113453959A (en) * 2019-03-04 2021-09-28 株式会社自动网络技术研究所 Vehicle-mounted updating device, update processing program, and program updating method
CN113632155A (en) * 2019-03-29 2021-11-09 日立安斯泰莫株式会社 Arithmetic device and determination method
JP2022031446A (en) * 2018-08-10 2022-02-18 株式会社デンソー Electronic control device, update data verification program and processing result transmission program
JP2022099197A (en) * 2020-12-22 2022-07-04 本田技研工業株式会社 Control system, mobile body, server, control method, update control method, and program
JP2022543670A (en) * 2019-09-19 2022-10-13 株式会社デンソー Vehicle control systems for cyber security and financial transactions

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7408593B2 (en) 2021-03-23 2024-01-05 株式会社東芝 Control devices, information processing devices, and information processing systems

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004287993A (en) * 2003-03-24 2004-10-14 Fuji Xerox Co Ltd Management method of system version, device, and information processing system
JP2008189125A (en) * 2007-02-05 2008-08-21 Nec Corp Software updating system for on-vehicle equipment, software updating method for on-vehicle equipment and vehicle device
JP2010218070A (en) * 2009-03-16 2010-09-30 Toyota Motor Corp Management device
JP2015103163A (en) * 2013-11-27 2015-06-04 株式会社オートネットワーク技術研究所 Program update system and program update method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004287993A (en) * 2003-03-24 2004-10-14 Fuji Xerox Co Ltd Management method of system version, device, and information processing system
JP2008189125A (en) * 2007-02-05 2008-08-21 Nec Corp Software updating system for on-vehicle equipment, software updating method for on-vehicle equipment and vehicle device
JP2010218070A (en) * 2009-03-16 2010-09-30 Toyota Motor Corp Management device
JP2015103163A (en) * 2013-11-27 2015-06-04 株式会社オートネットワーク技術研究所 Program update system and program update method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
五味俊夫: "インターネットビジネスのセキュリティー", CARDWAVE, vol. 第12巻,第5号, JPN6019027032, 10 April 1999 (1999-04-10), JP, pages 56 - 60, ISSN: 0004075343 *
滝澤隆史: "即実践! セキュリティ対策 第9回 パッケージ管理システムのセキュリティ", 日経LINUX, vol. 第12巻,第6号, JPN6019027030, 8 May 2010 (2010-05-08), JP, pages 157 - 162, ISSN: 0004075342 *

Cited By (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7207301B2 (en) 2017-06-13 2023-01-18 住友電気工業株式会社 Update controller, control method and computer program
US11537382B2 (en) 2017-06-13 2022-12-27 Sumitomo Electric Industries, Ltd. Updating control device, control method, and computer program
JPWO2018230084A1 (en) * 2017-06-13 2020-04-09 住友電気工業株式会社 Update control device, control method, and computer program
WO2019017175A1 (en) * 2017-07-19 2019-01-24 株式会社オートネットワーク技術研究所 Transmission device, transmission method, and computer program
JP2019036251A (en) * 2017-08-21 2019-03-07 株式会社東芝 Update controller, software update system, and update control method
WO2019116896A1 (en) * 2017-12-11 2019-06-20 株式会社オートネットワーク技術研究所 On-vehicle update device, program, and program or data update method
JP2019105945A (en) * 2017-12-11 2019-06-27 株式会社オートネットワーク技術研究所 In-vehicle updating apparatus, program, and method of updating program or data
JP2019174987A (en) * 2018-03-27 2019-10-10 株式会社東芝 Communication adapter and firmware update method
JP2021524633A (en) * 2018-05-23 2021-09-13 ロベルト・ボッシュ・ゲゼルシャフト・ミト・ベシュレンクテル・ハフツングRobert Bosch Gmbh A method and control for exchanging an executable first program code for an executable second program code
US11429375B2 (en) 2018-05-23 2022-08-30 Robert Bosch Gmbh Method for exchanging a first executable program code and a second executable program code, and a control unit
JP2020021142A (en) * 2018-07-30 2020-02-06 トヨタ自動車株式会社 Program updating system, program updating server, and vehicle
US11625233B2 (en) 2018-07-30 2023-04-11 Toyota Jidosha Kabushiki Kaisha Software update program for in-vehicle devices and associated server
JP7225596B2 (en) 2018-07-30 2023-02-21 トヨタ自動車株式会社 Program update system, program update server and vehicle
JP7003976B2 (en) 2018-08-10 2022-01-21 株式会社デンソー Vehicle master device, update data verification method and update data verification program
JP2022031446A (en) * 2018-08-10 2022-02-18 株式会社デンソー Electronic control device, update data verification program and processing result transmission program
JP2020027636A (en) * 2018-08-10 2020-02-20 株式会社デンソー Master device for vehicle, method for verifying update data, and program for verifying update data
CN112703706A (en) * 2018-09-25 2021-04-23 株式会社自动网络技术研究所 Relay device system and relay device
CN113168382A (en) * 2018-11-28 2021-07-23 株式会社自动网络技术研究所 Monitoring device, monitoring program, and monitoring method
CN113453959A (en) * 2019-03-04 2021-09-28 株式会社自动网络技术研究所 Vehicle-mounted updating device, update processing program, and program updating method
CN113632155B (en) * 2019-03-29 2024-04-12 日立安斯泰莫株式会社 Arithmetic device and determination method
CN113632155A (en) * 2019-03-29 2021-11-09 日立安斯泰莫株式会社 Arithmetic device and determination method
JP2022543670A (en) * 2019-09-19 2022-10-13 株式会社デンソー Vehicle control systems for cyber security and financial transactions
JP2021060797A (en) * 2019-10-07 2021-04-15 トヨタ自動車株式会社 Program update system, program transmitter, and program transmission method
US11714628B2 (en) 2019-10-07 2023-08-01 Toyota Jidosha Kabushiki Kaisha Program update system, program transmission device, and program transmission method
JP7298427B2 (en) 2019-10-07 2023-06-27 トヨタ自動車株式会社 Program update system and program update method
JP7204726B2 (en) 2020-12-22 2023-01-16 本田技研工業株式会社 Control system, mobile object, server, control method, update control method, and program
JP2022099197A (en) * 2020-12-22 2022-07-04 本田技研工業株式会社 Control system, mobile body, server, control method, update control method, and program
US11880671B2 (en) 2020-12-22 2024-01-23 Honda Motor Co., Ltd. Control system, moving object, server, and control method for performing a program update of the moving object

Also Published As

Publication number Publication date
JP6678548B2 (en) 2020-04-08

Similar Documents

Publication Publication Date Title
JP6678548B2 (en) Relay device, relay method and program
US10437680B2 (en) Relay apparatus, relay method, and computer program product
US9864599B2 (en) Firmware update method in two-chip solution for secure terminal
US20190057214A1 (en) Update control device, terminal, and method of controlling
US9436456B2 (en) System and method for management of software updates at a vehicle computing system
JP6585019B2 (en) Network monitoring device, network system and program
JP2019036251A (en) Update controller, software update system, and update control method
JP7280412B2 (en) GATEWAY DEVICE, IN-VEHICLE NETWORK SYSTEM AND FIRMWARE UPDATE METHOD
JP6585072B2 (en) Safe reading of data into non-volatile memory or secure elements
JP6385842B2 (en) Information processing terminal, information processing method, and information processing system
WO2020179592A1 (en) Vehicle-mounted updating device, update processing program, and program updating method
JP2011108167A (en) Computer system
JP2009230399A (en) Firmware update system and firmware update program
AU2019201237A1 (en) Updating software packets in water installation controlling apparatus
JP2023505844A (en) Package-based remote firmware update
TW201523447A (en) Server system and firmware update method
KR102386614B1 (en) IoT Device Firmware Update System, IoT Device Firmware Update Method, and IoT Device Booting Method
JP2021511583A (en) Methods and devices for remotely updating satellite devices
US11496304B2 (en) Information processing device, information processing method, and storage medium
JP2007329731A (en) Method, system, and program for certificate update
JP2022187189A (en) Ota master, center, system, method, program, and vehicle
CN105243325A (en) Method for residual process file in mobile terminal, mobile terminal and server
CN111143832A (en) Mobile terminal SDK (software development kit) suitable for multiple scenes and hybrid authorization method thereof
JP2018194981A (en) Communication system, mobile object, and control program rewriting method
WO2021184712A1 (en) Software upgrading method and device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180904

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190621

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190716

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190912

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20200218

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200317

R151 Written notification of patent or utility model registration

Ref document number: 6678548

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151