Apparatus, firmware update method and control program - Patents.com
The gateway device and method ensure compatible firmware updates by verifying and simulating the operation of firmware across all ECUs, preventing vehicle malfunctions during updates.
Patent Information
- Application Number
- JP2023111305
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2015-09-14
- Filing Date
- 2023-07-06
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2036-05-31
AI Technical Summary
Existing firmware update methods for electronic control units (ECUs) in vehicles do not adequately prevent vehicles from malfunctioning after updates, as they do not ensure compatibility and proper operation verification across the network.
A gateway device and method that verifies the operation of firmware updates by comparing and simulating the update firmware with the existing firmware versions of all connected ECUs, ensuring compatibility and safe updates.
Reduces the likelihood of vehicle malfunction by ensuring that firmware updates are compatible with the entire network configuration, thereby maintaining vehicle functionality.
Smart Images

Figure 0007588687000001 
Figure 0007588687000002 
Figure 0007588687000003
Abstract
Description
[Technical field]
[0001] The present invention relates to a technique for updating firmware of an electronic control unit that communicates via an in-vehicle network. [Background technology]
[0002] In recent years, many devices called Electronic Control Units (ECUs) are installed in the systems inside automobiles. The network that connects these ECUs is called the There are many standards for in-vehicle networks. One of the most mainstream standards for in-vehicle networks is the CAN (Controller Area Network) standard defined in ISO11898-1.
[0003] In CAN, the communication path consists of two buses, and the ECUs connected to the buses are called nodes. Each node connected to the bus sends and receives messages called frames. In addition, in CAN, there are no identifiers that indicate the destination or source of the message; the sending node attaches an ID called a message ID to each frame and sends it (i.e., sends a signal to the bus), and each receiving node receives only predetermined message IDs (i.e., reads signals from the bus).
[0004] In the case where multiple ECUs work in cooperation with each other by sending and receiving messages via a bus, if one ECU starts updating its firmware, it may affect the running of the vehicle due to the inability to send and receive messages during the update. In this regard, a technique is known that updates firmware only when it is determined that the firmware of the ECU can be updated based on information indicating the vehicle's state, such as when the vehicle is stopped (see Patent Document 1). [Prior art documents] [Patent documents]
[0005] [Patent Document 1] JP 2010-273181 A Summary of the Invention [Problem to be solved by the invention]
[0006] However, although the technology of Patent Document 1 executes firmware updates at appropriate (for example, safe) times, it does not prevent vehicles such as automobiles from not functioning properly after firmware updates.
[0007] Therefore, the present invention provides a firmware update method that reduces the possibility that a vehicle will not function properly after a firmware update. The present invention also provides a gateway device that controls firmware update so as to reduce the possibility that a vehicle will not function properly after a firmware update, and a control program for firmware update used in the gateway device. [Means for solving the problem]
[0008] In order to solve the above problem, a gateway device according to one embodiment of the present invention is a gateway device connected to a network used for communication by multiple electronic control units mounted on a vehicle, and includes a receiving unit that receives firmware update information including identification information that identifies one of the multiple electronic control units, update firmware for the electronic control unit identified by the identification information, and verified configuration information; an acquiring unit that acquires system configuration information including identification information that identifies each of the multiple electronic control units connected to the network and the firmware version of each of the multiple electronic control units identified by the identification information, the verified configuration information indicating identification information that identifies each of the multiple electronic control units used to verify the operation of the update firmware and the firmware version of each of the multiple electronic control units identified by the identification information; and an update processing unit that compares the firmware version of each of the multiple electronic control units identified by the identification information indicated in the system configuration information with the firmware version of each of the multiple electronic control units identified by the identification information indicated in the verified configuration information, and performs control for updating the firmware of the corresponding electronic control unit based on the update firmware if the comparison result satisfies a certain condition.
[0009] In order to solve the above problem, a firmware update method according to one aspect of the present invention is a firmware update method for updating firmware of an electronic control unit, the method comprising the steps of: a gateway device connected to a network used for communication by a plurality of electronic control units mounted on a vehicle receiving firmware update information including identification information for identifying one of the plurality of electronic control units, update firmware for the electronic control unit identified by the identification information, and verified configuration information; and a gateway device connected to a network used for communication by a plurality of electronic control units mounted on a vehicle receiving firmware update information including identification information for identifying one of the plurality of electronic control units, update firmware for the electronic control unit identified by the identification information, and verified configuration information. the gateway device acquires system configuration information including identification information identifying each of the plurality of electronic control units connected to the network and the firmware version of each of the plurality of electronic control units identified by the identification information; and an update processing step of comparing the firmware version of each of the plurality of electronic control units identified by the identification information, as indicated by the system configuration information, with the firmware version of each of the plurality of electronic control units identified by the identification information, as indicated by the verified configuration information, and performing control for updating the firmware of the corresponding electronic control unit based on the update firmware if the comparison result satisfies a certain condition.
[0010] In order to solve the above problem, a control program according to one aspect of the present invention is a control program for causing a gateway device having a processor connected to a network used for communication by a plurality of electronic control units mounted on a vehicle to execute a firmware update process, the firmware update process including a receiving step of receiving firmware update information including identification information for identifying one of the plurality of electronic control units, update firmware for the electronic control unit identified by the identification information, and verified configuration information, the verified configuration information including identification information for identifying each of the plurality of electronic control units used in verifying the operation of the update firmware, and the plurality of electronic control units identified by the identification information. the firmware version of each of the electronic control units identified by the identification information, which is indicated by the system configuration information, with the firmware version of each of the electronic control units identified by the identification information, which is indicated by the verified configuration information, and if the comparison result satisfies a certain condition, performing control for updating the firmware of the corresponding electronic control unit based on the update firmware.
[0011] In order to solve the above problem, a gateway device according to one aspect of the present invention is a gateway device connected to a network used for communication by a plurality of electronic control units mounted on a vehicle, the gateway device including a receiving unit that receives firmware update information including identification information that identifies one of the plurality of electronic control units, update firmware for the electronic control unit identified by the identification information, and verified configuration information, the verified configuration information indicating the identification information that identifies each of the plurality of electronic control units used in verifying the operation of the update firmware and the firmware versions of each of the plurality of electronic control units identified by the identification information, and the identification information that identifies each of the plurality of electronic control units connected to the network and the firmware versions of each of the plurality of electronic control units identified by the identification information the firmware version of each of the electronic control units specified by the identification information indicated in the system configuration information and the firmware version of each of the electronic control units specified by the identification information indicated in the verified configuration information; and if the comparison result does not satisfy a certain condition, have the simulation unit simulate the operation of the update firmware using the system configuration information, and after operation verification by the simulation has been performed, perform control for updating the firmware of the corresponding electronic control unit based on the update firmware.
[0012] In addition, in order to solve the above problem, a firmware update method according to one aspect of the present invention is a firmware update method for updating firmware of an electronic control unit, comprising: a receiving step in which a gateway device connected to a network used for communication by a plurality of electronic control units mounted on a vehicle receives firmware update information including identification information identifying one of the plurality of electronic control units, update firmware for the electronic control unit identified in the identification information, and verified configuration information; the verified configuration information indicates identification information identifying each of a plurality of electronic control units used in operation verification of the update firmware and firmware versions of each of the plurality of electronic control units identified in the identification information, and the gateway device identifies each of the plurality of electronic control units connected to the network using the identification information; The method includes an acquisition step of acquiring system configuration information including the firmware version of each of the plurality of electronic control units identified by separate information; a simulation step of simulating the plurality of electronic control units; and an update processing step of comparing the firmware version of each of the plurality of electronic control units identified by identification information indicated by the system configuration information with the firmware version of each of the plurality of electronic control units identified by identification information indicated by the verified configuration information, and if the comparison result does not satisfy a certain condition, causing the gateway device to simulate the operation of the update firmware using the system configuration information in the simulation step, and after operation verification by the simulation, controlling the update of the firmware of the corresponding electronic control unit based on the update firmware.
[0013] In order to solve the above problem, a control program according to one aspect of the present invention is a control program for causing a gateway device having a processor connected to a network used for communication by a plurality of electronic control units mounted on a vehicle to execute a firmware update process, the firmware update process including a receiving step of receiving firmware update information including identification information for identifying one of the plurality of electronic control units, update firmware for the electronic control unit identified by the identification information, and verified configuration information, the verified configuration information indicating identification information for identifying each of the plurality of electronic control units used in operation verification of the update firmware and firmware versions of each of the plurality of electronic control units identified by the identification information, and an identification step of identifying each of the plurality of electronic control units connected to the network. the firmware version of each of the plurality of electronic control units identified by the identification information and the verified configuration information, and if the comparison result does not satisfy a certain condition, causing the simulation step to simulate the operation of the update firmware using the system configuration information, and after operation verification by the simulation, controlling the update of the firmware of the corresponding electronic control unit based on the update firmware.
[0014] In order to solve the above problem, a gateway device according to one embodiment of the present invention is a gateway device connected to a bus used for communication by multiple electronic control units mounted on a vehicle, and includes a receiving unit that receives firmware update information including update firmware for one of the multiple electronic control units from an external device outside the vehicle, an acquiring unit that acquires system configuration information indicating the type of each of the multiple electronic control units connected to the bus, and an update processing unit that performs control for updating the firmware of the corresponding electronic control unit based on the update firmware after operational verification of the update firmware is performed using each type of electronic control unit indicated by the system configuration information.
[0015] In addition, in order to solve the above-mentioned problems, a firmware update method according to one embodiment of the present invention is a firmware update method for updating firmware of an electronic control unit, the firmware update method including: a receiving step in which a gateway device connected to a bus used for communication by a plurality of electronic control units mounted on a vehicle receives firmware update information including update firmware for one of the plurality of electronic control units from an external device outside the vehicle; an acquisition step in which the gateway device acquires system configuration information indicating the types of each of the plurality of electronic control units connected to the bus; and an update processing step in which the gateway device performs control for updating the firmware of the corresponding electronic control unit based on the update firmware after operational verification of the update firmware is performed using each type of electronic control unit indicated by the system configuration information.
[0016] In addition, in order to solve the above problem, a control program according to one embodiment of the present invention is a control program for causing a gateway device having a processor connected to a bus used for communication by multiple electronic control units mounted on a vehicle to execute a firmware update process, the firmware update process including a receiving step of receiving firmware update information including update firmware for one of the multiple electronic control units from an external device outside the vehicle, an acquiring step of acquiring system configuration information indicating the type of each of the multiple electronic control units connected to the bus, and an update processing step of performing control for updating the firmware of the corresponding electronic control unit based on the update firmware after operational verification of the update firmware is performed using each type of electronic control unit indicated by the system configuration information. Effect of the Invention
[0017] According to the present invention, the possibility that a vehicle will not function properly after a firmware update is reduced. [Brief description of the drawings]
[0018] [Figure 1] 1 is a diagram showing an overall configuration of an in-vehicle network system according to a first embodiment. [Diagram 2] FIG. 2 is a diagram illustrating a format of a data frame defined by the CAN protocol. [Diagram 3] FIG. 2 is a configuration diagram of a gateway according to the first embodiment. [Figure 4] FIG. 13 is a diagram showing an example of a reception ID list. [Diagram 5] FIG. 2 is a diagram illustrating an example of a transfer rule used by a gateway. [Figure 6] 4 is a diagram showing an example of system configuration information (a list of ECU information) according to the first embodiment. FIG. [Figure 7] FIG. 2 is a configuration diagram of an ECU according to the first embodiment. [Figure 8] FIG. 2 is a configuration diagram of a server according to the first embodiment. [Figure 9] FIG. 4 is a diagram illustrating an example of vehicle ECU management information held by a server. [Figure 10] 4 is a diagram showing an example of a format of firmware (FW) update information according to the first embodiment; FIG. [Figure 11] FIG. 12 is a sequence diagram showing an example of an operation related to firmware update in the first embodiment (continued from FIG. 12). [Figure 12] FIG. 14 is a sequence diagram showing an example of an operation relating to firmware update in the first embodiment (continued from FIG. 11). [Figure 13] 5 is a flowchart showing an example of a FW update control process by the gateway according to the first embodiment. [Figure 14] 5 is a flowchart showing an example of a FW update control process performed by an ECU according to the first embodiment. [Figure 15] FIG. 11 is a configuration diagram of a gateway according to a second embodiment. [Figure 16] FIG. 11 is a diagram illustrating an example of a format of FW update information according to the second embodiment. [Figure 17] FIG. 11 is a diagram showing an example of a format of ECU configuration information according to the second embodiment. [Figure 18] FIG. 11 is a configuration diagram of a server according to the second embodiment. [Figure 19] FIG. 11 is a diagram showing an example of an ECU vehicle model management table according to the second embodiment. [Figure 20] FIG. 11 is a diagram showing an example of a vehicle model ECU management table according to the second embodiment. [Figure 21] 11 is a flowchart showing a FW registration process for registering update firmware by a server in the second embodiment. [Figure 22] 11 is a flowchart showing an example of a FW operation verification process performed by a server according to the second embodiment. [Figure 23] 11 is a flowchart showing an example of a FW operation verification process for verifying a plurality of firmware by a server according to the second embodiment. [Figure 24]FIG. 25 is a sequence diagram showing an example of an operation relating to firmware update in the second embodiment (continued from FIG. 25). [Diagram 25] FIG. 27 is a sequence diagram showing an example of an operation relating to firmware update in the second embodiment (continued from FIG. 24). [Figure 26] FIG. 11 is a diagram illustrating an example of a software configuration of a virtual environment by a simulator used in the FW operation verification process in the second embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0019] A gateway device according to one aspect of the present invention is a gateway device connected to a bus used for communication by a plurality of electronic control units mounted on a vehicle, the gateway device including: a receiving unit that receives firmware update information including update firmware for one of the plurality of electronic control units from an external device outside the vehicle; an acquiring unit that acquires system configuration information indicating the type of each of the plurality of electronic control units connected to the bus; and an update processing unit that performs control for updating the firmware of the corresponding electronic control unit based on the update firmware after operational verification of the update firmware is performed using each type of electronic control unit indicated by the system configuration information. As a result, when updating firmware, the update control is performed after ensuring the implementation of operational verification of the update firmware corresponding to the plurality of electronic control units, thereby reducing the possibility that the vehicle will not function properly after the firmware is updated, compared to when operational verification is not performed.
[0020] The firmware update information may include verified configuration information indicating the type of each of the electronic control units used in the operational verification of the update firmware, and the update processing unit may compare the type of each of the electronic control units mounted on the vehicle indicated by the system configuration information with the type of each of the electronic control units used in the operational verification indicated by the verified configuration information received by the receiving unit, and perform the control to perform the update based on the update firmware when the comparison result satisfies a certain condition. This makes it possible to check whether or not a valid operational verification has been performed in accordance with the configuration of the in-vehicle network in the vehicle equipped with the gateway device (the composition of the electronic control units), and therefore makes it possible to ensure that the operational verification is performed appropriately.
[0021] The type of each of the electronic control units connected to the bus, as indicated by the system configuration information, may identify the version of firmware implemented in the electronic control unit, and the type of each of the electronic control units used in operational verification of the update firmware, as indicated by the verified configuration information, may identify the version of firmware implemented in the electronic control unit. This makes it possible to check whether operational verification has been performed in an operating environment where the same version of firmware as that of the firmware of each electronic control unit connected to the in-vehicle network is implemented, thereby making it possible to ensure that operational verification is performed appropriately.
[0022] In addition, when the update processing unit confirms that the verified configuration information received by the receiving unit indicates the same types as all types indicated by the system configuration information, the update processing unit may perform the control assuming that the comparison result satisfies the certain condition. This makes it possible to ensure that, when updating firmware, operation verification of the update firmware is performed using an electronic control unit of the same type as each electronic control unit connected to an in-vehicle network in a vehicle equipped with a gateway device.
[0023] Moreover, the gateway device may further include a transmitting unit that transmits the system configuration information to the external device, and the update processing unit may perform the control to cause the update to be performed based on the update firmware in the firmware update information when the firmware update information transmitted by the receiving unit after the external device has verified the operation of the update firmware using a plurality of electronic control units by referring to the system configuration information after the transmitting unit has transmitted the system configuration information to the external device. In this way, the firmware is updated after the external device has verified the operation of the update firmware using electronic control units of the same type as each electronic control unit connected to the in-vehicle network in the vehicle in which the gateway device is mounted, thereby reducing the possibility that the vehicle will not function properly after the firmware is updated.
[0024] The system configuration information may include, for each of the electronic control units connected to the bus, identification information for the electronic control unit for identifying the type and identification information for the version of firmware implemented in the electronic control unit. This allows the external device to perform operation verification in an operating environment where the same version of firmware as that of each electronic control unit connected to the in-vehicle network is implemented, thereby reducing the possibility that the vehicle will not function properly after a firmware update.
[0025] Furthermore, the gateway device may include a transmitting unit having a function of transmitting the system configuration information to the external device, the firmware update information includes verified configuration information indicating the types of each of a plurality of electronic control units used in operational verification of the update firmware, and when the update processing unit confirms that the verified configuration information received by the receiving unit does not indicate the same types as all of the types indicated in the system configuration information, the update processing unit may control the transmitting unit to transmit the system configuration information to the external device, thereby suppressing the update based on the update firmware. In this way, when an appropriate operational verification of the update firmware corresponding to the configuration of the in-vehicle network in the vehicle equipped with the gateway device has not been performed, useful information for performing an appropriate operational verification is transmitted, thereby increasing the possibility that an appropriate operational verification of the update firmware will be performed.
[0026] The gateway device may further include a simulation unit that simulates a plurality of electronic control units, and the firmware update information includes verified configuration information indicating the types of the plurality of electronic control units used in the operation verification of the update firmware. When the verified configuration information received by the receiving unit confirms that the same types as all the types indicated by the system configuration information are not indicated, the update processing unit may perform the control to cause the simulation unit to simulate the operation of the update firmware using each electronic control unit of the same type as all the types indicated by the system configuration information, and to perform the update based on the update firmware after the operation verification by the simulation. In this way, when the operation verification corresponding to each electronic control unit in the in-vehicle network has not been performed, the operation verification of the update firmware is performed by simulation before the firmware is updated, thereby reducing the possibility that the vehicle will not function normally after the firmware is updated. Note that, for example, in a state after the electronic control unit mounted on the vehicle is replaced or added to the firmware that has been verified in accordance with the configuration of a standard electronic control unit and transmitted, the operation verification is not appropriate, so it is useful to perform a new appropriate operation verification.
[0027] The gateway device may further include a simulation unit that simulates a plurality of electronic control units, and the update processing unit may cause the simulation unit to simulate the operation of the update firmware using all of the electronic control units of the same type as all of the types indicated by the system configuration information, and may perform the control to cause the simulation unit to perform the update based on the update firmware after the operation verification by the simulation. In this way, the firmware is updated after the operation verification of the update firmware by simulation, thereby reducing the possibility that the vehicle will not function properly after the firmware is updated.
[0028] The electronic control units connected to the bus may communicate via the bus in accordance with a Controller Area Network (CAN) protocol, and the update processing unit may transmit the update firmware to the corresponding electronic control unit via the bus as the control for updating the firmware of the corresponding electronic control unit based on the update firmware. In this way, after the operation verification of the update firmware is ensured, the update firmware is transmitted to the electronic control unit in the in-vehicle network conforming to CAN to update the firmware, thereby reducing the possibility that the vehicle will not function properly after the firmware is updated.
[0029] A firmware update method according to one aspect of the present invention is a firmware update method for updating firmware of an electronic control unit, the firmware update method including a receiving step in which a gateway device connected to a bus used for communication by a plurality of electronic control units mounted on a vehicle receives firmware update information including update firmware for one of the plurality of electronic control units from an external device outside the vehicle, an acquiring step in which the gateway device acquires system configuration information indicating the types of each of the plurality of electronic control units connected to the bus, and an updating processing step in which the gateway device performs control for updating the firmware of the corresponding electronic control unit based on the update firmware after operational verification of the update firmware using each type of electronic control unit indicated by the system configuration information. As a result, when updating firmware, the update control is performed after ensuring the implementation of operational verification of the update firmware corresponding to the plurality of electronic control units, and therefore the possibility that the vehicle will not function properly after the firmware update is reduced compared to when operational verification is not performed.
[0030] The firmware update method may further include an operation verification step in which the external device performs operation verification of the update firmware using a plurality of electronic control units, and a firmware update information transmission step in which the external device transmits, in the firmware update information, verified configuration information indicating the type of each of the plurality of electronic control units used in the operation verification in the operation verification step, and the update processing step may compare the type of each of the plurality of electronic control units mounted on the vehicle indicated by the system configuration information with the type of each of the plurality of electronic control units used in the operation verification indicated by the verified configuration information received in the receiving step, and perform the control to perform the update based on the update firmware when the comparison result satisfies a certain condition. This makes it possible to check whether or not a valid operation verification has been performed in accordance with the configuration (organization of the electronic control units) of the in-vehicle network in the vehicle equipped with the gateway device, thereby making it possible to ensure that the operation verification is performed appropriately.
[0031] The firmware update method may further include an operation verification request transmission step in which the gateway device transmits the system configuration information acquired in the acquisition step to the external device, an operation verification step in which the external device receives the system configuration information transmitted in the operation verification request transmission step and performs operation verification of the update firmware using a plurality of electronic control units of the same type as all of the types indicated by the system configuration information, and a firmware update information transmission step in which the external device transmits the firmware update information after the operation verification in the operation verification step, and the update processing step may perform the control to cause the update based on the update firmware when the firmware update information is received in the reception step after the transmission of the system configuration information in the operation verification request transmission step. As a result, the firmware is updated after the external device performs operation verification of the update firmware using electronic control units of the same type as each electronic control unit connected to the in-vehicle network in the vehicle equipped with the gateway device, thereby reducing the possibility that the vehicle will not function properly after the firmware is updated.
[0032] A control program according to one aspect of the present invention is a control program for causing a gateway device having a processor connected to a bus used for communication by a plurality of electronic control units mounted on a vehicle to execute a firmware update process, the firmware update process including a receiving step of receiving firmware update information including update firmware for one of the plurality of electronic control units from an external device outside the vehicle, an acquiring step of acquiring system configuration information indicating the type of each of the plurality of electronic control units connected to the bus, and an updating process step of performing control for updating the firmware of the corresponding electronic control unit based on the update firmware after the operation verification of the update firmware is performed using each type of electronic control unit indicated by the system configuration information. By installing and executing this control program in a device (e.g., a gateway device) in the vehicle having a processor, the update control is performed after the operation verification of the update firmware corresponding to the plurality of electronic control units is ensured when updating the firmware. This reduces the possibility that the vehicle will not function properly after the firmware is updated.
[0033] Furthermore, these general or specific aspects may be realized by a system, a method, an integrated circuit, a computer program, or a recording medium such as a computer-readable CD-ROM, or may be realized by any combination of the system, method, integrated circuit, computer program, or recording medium.
[0034] An in-vehicle network system including a gateway device according to an embodiment will be described below with reference to the drawings. Each of the embodiments shown here shows a specific example of the present invention. Therefore, the numerical values, components, the arrangement and connection form of the components, as well as the steps (processes) and the order of the steps shown in the following embodiments are merely examples and do not limit the present invention. Among the components in the following embodiments, those not described in the independent claims are components that can be added arbitrarily. Furthermore, each figure is a schematic diagram and is not necessarily a precise illustration.
[0035] (Embodiment 1) Hereinafter, as an embodiment of the present invention, a firmware update method used in an in-vehicle network system 10 in which a plurality of electronic control units (ECUs) including a gateway device communicate with each other via a bus will be described with reference to the drawings.
[0036] The firmware update method is a method for updating (i.e., replacing) firmware (FW) implemented in each ECU mounted on a vehicle with new update firmware distributed from a server located outside the vehicle. In the in-vehicle network system 10, in order to reduce the possibility that the vehicle will not function properly after the firmware is updated, a method is used in which the operation of the update firmware is verified using multiple ECUs corresponding to the vehicle before the firmware is updated.
[0037] [1.1 Overall configuration of the in-vehicle network system 10] FIG. 1 is a diagram showing an overall configuration of an in-vehicle network system 10 according to the first embodiment.
[0038] The in-vehicle network system 10 is an example of a network communication system that communicates according to the CAN protocol, and is a network communication system in a vehicle equipped with various devices such as a control device, a sensor, an actuator, a user interface device, etc. The in-vehicle network system 10 includes a plurality of devices that perform frame-related communication via a bus, and uses a firmware update method.
[0039] Specifically, as shown in FIG. 1, the in-vehicle network system 10 includes ECUs 100a to 100d, buses 200a and 200b, and a gateway 300 that are mounted on a vehicle and connected to various devices, as well as a network 400 and a server 500 outside the vehicle. The in-vehicle network system 10 may include several ECUs in addition to the gateway 300 and the ECUs 100a to 100d, but for the sake of convenience, the following description focuses on the gateway 300 and the ECUs 100a to 100d. The ECU is a device that includes, for example, a processor (microprocessor), digital circuits such as memory, analog circuits, and communication circuits. The memory is a ROM, a RAM, or the like, and can store a control program (a computer program as software) executed by the processor. The firmware is all or a part of this control program, and is stored in a non-volatile memory (called a boot ROM) such as an EEPROM (Electrically Erasable Programmable Read Only Memory). For example, the ECU realizes various functions by having the processor operate according to a control program (computer program). Note that a computer program is composed of a combination of multiple instruction codes that indicate commands to the processor to achieve a specific function. Note that the firmware may include all or part of the microcode for interpreting instructions within the processor.
[0040] ECUs 100a to 100d are each connected to devices such as an engine 101, a brake 102, a door opening / closing sensor 103, and a window opening / closing sensor 104, and acquire the status of the devices and periodically transmit frames (data frames) representing the status to an in-vehicle network consisting of buses 200a, 200b, etc.
[0041] Gateway 300 is a kind of ECU as a gateway device connected to bus 200a to which ECU 100a and ECU 100b are connected, and to bus 200b to which ECU 100c and ECU 100d are connected. Gateway 300 has a function of transferring a frame received from one bus to the other bus, and also has a function of communicating with server 500 via network 400.
[0042] The server 500 as an external device located outside the vehicle is a computer having a function of distributing FW update information, which is data for updating the firmware of the ECUs 100a to 100d, via the network 400. Any communication protocol, such as wireless communication or wired communication, may be applied to the communication in the network 400.
[0043] Each ECU in the in-vehicle network system 10 exchanges frames according to the CAN protocol. The frames in the CAN protocol include a data frame, a remote frame, an overload frame, and an error frame.
[0044] [1.2 Data frame format] Below, we will explain the data frame, which is one of the frames used in networks that conform to the CAN protocol.
[0045] FIG. 2 is a diagram showing the format of a data frame defined by the CAN protocol. The figure shows a data frame in the standard ID format defined by the CAN protocol. The data frame consists of SOF (Start Of Frame), ID field, RTR (Remote Transmission Request), IDE (Identifier Extension), and a reserved bit " It is composed of the following fields: "Data Length Code (DLC)", a data field, a Cyclic Redundancy Check (CRC) sequence, a CRC delimiter "DEL", an ACK (Acknowledgement) slot, an ACK delimiter "DEL", and an EOF (End Of Frame) field.
[0046] SOF is composed of 1 bit dominant. When the bus is idle, it is recessive, and by changing it to dominant with SOF, it notifies the start of frame transmission.
[0047] The ID field is an 11-bit field that stores an ID (message ID), which is a value that indicates the type of data. When multiple nodes start transmitting at the same time, this ID field is used to arbitrate communications, so it is designed so that frames with smaller ID values have higher priority.
[0048] The RTR is a value for distinguishing between a data frame and a remote frame, and in a data frame it consists of one dominant bit.
[0049] Both IDE and "r" consist of one dominant bit.
[0050] DLC is a 4-bit value that indicates the length of the data field. The IDE, "r" and DLC are collectively called the control field.
[0051] The data field is a value that indicates the content of the data to be transmitted, consisting of a maximum of 64 bits. The length can be adjusted in 8-bit increments. The specifications of the data to be transmitted are not regulated by the CAN protocol, but are determined by the in-vehicle network system 10. Therefore, the specifications depend on the vehicle model, manufacturer (manufacturer), etc.
[0052] The CRC sequence consists of 15 bits and is calculated from the transmitted values of the SOF, ID field, control field, and data field.
[0053] The CRC delimiter is a delimiter that indicates the end of the CRC sequence, which is composed of 1 recessive bit. The CRC sequence and the CRC delimiter are collectively referred to as the CRC field.
[0054] The ACK slot consists of 1 bit. The transmitting node sets the ACK slot to recessive and transmits. If the receiving node has received the CRC sequence successfully, it transmits the ACK slot as dominant. Since dominant takes precedence over recessive, if the ACK slot is dominant after transmission, the transmitting node can confirm that one of the receiving nodes has successfully received the data.
[0055] The ACK delimiter is a 1-bit recessive delimiter that indicates the end of the ACK.
[0056] EOF consists of 7 recessive bits and indicates the end of a data frame.
[0057] [1.3 Configuration of Gateway 300] 3 is a configuration diagram of the gateway 300. The gateway 300 performs functions such as frame transfer between buses and communication with an external server 500 (receiving FW update information for updating firmware of the ECUs 100a to 100d, etc.). For this reason, the gateway 300 includes a frame transmission / reception unit 310, a frame interpretation unit 320, a received ID determination unit 330, a received ID list holding unit 340, a frame processing unit 350, a transfer rule holding unit 360, a FW update processing unit 370, an ECU information holding unit 372, a signature verification unit 373, a key holding unit 374, an external communication unit 375, a frame generation unit 380, and an ECU information acquisition unit 390, as shown in FIG. 3. Each of these components is realized by a communication circuit in the gateway 300, a processor that executes a control program stored in a memory, a digital circuit, or the like.
[0058] Frame transmitting / receiving unit 310 transmits and receives frames conforming to the CAN protocol to and from bus 200a and bus 200b, respectively. Frame transmitting / receiving unit 310 receives a frame from bus 200a or bus 200b and transfers it to frame interpretation unit 320. Frame transmitting / receiving unit 310 also transmits the contents of the frame to bus 200a or bus 200b based on bus information indicating the destination bus notified by frame generating unit 380 and the frame.
[0059] The frame interpretation unit 320 receives the frame value from the frame transmission / reception unit 310, and interprets it so as to map it to each field in the frame format defined by the CAN protocol. The frame interpretation unit 320 transfers the value that it judges to be an ID field to the received ID determination unit 330. Depending on the judgment result notified by the received ID determination unit 330, the frame interpretation unit 320 decides whether to transfer the value of the ID field and the data field (data) that appears after the ID field to the frame processing unit 350, or to stop receiving the frame. If the frame interpretation unit 320 judges that the frame does not comply with the CAN protocol, it notifies the frame generation unit 380 to transmit an error frame. If the frame interpretation unit 320 receives an error frame, it discards the frame that is being received thereafter, that is, it stops interpreting the frame.
[0060] The received ID determination unit 330 receives the value of the ID field notified by the frame interpretation unit 320, and determines whether or not to receive each field of the frame following the ID field, according to the list of message IDs held by the received ID list holding unit 340. The received ID determination unit 330 notifies the frame interpretation unit 320 of the result of this determination.
[0061] The received ID list holding unit 340 holds a received ID list, which is a list of IDs (message IDs) received by the gateway 300. Fig. 4 is a diagram showing an example of the received ID list.
[0062] The frame processing unit 350 determines a bus to transfer the frame to depending on the ID of the received frame, in accordance with the transfer rules held by the transfer rule holding unit 360, and notifies the frame generating unit 380 of bus information of the bus to transfer to, the message ID notified by the frame interpretation unit 320, and the data. The frame processing unit 350 also notifies the FW update processing unit 370 of data on the update result related to the firmware update notified by the frame interpretation unit 320, and notifies the ECU information acquisition unit 390 of data on the ECU information. Note that the frame processing unit 350 does not transfer the data on the update result related to the firmware update and the data on the ECU information.
[0063] The transfer rule storage unit 360 stores transfer rules, which are information that indicates rules regarding frame transfer for each bus. Fig. 5 is a diagram showing an example of the transfer rules.
[0064] The FW update processing unit 370 requests the signature verification unit 373 to verify the signature of FW update information including FW data such as firmware for update notified from the external communication unit 375, and if the signature verification is successful, notifies the frame generation unit 380 of the FW data related to the firmware for update and bus information of the bus to which the ECU to be updated is connected. The FW update processing unit 370 also notifies the external communication unit 375 of the update result notified from the frame processing unit 350. The FW update processing unit 370 also notifies the external communication unit 375 of system configuration information, which is a collection of ECU information held in the ECU information holding unit 372, as a FW update request, based on a notification from the ECU information acquisition unit 390, etc. The FW update processing unit 370 also notifies the frame generation unit 380 of data required for communication with the ECUs 100a to 100d. The FW update processing unit 370 functions as an update processing unit that performs control for updating the firmware of the corresponding ECU (e.g., transmitting the FW data to the ECU via a bus) only when the operation of the update firmware has been verified using each type of ECU indicated by the system configuration information, and signature verification has been successful after receiving FW update information including FW data for the update firmware, etc.
[0065] The ECU information holding unit 372 holds system configuration information, which is a collection of ECU information that is information about each of all ECUs (ECUs 100a to 100d) connected to the buses 200a and 200b. An example of the system configuration information is shown in FIG.
[0066] The signature verification unit 373 receives data to be subjected to signature verification related to the FW update information from the FW update processing unit 370, performs signature verification using a signature verification key obtained from the key holding unit 374, and notifies the FW update processing unit 370 of the verification result.
[0067] The key holding unit 374 holds a key for verifying the signature of the FW update information received from the server 500 .
[0068] The external communication unit 375 has a function as a receiving unit that receives FW update information including FW data related to firmware for update from the server 500, and notifies the received FW update information to the FW update processing unit 370. The external communication unit 375 also transmits the update result notified from the FW update processing unit 370 to the server 500. The external communication unit 375 also has a function as a transmitting unit that transmits the system configuration information notified from the FW update processing unit 370 to the server 500, which is an external device, as a FW update request. The external communication unit 375 holds in advance, for example, address information of the server 500 required to access the server 500 via the network 400, and the like.
[0069] In accordance with the request for error frame transmission notified by frame interpretation unit 320, frame generation unit 380 notifies frame transmission / reception unit 310 of the error frame to have it transmitted. Furthermore, frame generation unit 380 configures a frame using the message ID and data notified by frame processing unit 350, and notifies frame transmission / reception unit 310 of the frame together with the bus information. Furthermore, frame generation unit 380 configures a frame using FW data related to firmware for update notified by FW update processing unit 370, and notifies frame transmission / reception unit 310 of the frame together with the bus information. Furthermore, frame generation unit 380 configures a frame for ECU information acquisition in accordance with the request notified by ECU information acquisition unit 390, and notifies frame transmission / reception unit 310 of the frame thus configured to transmit.
[0070] In order to acquire ECU information from all ECUs connected to buses 200a and 200b, ECU information acquisition unit 390 requests frame generation unit 380 to generate and transmit a frame (data frame) for ECU information acquisition, for example, periodically. When each ECU receives a frame for ECU information acquisition, it transmits the ECU information in a frame (data frame) with a predetermined ID so that the frame reaches gateway 300. For this reason, ECU information acquisition unit 390 is notified of data related to the ECU information of each ECU from frame processing unit 350 and acquires the data, and updates the ECU information of the system configuration information held by ECU information holding unit 372 as necessary based on the ECU information. That is, ECU information acquisition unit 390 has a function as an acquisition unit that acquires system configuration information indicating the type of each of a plurality of ECUs connected to buses 200a and 200b.
[0071] [1.4 Receiving ID list example] FIG. 4 is a diagram showing an example of the received ID list held in the received ID list holding unit 340 of the gateway 300. As shown in FIG.
[0072] 4 is used to selectively receive and process frames including message IDs whose ID (message ID) values are any of "1," "2," "3," and "4." This is merely one example, but the reception ID list lists the message IDs of frames that gateway 300 is determined to receive.
[0073] [1.5 Example of forwarding rules] FIG. 5 shows an example of the transfer rules stored in the transfer rule storage unit 360 of the gateway 300. As shown in FIG.
[0074] This transfer rule associates a source bus, a destination bus, and the ID (message ID) of the transfer target. An "*" in FIG. 5 indicates that a frame is transferred regardless of the message ID. The example in FIG. 5 shows that frames received from bus 200a are set to be transferred to bus 200b regardless of the message ID. It also shows that only frames with a message ID of "3" among frames received from bus 200b are set to be transferred to bus 200a.
[0075] [1.6 Example of system configuration information] FIG. 6 shows an example of system configuration information (a collection of ECU information) held in the ECU information holding unit 372 of the gateway 300. As shown in FIG.
[0076] The system configuration information in this example is a list of ECU information for each ECU. The ECU information includes an ECU-ID, an ECU type indicating the function type of the ECU, a manufacturer of the ECU, and a FW version which is a version number of the firmware implemented in the ECU. The ECU-ID is, for example, an identifier (identification information) such as a serial number unique to each ECU. The type of ECU can be identified by the ECU-ID and the FW version. ECUs of the same type are, for example, ECUs having the same function related to the operation of sending and receiving data via a bus, and ECUs of different types are ECUs having different functions related to the operation. The example in FIG. 6 indicates that the ECU-ID for the ECU 100a connected to the engine 101 is "0001", the ECU type is a type for engine control identified by "engine", the manufacturer is "Company A", and the FW version of the ECU-ID is 1.0. The initial value of the system configuration information may be set at the time of manufacture, or may be acquired by the gateway 300 from an external device such as the server 500 when, for example, power supply to the gateway 300 is started. When the state changes due to replacement of an ECU connected to the buses 200a and 200b or firmware update, or when a new ECU is introduced into the vehicle and connected to the bus 200a or 200b, the system configuration information can be successively updated based on the ECU information periodically collected by the ECU information acquisition unit 390 so as to indicate the latest state of each ECU in the vehicle.
[0077] [1.7 Configuration of ECU100a] 7 is a configuration diagram of the ECU 100a. The ECU 100a includes a frame transmitting / receiving unit 110, a frame interpretation unit 120, a received ID determination unit 130, a received ID list holding unit 140, a frame processing unit 150, a FW update processing unit 160, a FW cache holding unit 161, a signature verification unit 163, a key holding unit 164, a data acquisition unit 170, and a frame generation unit 180. Each of these components is realized by a communication circuit in the ECU 100a, a processor that executes a control program stored in a memory, a digital circuit, or the like.
[0078] The frame transmitting / receiving unit 110 transmits and receives frames conforming to the CAN protocol to and from the bus 200a. It receives a frame from the bus one bit at a time and transfers it to the frame interpretation unit 120. It also transmits the contents of the frame notified by the frame generation unit 180 to the bus 200a.
[0079] The frame interpretation unit 120 receives the frame value from the frame transmission / reception unit 110, and interprets it so as to map it to each field in the frame format defined by the CAN protocol. The value that is determined to be an ID field is transferred to the received ID determination unit 130. Depending on the determination result notified from the received ID determination unit 130, the frame interpretation unit 120 decides whether to transfer the value of the ID field and the data field that appears after the ID field to the frame processing unit 150, or to stop receiving the frame after receiving the determination result. If the frame interpretation unit 120 determines that the frame does not comply with the CAN protocol, it notifies the frame generation unit 180 to transmit an error frame. If the frame interpretation unit 120 receives an error frame, it discards the frame thereafter, that is, it stops interpreting the frame.
[0080] The received ID determination unit 130 receives the value of the ID field notified from the frame interpretation unit 120, and determines whether or not to receive each field of the frame following the ID field, according to the list of message IDs held by the received ID list holding unit 140. The received ID determination unit 130 notifies the frame interpretation unit 120 of the result of this determination.
[0081] The reception ID list storage unit 140 stores a reception ID list, which is a list of message IDs received by the ECU 100a. This reception ID list is, for example, similar to the example in FIG.
[0082] The frame processing unit 150 performs different processing for each ECU according to the data of the received frame. For example, the ECU 100a connected to the engine 101 has a function of sounding an alarm when the speed exceeds 30 km / h and the door is open. The frame processing unit 150 of the ECU 100a manages data received from other ECUs (e.g., information indicating the state of the door) and performs processing such as sounding an alarm under certain conditions based on the speed acquired from the engine 101. The ECU 100c has a function of sounding an alarm when the door is opened without the brakes being applied. The ECUs 100b and 100d do nothing in particular. Note that the ECUs 100a to 100d may have functions other than those described above. In addition, the frame processing unit 150 notifies the FW update processing unit 160 when it acquires FW data for firmware update and data related to a frame for acquiring ECU information.
[0083] The FW update processing unit 160 requests the signature verification unit 163 to verify the signature of the FW data received from the gateway 300 and notified by the frame processing unit 150, and updates (rewrites) the firmware in the boot ROM of the ECU 100a based on the FW data if the signature verification is successful. The boot ROM is, for example, a non-volatile memory set as a storage destination of firmware executed after reset by the processor of the ECU 100a. When updating the firmware in the boot ROM, the FW update processing unit 160 stores the existing firmware in, for example, the FW cache holding unit 161 so that the firmware can be restored to the state before the update in the event of an update failure. In addition, the FW update processing unit 160 notifies the frame generating unit 180 to generate and transmit a frame indicating the update result of the firmware based on the FW data. The firmware update result may include, for example, the FW version such as the version number of the firmware after the update. In addition, when the FW update processing unit 160 receives a notification from the frame processing unit 150 regarding a frame for acquiring ECU information, the FW update processing unit 160 notifies the frame generating unit 180 to generate and transmit a frame regarding ECU configuration information including the ECU-ID of ECU 100a and the FW version for the current firmware.
[0084] The FW cache holding unit 161 is realized by, for example, a storage area such as a non-volatile memory in the ECU 100a, and is used for storing existing firmware when updating firmware in the boot ROM.
[0085] The signature verification unit 163 receives the FW data to be subjected to signature verification from the FW update processing unit 160, performs signature verification using a signature verification key obtained from the key holding unit 164, and notifies the FW update processing unit 160 of the verification result.
[0086] The key holding unit 164 holds a key for verifying the signature of FW data for updating the firmware.
[0087] The data acquisition unit 170 acquires data indicating the states of devices, sensors, etc. connected to the ECU, and notifies the frame generation unit 180 of the data.
[0088] Frame generation unit 180 composes an error frame in accordance with the notification from frame interpretation unit 120 instructing transmission of an error frame, and notifies frame transmission / reception unit 110 of the error frame to transmit it. Furthermore, frame generation unit 180 composes a frame by attaching a predetermined message ID to the value of the data notified by data acquisition unit 170, and notifies frame transmission / reception unit 110 of the frame. Furthermore, frame generation unit 180 composes a frame by attaching a predetermined message ID to the value of the data notified by data acquisition unit 170, in accordance with an instruction from FW update processing unit 160 to generate a frame of the firmware update result or a frame of ECU configuration information, and notifies frame transmission / reception unit 110 of the frame.
[0089] The ECUs 100b to 100d each have substantially the same configuration as the ECU 100a.
[0090] [1.8 Server 500 Configuration] The server 500 is a computer located outside the vehicle in which the in-vehicle network system 10 is mounted, and includes a memory, a storage medium such as a hard disk, a processor, a communication circuit, etc. The server 500 may also include an input device (such as a keyboard) and a display as a user interface. Assuming that a plurality of vehicles are each mounted with a plurality of ECUs related to the in-vehicle network, the server 500 has a function of managing firmware provided by manufacturers of various ECUs, etc., verifying the operation of the firmware, and distributing FW update information including update firmware to each vehicle.
[0091] 8 is a configuration diagram of the server 500. As shown in the figure, the server 500 includes a data transmission / reception unit 510, a FW update control unit 520, a FW operation verification unit 530, an ECU information holding unit 531, a total FW holding unit 532, a distribution data generation unit 570, a FW holding unit 571, an ECU management information holding unit 572, a signature generation unit 590, and a key holding unit 591. Each of these components is realized by a communication circuit in the server 500, a processor that executes a control program stored in a memory, and the like.
[0092] The data transmission / reception unit 510 communicates with the gateway 300 and transmits and receives data. When the data transmission / reception unit 510 receives system configuration information as a firmware update request (FW update request) from the gateway 300, it notifies the FW update control unit 520, and when there is firmware to be updated in response to the FW update request, it receives FW update information from the FW update control unit 520 and transmits it to the gateway 300. When the data transmission / reception unit 510 receives a firmware update result from the gateway 300, it notifies the FW update control unit 520.
[0093] When the latest firmware for the ECU is uploaded to the server 500 from a terminal device of an ECU manufacturer or the like, the FW update control unit 520 stores the firmware in the FW holding unit 571, and manages the firmware, the FW version indicating the version number, and the information indicating the type of the target ECU, in association with each other based on information from the terminal device. When the FW update control unit 520 receives system configuration information related to a FW update request from the gateway 300 via the data transmission / reception unit 510, if there is firmware to be updated corresponding to the gateway 300 based on the system configuration information, the FW update control unit 520 causes the distribution data generation unit 570 to generate FW update information as a package of firmware for update. Note that the FW update control unit 520 may determine whether there is firmware to be updated based on, for example, information related to the firmware held by the FW holding unit 571 and the system configuration information. Based on the system configuration information, the FW update control unit 520 requests the FW operation verification unit 530 to verify the operation of the firmware to be updated, and causes the data transmission / reception unit 510 to transmit the FW update information after the operation verification is performed (i.e., after it is verified that the firmware operates properly without problems). If the operation verification of the firmware for update fails (i.e., if the firmware does not operate properly), the server 500 does not transmit FW update information including the firmware for update to the gateway 300. Furthermore, when the FW update control unit 520 receives the firmware update result from the gateway 300, it updates the vehicle ECU management information held in the ECU management information holding unit 572.
[0094] The FW operation verification unit 530 has a function of performing a FW operation verification process for verifying that the firmware for updating and the firmware of each ECU in the operating environment, which is configured with the same type of ECU as each ECU indicated by the system configuration information, operate properly (normally) in response to a request from the FW update control unit 520. In the FW operation verification process, for example, an update operation for applying the firmware for updating to an ECU to be updated in the operating environment, and an operation of whether each ECU in the operating environment operates normally after the update are verified. In the FW operation verification process, the operation verification of the firmware for updating may be performed using the hardware of each ECU as the operating environment, or the operation verification of the firmware for updating may be performed by a simulation in a virtual environment that simulates (pseudo-executes) each ECU. Here, an example of verifying the operation of the firmware for updating by a simulation in a virtual environment that simulates each ECU will be described as an example.
[0095] The ECU information storage unit 531 stores information (software) for simulating various ECUs, and the information includes the latest firmware used by the various ECUs.
[0096] The all FW holding unit 532 holds all firmware including past versions of firmware as well as the latest firmware corresponding to various ECUs. With reference to the ECU information holding unit 531 and the all FW holding unit 532, the FW operation verification unit 530 constructs an operating environment that simulates the type of each ECU identified by the ECU-ID and FW version in the system configuration information and an ECU of the same type, and verifies whether the operation is performed properly without problems by simulating an update in which the update firmware is applied and the operation thereafter.
[0097] The distribution data generation unit 570 generates FW update information as a package of firmware for updating to be distributed to the gateway 300, and requests the signature generation unit 590 to generate a signature for the FW update information. The format of the FW update information will be described later (see FIG. 10).
[0098] The FW storage unit 571 stores the uploaded firmware for the ECU.
[0099] The ECU management information storage unit 572 stores vehicle ECU management information, which is information about each ECU in the vehicle network of each vehicle. The vehicle ECU management information will be described later (see FIG. 9).
[0100] Upon receiving a request from the distribution data generation unit 570, the signature generation unit 590 uses the signature key held in the key holding unit 591 to generate a signature for the FW update information and notifies the distribution data generation unit 570. The signature generation unit 590 can, for example, generate a signature for each FW data in the FW update information and a signature for the entire FW update information.
[0101] The key holding unit 591 holds a key used by the signature generation unit 590 to sign the FW update information.
[0102] [1.9 ECU management information example] FIG. 9 shows an example of vehicle ECU management information (a collection of ECU information for each vehicle) held in the ECU management information holding unit 572 of the server 500. As shown in FIG.
[0103] The vehicle ECU management information in this example includes vehicle information for each vehicle to be managed by the server 500 and ECU information for each ECU mounted on the vehicle. The vehicle information is an identifier (vehicle ID) for identifying the vehicle. The ECU information associated with the vehicle information in the vehicle ECU management information includes an ECU-ID, an ECU type indicating a functional type of the ECU, a manufacturer of the ECU, a FW version which is a version number or the like of the firmware implemented in the ECU, and a latest FW version which is a version number or the like of the latest firmware corresponding to the ECU. Each ECU information for a certain vehicle in the vehicle ECU management information is set based on, for example, information received from the gateway 300 of the vehicle (system configuration information and firmware update results) and FW versions for firmware uploaded to the server 500 by manufacturers of various ECUs. Note that, although FIG. 9 illustrates only information about one vehicle A, the vehicle ECU management information may also include information about other vehicles.
[0104] [1.10 FW update information format example] FIG. 10 shows an example of a format of the FW update information as distribution data distributed by the server 500. In FIG.
[0105] The FW update information includes a FW number F1 indicating the number of FW data, one or more pieces of FW data (two individual FW data F10, F20 in the example of FIG. 10), and a FW update information signature F30 which is a signature for the entire FW update information (distribution data). The FW data F10, F20 respectively include firmware (FW) F13, F23 for updating, ECU-ID F11, F21 which identifies the target ECU, FW version F12, F22 which indicates the version number of the firmware, etc., and FW data signature F14, F24 which is a signature for these data. The firmware F13, F23 is the firmware itself, that is, binary data.
[0106] [1.11 Example of operation related to firmware update by the gateway 300, etc.] Hereinafter, an operation relating to updating firmware of an ECU in the in-vehicle network system 10 will be described.
[0107] 11 and 12 are sequence diagrams showing an example of an operation related to updating firmware of an ECU performed in cooperation with devices such as the server 500, the gateway 300, and the ECUs 100a and 100b. Each sequence here means each processing procedure (step) in each device. For convenience of explanation, the operation of some ECUs is illustrated here. The sequence shown in this example of operation is expected to be repeatedly executed periodically, for example, every certain number of days, but may be executed when it is detected that a new ECU has been added to the in-vehicle network, or may be executed in response to an operation of the driver or the like to any ECU in the vehicle.
[0108] The gateway 300 in the vehicle transmits a frame for acquiring ECU information to the buses 200a and 200b, thereby requesting ECU information from all ECUs (ECUs 100a, 100b, etc.) connected to the in-vehicle network (step S1001).
[0109] Upon receiving the frame for obtaining ECU information, the ECU 100a transmits a frame including ECU information including an ECU-ID for the ECU 100a and a FW version related to the firmware implemented therein to the bus 200a (step S1002). In response to this, the gateway 300 receives the frame from the bus 200a, thereby receiving the ECU information for the ECU 100a.
[0110] Similarly, ECU 100b, which has received the frame for acquiring ECU information like ECU 100a, also transmits a frame including the ECU information for ECU 100b to bus 200a (step S1003). In response to this, gateway 300 receives the frame from bus 200a, thereby receiving the ECU information for ECU 100b. Similarly, gateway 300 can receive each ECU information transmitted from each of the other ECUs. Steps S1002 and S1003 are acquisition steps in which gateway 300 acquires system configuration information (a collection of ECU information) indicating the type of each ECU, etc.
[0111] Next, if the set of ECU information acquired from each ECU has changed relative to the ECU information group (set of ECU information) as system configuration information held by the ECU information holding unit 372 (step S1004), the gateway 300 updates the system configuration information held by the ECU information holding unit 372 with the acquired ECU information (step S1005). Note that if the ECU information acquired from each ECU has changed relative to the held system configuration information, the gateway 300 may perform control to notify the driver of the vehicle or the like of that fact.
[0112] Next, the gateway 300 transmits the system configuration information, which is held by the ECU information holding unit 372 and indicates the organization of all ECUs connected to the in-vehicle network by a set of ECU information, to the server 500 as a FW update request (step S1006). In response to this, the server 500 receives the system configuration information as the FW update request.
[0113] In response to the FW update request, the server 500 determines whether or not it is necessary to update the firmware for one or more ECUs of the vehicle equipped with the gateway 300 that is the sender of the FW update request, based on the received system configuration information and the vehicle ECU management information held by the ECU management information holding unit 572 (step S1007). If no update is required, the server 500 notifies, for example, the gateway 300 that no update is required. In FIG. 11, the description of the case where no update is required is omitted.
[0114] When it is determined in step S1007 that a firmware update is necessary, the server 500 determines, in the FW update control unit 520, one or more pieces of firmware for update to be transmitted based on the received system configuration information and the vehicle ECU management information held by the ECU management information holding unit 572 (step S1008). This determination also determines the number of pieces of firmware for update.
[0115] Next, the server 500 performs operation verification of the firmware for update determined in step S1008 in an environment configured with the same type of ECU as each ECU indicated by the received system configuration information by the FW operation verification unit 530 (step S1009). The firmware for update is the firmware held in the FW holding unit 571. When the server 500 properly completes the operation verification in step S1009, that is, when the server 500 performs an update by applying the firmware for update to the corresponding ECU in an environment configured with the ECU of the type indicated by the system configuration information and confirms that each ECU operates properly after the update, the server 500 generates FW update information (see FIG. 10) in the distribution data generation unit 570. That is, the distribution data generation unit 570 repeats the acquisition of FW data such as firmware held in the FW holding unit 571 (step S1011) and the addition of the FW data signature generated by the signature generation unit 590 to the FW data (step S1012) for the number of FWs, which is the number of firmware for update (step S1010). Furthermore, the distribution data generation unit 570 causes the signature generation unit 590 to generate a signature for the FW update information (FW update information signature) (step S1013), and generates FW update information to which the signature is added.
[0116] In the server 500, when the FW update information is generated, the FW update control unit 520 causes the data transmission / reception unit 510 to transmit the FW update information (step S1014). As a result, the FW update information is transmitted from the server 500 to the gateway 300, which is the transmission source of the system configuration information as the FW update request, and the gateway 300 receives the FW update information. Step S1014 is a reception step in the gateway 300, in which the gateway 300 receives from the server 500 the FW update information including update firmware for updating at least one ECU.
[0117] When the gateway 300 receives the FW update information, the signature verification unit 373 verifies the signature of the FW update information (FW update information signature) (step S1015). Then, the FW update processing unit 370 of the gateway 300 judges whether the signature verification is successful or not (step S1016). If the verification is not successful, the FW update information is discarded (step S1017), and in this case, the firmware is not updated based on the FW update information. If the verification is successful, the gateway 300 mainly uses the FW update processing unit 370 to perform a FW update control process in cooperation with the ECU corresponding to the update target (step S1018). The contents of the FW update control process will be described later. Steps S1018 and the like are update processing steps in which the gateway 300 performs control for updating the firmware of the corresponding ECU based on the update firmware after the operation verification of the update firmware is performed using each type of ECU indicated by the system configuration information.
[0118] After completing the FW update control process in step S1018 or after discarding the FW update information in step S1017, the gateway 300 transmits the firmware update result to the server 500 (step S1019). The firmware update result is, for example, information indicating whether the update was successful or not, and the information may include, for example, the FW version related to the firmware after the update. In this way, the server 500 receives the update result.
[0119] When server 500 receives the result of updating the firmware, server 500 updates the vehicle ECU management information held in ECU management information holding unit 572 so as to represent the state of the firmware after the update (step S1020).
[0120] [1.12 Example of FW update control processing by Gateway 300] FIG. 13 is a flowchart showing an example of a FW update control process by the gateway 300.
[0121] The FW update control process executed by the gateway 300 in the above-mentioned step S1018 will now be described with reference to FIG.
[0122] The gateway 300 acquires the number of FWs in the FW update information (see FIG. 10) by the FW update processing unit 370 (step S1201), and repeats the processes in steps S1203 to S1205 for the number of FWs (step S1202).
[0123] The FW update processing unit 370 acquires the ECU-ID in the FW data of the FW update information (step S1203).
[0124] Next, in the gateway 300, the FW update processing unit 370 causes the frame generating unit 380 to generate a frame including FW data to be transmitted to the ECU identified by the ECU-ID, and the frame transmitting / receiving unit 310 transmits the frame to the ECU via the bus to which the ECU is connected (step S1204). As a result, the ECU identified by the ECU-ID in the FW data receives the FW data, performs processing for updating the firmware, and transmits the update results to the gateway 300.
[0125] The gateway 300 receives the update result transmitted from the ECU (step S1205).
[0126] [1.13 Example of FW update control processing by ECU100a] FIG. 14 is a flowchart showing an example of the FW update control process performed by the ECU 100a.
[0127] Hereinafter, the FW update control process performed by the ECU 100a when the ECU to which the FW data is transmitted from the gateway 300 in the above-mentioned step S1204 is the ECU 100a will be described with reference to FIG.
[0128] In the ECU 100a, the frame transmitting / receiving unit 110 receives a frame including FW data (step S1301).
[0129] The FW update processing unit 160 of the ECU 100a acquires the FW data related to the frame received in step S1301 via the frame interpretation unit 120 and the frame processing unit 150, and causes the signature verification unit 163 to verify the FW data signature in the FW data (step S1302).
[0130] The FW update processing unit 160 determines whether or not the verification of the FW data signature has been successful (step S1303), and if not successful, discards the FW data (step S1304) and does not update the firmware.
[0131] If the verification of the FW data signature is successful, the FW update processing unit 160 copies and stores the firmware, which is the content of the boot ROM in the ECU 100a, in the FW cache holding unit 161 (step S1305).
[0132] Next, the FW update processing unit 160 updates the firmware in the boot ROM with the firmware (FW) in the FW data (step S1306), and restarts the processor of the ECU 100a by resetting it (step S1307).
[0133] In ECU 100a, if booting from the boot ROM is unsuccessful, it is preset to boot using the contents of FW cache holding unit 161, and if the restart in step S1307 is unsuccessful (step S1308), the pre-update firmware stored in FW cache holding unit 161 is booted (step S1309). Then, under the control of the pre-update firmware, the pre-update firmware stored in FW cache holding unit 161 is copied to the boot ROM, thereby restoring the contents of the boot ROM to the state before the update (step S1310).
[0134] If the restart in step S1307 is successful, ECU 100a transmits a frame including an update result indicating that the firmware update was successful to gateway 300, and if the restart in step S1307 is not successful, after step S1310, ECU 100a transmits a frame including an update result indicating that the firmware update was unsuccessful to gateway 300 (step S1311).
[0135] [1.14 Effect of the first embodiment] In the in-vehicle network system 10 according to the first embodiment, the gateway 300 collects ECU information indicating the type of ECU for all ECUs connected to the in-vehicle network (buses 200a and 200b) and holds it as system configuration information. Then, the gateway 300 notifies the server 500 of the system configuration information. This allows the server 500 to determine whether firmware needs to be updated for one or more ECUs in the in-vehicle network of the vehicle in which the gateway 300 is mounted, and to determine the firmware to be updated. The server 500 performs operation verification related to the update of the firmware to be updated (verification of whether the firmware can be properly updated and verification of whether each ECU operates properly after the update, etc.) in an environment (an environment of real ECUs or an environment of simulated ECUs) composed of the same type of ECUs corresponding to the composition of ECUs indicated by the system configuration information. After completing the operation verification (after proper operation is confirmed), the server 500 transmits FW update information including the firmware to be updated to the gateway 300, so that the gateway 300 can obtain firmware whose operation has been verified in an environment equivalent to the environment composed of each ECU of the vehicle. This reduces the possibility that the vehicle will not function properly after the firmware is updated.
[0136] (Embodiment 2) The following describes an in-vehicle network system 11 which is a partial modification of the in-vehicle network system 10 shown in the first embodiment.
[0137] In the in-vehicle network system 11 according to the present embodiment, in order to efficiently update the firmware of each of the ECUs of a plurality of vehicles, a firmware update method is used in which a server transmits firmware after performing operation verification on each ECU in the vehicle corresponding to each vehicle model. In this firmware update method, a gateway device in the vehicle receives verified configuration information (verified ECU configuration information) indicating the composition of ECUs (type of each ECU, etc.) used in the operation verification of the firmware transmitted from the server together with the firmware, and compares it with the composition of ECUs in the vehicle to confirm whether or not the operation verification corresponding to the vehicle has been performed.
[0138] [2.1 Overall configuration of the in-vehicle network system 11] The in-vehicle network system 11 includes ECUs 100a to 100d, buses 200a and 200b, a gateway 300a, and a network 400 and server 500a outside the vehicle. In this in-vehicle network system 11, the gateway 300 and the server 500 in the in-vehicle network system 10 (see FIG. 1) shown in the first embodiment are replaced with the gateway 300a and the server 500a. The in-vehicle network system 11 is similar to the in-vehicle network system 10 in respects that are not described here.
[0139] [2.2 Configuration of Gateway 300a] The gateway 300a is a kind of ECU as a gateway device connected to the bus 200a to which the ECU 100a and the ECU 100b are connected, and to the bus 200b to which the ECU 100c and the ECU 100d are connected. The gateway 300a has a function of transferring a frame received from one bus to the other bus, and also has a function of communicating with the server 500a via the network 400.
[0140] FIG. 15 is a configuration diagram of the gateway 300a. The gateway 300a is obtained by replacing the FW update processing unit 370 in the gateway 300 shown in the first embodiment with a FW update processing unit 370a. As shown in FIG. 15, the gateway 300a includes a frame transmitting / receiving unit 310, a frame interpretation unit 320, a reception ID determination unit 330, a reception ID list holding unit 340, a frame processing unit 350, a transfer rule holding unit 360, a FW update processing unit 370a, an ECU information holding unit 372, a signature verification unit 373, a key holding unit 374, an external communication unit 375, a frame generation unit 380, and an ECU information acquisition unit 390. Each of these components is realized by a communication circuit in the gateway 300a, a processor or a digital circuit that executes a control program stored in a memory, or the like. Among the components of the gateway 300a, the same components as those of the above-mentioned gateway 300 (see FIG. 3) are denoted by the same reference numerals in FIG. 15, and description thereof will be omitted here.
[0141] The FW update processing unit 370a requests the signature verification unit 373 to verify the signature of the FW update information (see FIG. 16) including FW data such as firmware for update notified from the external communication unit 375, and if the signature verification is successful, confirms that the operation verification of the firmware has been properly performed. The confirmation that the operation verification has been properly performed is performed by comparing the system configuration information, which is a collection of ECU information of each ECU acquired by the ECU information acquisition unit 390 and stored in the ECU information holding unit 372, with the verified ECU configuration information included in the FW update information. Note that, when the FW update processing unit 370a is notified of the FW update information from the external communication unit 375, the FW update processing unit 370a may have the ECU information acquisition unit 390 collect the ECU information of each ECU, and then confirm that the operation verification has been properly performed. The verified ECU configuration information is information indicating the type of each ECU constituting the environment used in the server 500a for the operation verification of the firmware included in the FW update information. The type of ECU is identified by, for example, the ECU-ID and the FW version such as the version number of the firmware implemented in the ECU.
[0142] The FW update processing unit 370a compares the types of ECUs mounted on the vehicle, which are indicated by the system configuration information, with the types of ECUs used in the operation verification, which are indicated by the verified ECU configuration information in the FW update information received from the server 500a, and performs control to perform an update based on the firmware for update included in the FW update information when the comparison result satisfies a certain condition. This certain condition is, for example, that all the types of ECUs indicated by the system configuration information and all the types of ECUs indicated by the verified ECU configuration information completely match. The FW update processing unit 370a notifies the frame generating unit 380 of FW data related to the firmware for update and bus information of the bus to which the ECU to be updated is connected, as a control to perform an update based on the firmware for update. Note that, when there are multiple ECUs to be updated, the verified ECU configuration information in the FW update information includes update order information, so the FW update processing unit 370a performs control to perform firmware update according to the order indicated by the update order information.
[0143] Furthermore, the FW update processing unit 370a notifies the external communication unit 375 of the update result notified from the frame processing unit 350. Furthermore, if the comparison result between the type of each ECU indicated by the system configuration information and the type of each ECU indicated by the verified ECU configuration information does not satisfy the above-mentioned certain condition, the FW update processing unit 370a stops the firmware update and notifies the external communication unit 375 of the system configuration information as an operation verification request. For example, information identifying the firmware to be updated is added to the operation verification request. When the server 500a performs operation verification in response to the operation verification request and the server 500a transmits FW update information including verified ECU configuration information that satisfies the above-mentioned certain condition, the FW update processing unit 370a acquires the FW update information and resumes the firmware update. The FW update processing unit 370a functions as an update processing unit that performs control for updating the firmware of the corresponding ECU (for example, transmitting the FW data to the ECU via a bus, etc.) only when the operation of the update firmware is verified using each type of ECU indicated by the system configuration information and signature verification is successful after receiving FW update information including the FW data of the update firmware, etc. Also, the FW update processing unit 370a notifies the frame generating unit 380 of data required for communication with the ECUs 100a to 100d.
[0144] The external communication unit 375 receives FW update information including FW data related to firmware for update from the server 500a, notifies the FW update processing unit 370a, and transmits the update result notified from the FW update processing unit 370a to the server 500a. The external communication unit 375 also transmits the system configuration information notified from the FW update processing unit 370a to the server 500a as an operation verification request. The external communication unit 375 holds, for example, address information of the server 500a required to access the server 500a via the network 400 in advance. The external communication unit 375 may also transmit a firmware update request to the server 500a.
[0145] [2.3 FW update information format example] FIG. 16 shows an example of a format of the FW update information as distribution data distributed by the server 500a.
[0146] The FW update information distributed by the server 500a is obtained by adding verified ECU configuration information F40 to the FW update information (see FIG. 10) distributed by the server 500 shown in the first embodiment.
[0147] That is, the FW update information distributed by the server 500a includes a FW number F1, one or more FW data (two individual FW data F10, F20 in the example of FIG. 16), verified ECU configuration information F40, and a FW update information signature F30, which is a signature for the entire FW update information.
[0148] [2.4 Example of verified ECU configuration information format] FIG. 17 shows an example of the format of the verified ECU configuration information F40.
[0149] The verified ECU configuration information F40 is information about the ECUs used in firmware operation verification by the server 500a. The verified ECU configuration information F40 includes vehicle model information for identifying the vehicle model, update order information indicating the firmware update order used in the operation verification (the update order in which the firmware was updated without problems), the ECU-ID for each ECU used in the operation verification, and the FW version, which is the version number or the like of the firmware implemented in the ECU.
[0150] [2.5 Configuration of Server 500a] The server 500a is a computer having a function of distributing, via the network 400, FW update information (see FIG. 16) which is data for updating the firmware of the ECUs 100a to 100d.
[0151] The server 500a is based on the premise that a plurality of vehicles are each equipped with a plurality of ECUs related to the in-vehicle network. The server 500 has a function of managing firmware provided by various ECU manufacturers, etc., verifying the operation of the firmware, and distributing FW update information including update firmware to each vehicle.
[0152] FIG. 18 is a configuration diagram of the server 500a. As shown in FIG. 18, the server 500a includes a data transmission / reception unit 510a, a FW update control unit 520a, a FW operation verification unit 530a, an ECU information holding unit 531, a total FW holding unit 532, a distribution data generation unit 570a, a FW holding unit 571, an ECU management information holding unit 572, a signature generation unit 590, and a key holding unit 591. Each of these components is realized by a communication circuit in the server 500a, a processor that executes a control program stored in a memory, and the like. Among the components of the server 500a, the same components as those of the above-mentioned server 500 (see FIG. 8) are denoted by the same reference numerals in FIG. 18, and description thereof will be omitted here.
[0153] The data transmission / reception unit 510a communicates with the gateway 300a and transmits and receives data. When the data transmission / reception unit 510a receives system configuration information as a request for firmware operation verification (operation verification request) from the gateway 300a, it notifies the FW update control unit 520a, and when the data transmission / reception unit 510a receives FW update information for firmware distribution from the FW update control unit 520a, it transmits the FW update information to the gateway 300a. When the data transmission / reception unit 510a receives a firmware update result from the gateway 300a, it notifies the FW update control unit 520a. Note that, when the gateway 300a makes a request for firmware update, when the data transmission / reception unit 510a receives a request for firmware update from the gateway 300a, it notifies the FW update control unit 520a.
[0154] When the latest firmware for the ECU (i.e., for updating) is uploaded to the server 500a from a terminal device of an ECU manufacturer or the like and a request is made to register the firmware, the FW update control unit 520a performs a process of verifying the operation of the firmware in cooperation with the FW operation verification unit 530a and registering the firmware. For the operation verification, the FW update control unit 520a first identifies an ECU on which the uploaded firmware for updating operates based on information from the terminal device, and further identifies a vehicle model of a vehicle equipped with (using) the identified ECU. In order to identify a vehicle model using an ECU that requires firmware updating, the FW update control unit 520a holds, for example, an ECU vehicle model management table as illustrated in FIG. 19, and identifies a vehicle model corresponding to an ECU-ID of an ECU that requires firmware updating by referring to this ECU vehicle model management table. The ECU vehicle model management table is a table in which ECU-IDs and the like are associated with vehicle models. The vehicle model is identification information of a vehicle structure and the like, and may be, for example, a vehicle type. Then, the FW update control unit 520a uses a vehicle model ECU management table as shown in FIG. 20 to generate a list of all ECUs used by a vehicle model that includes an ECU that requires a firmware update. The vehicle model ECU management table is a table that associates identification information (such as ECU-ID) for all ECUs that are installed in a vehicle of the vehicle model with each vehicle model. The FW update control unit 520a notifies the FW operation verification unit 530a of the generated list, and causes the FW operation verification unit 530a to perform operation verification of the firmware update using an environment consisting of all ECUs listed in the list. After the operation verification is completed and it is confirmed that the firmware operates without problems, the FW update control unit 520a stores the uploaded firmware in the FW holding unit 571, and manages the firmware, the FW version indicating the version number, and information indicating the type of the target ECU, in association with each other based on information from the terminal device.Furthermore, after the operation verification by the FW operation verification unit 530a is completed, the FW update control unit 520a causes the distribution data generation unit 570a to generate FW update information as a package of firmware for update including the firmware whose operation has been verified, which will be distributed to a plurality of vehicles (specifically, the gateway 300a of each vehicle). The FW update control unit 520a causes the data transmission / reception unit 510a to transmit the FW update information generated by the distribution data generation unit 570a to the gateway 300a.
[0155] Furthermore, when the FW update control unit 520a receives a request for firmware update from the gateway 300a via the data transmission / reception unit 510a, the FW update control unit 520a causes the distribution data generation unit 570a to generate FW update information including the firmware for update corresponding to the gateway 300a after the FW operation verification unit 530a has verified that the firmware operates without problems, and transmits the generated FW update information to the gateway 300a. Furthermore, when the FW update control unit 520a obtains system configuration information as an operation verification request from the gateway 300a via the data transmission / reception unit 510a, the FW update control unit 520a requests the FW operation verification unit 530 to verify the operation of the firmware for update, and causes the data transmission / reception unit 510a to transmit the FW update information after the operation verification has been performed (i.e., after it has been verified that the firmware operates properly without problems). Note that the FW update information transmitted by the server 500a to the gateway 300a always includes verified ECU configuration information indicating information on the ECU used in the operation verification by the FW operation verification unit 530a, as shown in FIG. 16. Furthermore, when the FW update control unit 520a receives a result of updating the firmware from the gateway 300, the FW update control unit 520a updates the vehicle ECU management information held in the ECU management information holding unit 572.
[0156] The FW operation verification unit 530a has a function of performing a FW operation verification process for verifying that the firmware for updating and the firmware of each ECU in the operating environment operate properly (normally) in the operating environment configured with the ECUs indicated in the list of ECUs, or in the operating environment configured with the same type of ECU as each ECU indicated in the system configuration information, upon receiving a request from the FW update control unit 520a. In the FW operation verification process, for example, an update operation for applying the firmware for updating to the ECU to be updated in the operating environment, and an operation of whether each ECU in the operating environment operates normally after the update are verified. In the FW operation verification process, the operation verification of the firmware for updating may be performed using the hardware of various ECUs as the operating environment, or the operation verification of the firmware for updating may be performed by simulation in a virtual environment that simulates various ECUs.
[0157] The distribution data generation unit 570a generates FW update information (see FIG. 16) as a package of firmware for updating to be distributed to the gateway 300a, and requests the signature generation unit 590 to generate a signature for the FW update information. The distribution data generation unit 570a acquires information (ECU-ID, FW version, etc.) about all ECUs used as the operating environment of firmware that has been verified to operate properly from the FW operation verification unit 530, and sets verified ECU configuration information in the FW update information.
[0158] The FW storage unit 571 stores firmware for an ECU that has been uploaded and has undergone operational verification.
[0159] [2.6 Example of operation for registering firmware updates to the server] 21 is a flowchart showing the FW registration process related to the registration of update firmware by the server 500a. The FW registration process by the server 500a will be described below with reference to the figure. The FW registration process is executed when firmware is transmitted from a terminal device external to the server 500a via a network and a request is made to register the firmware.
[0160] First, the server 500a receives a firmware registration request accompanied by uploading firmware to the server 500a (step S2000). The firmware registration request includes information indicating, for example, a FW version indicating a version number of the firmware and an ECU-ID of an ECU to which the firmware is to be registered.
[0161] The server 500a that has received the registration request identifies the vehicle model that requires the firmware to be updated (step S2001). That is, the server 500a acquires the ECU-ID of the ECU that requires the update from the information included in the received firmware registration request, and identifies the vehicle model that is equipped with the ECU identified by the ECU-ID included in the registration request by referring to an ECU vehicle model management table such as that shown in FIG.
[0162] For each vehicle model identified in step S2001, the server 500a executes firmware operation verification processing (steps S2003 to S2007) in an operating environment configured with the ECUs used in the vehicle model (step S2002). First, the server 500a identifies the ECUs mounted on the corresponding vehicle model by referring to the vehicle model ECU management table (see FIG. 20), and generates a list listing information (ECU-IDs) of all the identified ECUs (step S2003). Then, in an operating environment configured with the ECUs shown in the list, the server 500a performs operation verification (FW operation verification processing) on the firmware to be updated (step S2004). In this operation verification, it is confirmed whether the firmware to be updated operates normally in an environment configured with the ECUs mounted on the corresponding vehicle model, and whether other ECUs operate normally when the firmware for the ECU to be updated is updated.
[0163] After the operation verification, the server 500a judges whether the operation verification was successful (step S2005). If it is judged in step S2005 that the operation verification was successful, the server 500a stores and manages the firmware in the FW holding unit 571 (step S2006). On the other hand, if it is judged in step S2005 that the operation verification was unsuccessful, the server 500a notifies an error to the terminal device that transmitted the firmware registration request in step S2000 (step S2007).
[0164] [2.7 FW operation verification process] Fig. 22 is a flowchart showing the FW operation verification process by the server 500a. The FW operation verification process is mainly executed by the FW operation verification unit 530a in the server 500a, and is a part (step S2004) of the above-mentioned FW registration process (see Fig. 21), and is also a process performed when a separate operation verification request based on system configuration information is received from the gateway 300a. The FW operation verification process is generally a process for verifying the operation of the firmware to be updated in an environment configured using the ECU group indicated in the list from the FW update control unit 520a, or the ECU group of the same type as the ECU indicated in the system configuration information acquired from the gateway 300a. The FW operation verification process will be described below with reference to Fig. 22.
[0165] The FW operation verification unit 530a refers to the ECU-IDs shown in the received list or the ECU-IDs shown in the system configuration information, and sets information of each ECU to be used for the operation verification in the simulator 800 (step S2100). The simulator 800 is a computer that can be controlled by the FW operation verification unit 530a, and is configured to be able to simulate various ECUs. The configuration including the FW operation verification unit 530a and the simulator 800 operates as a simulation unit that simulates multiple ECUs. In step S2100, the FW operation verification unit 530a sets information of each ECU to be used for the operation verification in the simulator 800 based on information (software) for simulating various ECUs and the latest firmware, which are held in the ECU information holding unit 531. The information for simulating various ECUs held by the ECU information holding unit 531 may include, for example, information on the processor and memory in the ECU (operating frequency, memory size, etc.), information on the CAN controller in the ECU (model number, operating frequency, etc.), information on the bus connected to the ECU or the communication path used by the ECU, information on the sensors and actuators connected to the ECU (information on rotary encoders, torque sensors, motors, etc.), etc. Setting this information in the simulator 800 makes it possible to simulate the ECU and in-vehicle network in each vehicle model.
[0166] Next, the FW operation verification unit 530a selects firmware to be set for each ECU to be simulated by the simulator 800 from all firmware corresponding to various ECUs stored in the all FW storage unit 532, and sets the firmware information in the simulator 800 (step S2101). Note that the firmware before the update is also set for the ECU whose firmware is to be updated.
[0167] Next, the FW operation verification unit 530a performs operation verification of the firmware for updating by simulating the update for setting the firmware for updating in the target ECU and the operation of each ECU after the update by the simulator 800 (step S2102). As a result, in an operating environment simulating an ECU of the same type as the type of ECU specified by the list or system configuration information notified from the FW update control unit 520a, a simulation is executed by the simulator 800 regarding the update in which the firmware for updating is applied and the operation thereafter, and operation verification is realized as to whether the firmware operates normally.
[0168] After the operation verification, the FW operation verification unit 530a judges whether the operation verification is successful (step S2103). If it is judged in step S2103 that the operation verification is successful, the FW operation verification unit 530a stores the firmware that has been verified in the total FW holding unit 532 (step S2104). Note that when the FW operation verification process is performed based on an operation verification request from the gateway 300a, the process in step S2104 is omitted.
[0169] Furthermore, the FW operation verification unit 530a transmits information (ECU-ID, FW version, etc.) about all ECUs used in the operation verification to the FW update control unit 520a, and the FW update control unit 520a causes the distribution data generation unit 570a to generate FW update information including the information about the ECUs used in the operation verification as verified ECU configuration information and including FW data of the firmware that has been verified. The distribution data generation unit 570a causes the signature generation unit 590 to generate a signature for the FW update information including the verified ECU configuration information, and includes the signature in the FW update information (step S2105). If it is determined in step S2103 that the operation verification was not successful, the FW operation verification unit 530a notifies the FW update control unit 520a of an error (step S2106), and in response to this, the FW update control unit 520a stops the process related to the generation of the FW update information.
[0170] The verified ECU configuration information may include not only information about each ECU itself, but also information about the state of each ECU when the operation verification is performed. Examples of this information include, for example, the rewrite time (length of processing) when updating from the current version of firmware to the new firmware, the time until the firmware becomes operational after rewrite, the load of the rewrite processing, the time when sensor information or messages on the in-vehicle network cannot be received, the ID of the message that cannot be received during rewrite, and the memory size used by the firmware after rewrite. From these pieces of information, the gateway 300a and each ECU may determine when to perform the firmware update processing. For example, the firmware may be updated during a time period when it is known in advance that the vehicle (automobile) will not be used for a long time, such as at night, or the firmware may be updated only if the driver or the manager of the automobile is notified of the time required for the update and the firmware is updated only if the driver or the manager of the automobile is allowed to update the firmware, or the driver or the manager of the automobile may be asked about the time when the automobile will not be used or driven, and only the firmware that fits within that time may be updated. This makes it possible to realize flexible firmware updates.
[0171] [2.8 FW operation verification process for verifying multiple firmware updates] FIG. 23 is a flowchart showing an example of a FW operation verification process related to verification of a plurality of pieces of firmware by the server 500a.
[0172] In Fig. 23, attention is focused on the process of performing operation verification for each of a plurality of verification order patterns in which the update order (i.e., the verification order) of a plurality of firmware is different from one another, and identifying the verification order in which the verification was successful, and other processes are omitted. That is, Fig. 23 shows processes replacing step S2101 and step S2102 shown in Fig. 22, but other processes are omitted. Below, the operation of verifying a plurality of firmware by server 500a will be described with reference to Fig. 23.
[0173] First, the FW operation verification unit 530a generates a verification order pattern indicating the order in which to verify a plurality of update firmwares after performing the process in step S2100 shown in Fig. 22 (step S2200). The FW operation verification unit 530a repeatedly executes the processes from step S2201 to step S2204 for each generated verification order pattern. The verification order pattern used in steps S2201 to S2204 in each repeated execution is referred to as a "target verification order pattern."
[0174] First, the FW operation verification unit 530a reads out firmware for operating on each ECU set in the simulator 800 from the all FW holding unit 532, and sets it to the ECU on the simulator 800 (step S2202). Step S2202 is the same process as step S2101. After that, the process of step S2204 is repeated for each of the multiple firmware for update (step S2203). At this time, the FW operation verification unit 530a performs the operation verification in step S2204 for each firmware for update according to the order indicated by the target verification order pattern. In step S2204, the FW operation verification unit 530a executes the simulator 800 so as to set the firmware for update to the ECU to be updated, and verifies whether it operates normally. The FW operation verification unit 530a verifies whether it operates normally every time one firmware for update is set to one ECU in the simulator 800. The operation verification in the target verification sequence pattern is determined to be successful only when the setting in the ECU and the operation verification are completed for all update firmware and all operation verifications are successful.
[0175] When the operation verification is completed for all the verification order patterns, the FW operation verification unit 530a judges whether or not there is a verification order pattern for which the operation verification is judged to have been successful among the verified verification order patterns (step S2205). If it is judged in step S2205 that there is a pattern for which the operation verification is successful, the FW operation verification unit 530a records the verification order pattern for which the operation verification is successful as update order information (step S2206). Then, the FW operation verification unit 530a notifies the FW update control unit 520a of the operation verification result including the update order information and the like, including information on all ECUs used in the operation verification (ECU-ID, FW version, etc.), and further indicating that the operation verification is successful (step S2207). On the other hand, if there is no pattern for which the operation verification is successful in step S2205, the FW operation verification unit 530a notifies the FW update control unit 520a of the verification failure (step S2208).
[0176] [2.9 Example of operation related to firmware update by the gateway 300a, etc.] Hereinafter, the operation of updating firmware of the ECU in the in-vehicle network system 11 will be described.
[0177] 24 and 25 are sequence diagrams showing an example of an operation related to updating firmware of an ECU performed in cooperation with devices such as the server 500a, the gateway 300a, and the ECUs 100a and 100b. Each sequence here means each processing procedure (step) in each device. Here, for convenience of explanation, the operation of some ECUs is illustrated. The procedure of steps S2301 to S2304 shown in this example of operation is assumed to be repeatedly executed periodically, for example, every certain number of days, but may be executed when it is detected that a new ECU has been added to the in-vehicle network, or may be executed in response to an operation of the driver or the like to any ECU in the vehicle. The procedure from step S2306 onwards is started, for example, when the server 500a receives a firmware registration request.
[0178] The procedure of steps S2301 to S2305 is the same as steps S1001 to S1005 (see FIG. 11) described above, and therefore description thereof will be omitted here. Through the processing of steps S2301 to S2305, the gateway 300a can hold system configuration information (see FIG. 6) which is a collection of the latest ECU information of each ECU connected to the in-vehicle network in the ECU information holding unit 372. Note that the processing of step S2301 in which the gateway 300a transmits a frame for ECU information acquisition and requests ECU information may be omitted, and each ECU may transmit a frame including ECU information to the gateway 300a when it is started up or when its own ECU information (ECU-ID, FW version, etc.) is changed, etc.
[0179] When the latest firmware for the ECU (i.e., firmware for update) is uploaded to the server 500a from a terminal device (e.g., a terminal device of an ECU manufacturer, etc.) external to the server 500a and a request for registration of the firmware is made, the server 500a performs a FW registration process (see FIG. 21) for registering the firmware (step S2306). As a result, the firmware for update is subjected to operation verification (verification that it operates properly without problems) in an environment using the ECUs of the corresponding vehicle model, and then stored and managed in the FW holding unit 571 of the server 500a (i.e., registered in the server 500a).
[0180] The server 500a generates FW update information including the registered update firmware, verified ECU configuration information indicating each ECU used in the firmware operation verification, and the like, and distributes the information to the gateway 300a (step S2307). As a result, the gateway 300a receives the FW update information. Note that the distribution in step S2307 may be a transmission to the gateway 300a of one vehicle, or a transmission to the gateway 300a of each of a plurality of vehicles that require firmware updates. Step S2307 is a receiving step in which the gateway 300a receives, from the server 500a, FW update information including update firmware for at least one ECU to be updated.
[0181] When the gateway 300a receives the FW update information, the signature verification unit 373 verifies the signature of the FW update information (FW update information signature) (step S2308). Then, the FW update processing unit 370a of the gateway 300a determines whether or not the signature verification is successful (step S2309), and discards the FW update information if the signature verification is not successful, in which case the firmware update based on the FW update information is not performed.
[0182] If the signature verification is successful, the FW update processing unit 370a compares the verified ECU configuration information included in the FW update information with the system configuration information held by the ECU information holding unit 372 (step S2310).
[0183] The FW update processing unit 370a of the gateway 300a judges whether the operation verification has been performed appropriately based on whether the comparison result between the types of each of the ECUs mounted on the vehicle, which is indicated by the system configuration information, and the types of each of the ECUs used in the operation verification, which is indicated by the verified ECU configuration information, satisfies a certain condition (for example, whether they match completely) (step S2311). For example, if the comparison result is a complete match, the FW update processing unit 370a judges that the operation verification has been performed appropriately. The server 500a performs operation verification of the firmware using each ECU used in the vehicle model when registering the firmware, but if, for example, the vehicle on which the gateway 300a is mounted has replaced or added an ECU from the ECU of that vehicle model, the comparison result in step S2310 does not match.
[0184] If the gateway 300a determines that appropriate operation verification has not been performed, it transmits system configuration information, which is held in the ECU information holding unit 372 and indicates the organization of all ECUs connected to the in-vehicle network by a set of ECU information, to the server 500a as an operation verification request (step S2312). For example, information on firmware distributed for updating is added to the operation verification request. In response to this, the server 500a receives the system configuration information and the like as the operation verification request. Step S2312 is an operation verification request transmission step in which the gateway 300a transmits the system configuration information to the server 500a as an external device.
[0185] When the server 500a receives the operation verification request, the FW operation verification unit 530a performs a FW operation verification process related to the operation verification of the distributed firmware in an environment according to the system configuration information (step S2313). Steps S2312 and S2313 are operation verification steps in which the server 500a receives the system configuration information and performs operation verification of the firmware to be updated using multiple ECUs of the same type as all types indicated by the system configuration information. After the operation verification of the firmware (after it is confirmed that the operation is performed appropriately), the server 500a generates FW update information including verified ECU configuration information, which is information about each ECU used in the operation verification in step S2313, and transmits the FW update information to the gateway 300a of one vehicle that is the source of the operation verification request (step S2314). Step S2314 is a firmware update information transmission step in which the FW update information is transmitted after the operation verification is performed. In the firmware update information transmission step, the verified ECU configuration information indicating the type of each of the multiple ECUs used in the operation verification may be included in the FW update information and transmitted. This causes the gateway 300a to receive the FW update information again.
[0186] When the gateway 300a receives the FW update information transmitted by the server 500a in step S2314, the signature verification unit 373 verifies the signature of the FW update information (FW update information signature) (step S2315). The processes in steps S2315 to S2318 are similar to the processes in steps S2308 to S2311.
[0187] The gateway 300a determines whether appropriate operation verification has been performed based on whether the comparison result between the type of each ECU indicated in the system configuration information and the type of each ECU indicated in the verified ECU configuration information satisfies certain conditions (e.g., whether there is a complete match) (step S2318), and if it determines that appropriate operation verification has not been performed, it performs a specified abnormality handling and does not update the firmware.
[0188] If the gateway 300a determines in step S2318 or step S2311 that appropriate operation verification has been performed, the gateway 300a performs FW update control processing (see Figs. 13 and 14) in cooperation with the ECU that is the update target (step S2319), mainly by the FW update processing unit 370a. Steps S2317 to S2319 are update processing steps in which the gateway 300a controls the update of the firmware of the corresponding ECU based on the update firmware after the operation verification of the update firmware is performed using each type of ECU indicated by the system configuration information.
[0189] After completing the FW update control process in step S2319, the gateway 300a transmits the firmware update result to the server 500a (step S2320). As a result, the server 500a receives the update result. The firmware update result is, for example, information indicating whether the update was successful or not, and the information may include, for example, the FW version related to the firmware after the update, or may include, for example, system configuration information. Note that the gateway 300a may also transmit the update result indicating the firmware update failure to the server 500a if the signature verification fails in steps S2309 and S2316, or if it is determined in step S2318 that appropriate operation verification has not been performed.
[0190] When the server 500a receives the result of updating the firmware, the server 500a updates the vehicle ECU management information held in the ECU management information holding unit 572 so as to indicate the state of the firmware after the update (step S2321).
[0191] [2.10 Firmware operation verification environment] The following describes a simulation for verifying firmware operation performed by the simulator 800 used in the FW operation verification process by the FW operation verification unit 530a of the server 500a.
[0192] FIG. 26 shows an example of the software configuration of a virtual environment used for firmware operation verification by the simulator 800 in the FW operation verification process.
[0193] As shown in the figure, the software running on simulator 800 includes a virtual machine monitor 801, virtual machines 802, 803, 804, 805, virtual hardware 810, 820, 830, 840, general-purpose OSs (operating systems) 811, 821, an RTOS (real-time operating system) 831, firmware 841, app (application program) A 812, app B 813, app C 814, app D 822, and app E 832.
[0194] The simulator 800 is a computer that executes software (such as a virtual machine monitor 801) on a processor.
[0195] The virtual machine monitor 801 has a virtual machine control function that controls the virtual machines 802 to 805 so that they operate independently of each other, a resource management function that allocates and manages hardware resources such as memory and CPU to the virtual machines, a device access function that accesses devices in response to requests from the virtual machines, and a scheduling function that schedules the virtual machines.
[0196] Each of the virtual machines 802 to 805 includes virtual hardware, an OS, an application, or firmware, and is executed independently by a virtual machine monitor 801.
[0197] Virtual hardware 810, 820, 830, and 840 provide virtual hardware functions to each virtual machine, and may also include an IPL (Initial Program Loader) and a BIOS (Basic Input / Output System).
[0198] The generic OS 811 has a function of loading applications (application A 812, application B 813, application C 814) into memory and executing them, or deleting (unloading) each application from memory, and provides each application with a network communication function based on the CAN protocol. The generic OS 821 also has a function of loading applications (application A 812, application B 813, application C 814) into memory and executing them, or deleting (unloading) each application from memory, and provides each application with a network communication function based on the CAN protocol.
[0199] RTOS831 is an OS for running applications that place importance on real-time performance.
[0200] The application A812, the application B813, the application C814, the application D822, and the application E832 have various functions for automobiles, such as a car navigation function, a driving assistance function, a steering control function, an engine control function, a brake control function, a function for acquiring sensor information (torque, angle, speed, rotation speed, etc.), etc. Each of these functions for automobiles may be executed by one application or may be executed by multiple applications.
[0201] The firmware 841 is software that operates functions that do not require an OS. The firmware 841 may include an OS, or may have a function of serving as an operating environment for other applications and controlling the execution of the other applications.
[0202] 26 is merely an example, and more applications may be run. Also, although the figure shows two virtual machines running a general-purpose OS, one virtual machine running an RTOS, and one virtual machine running firmware, this is merely an example. The virtual environment may be configured, for example, only with a virtual machine running firmware, or only with a virtual machine running firmware and a virtual machine running RTOS.
[0203] In the simulator 800, one ECU is simulated by one virtual machine such as the above-mentioned virtual machines 802 to 805. For example, a plurality of virtual machines 805 (as many as the number of ECUs constituting the operating environment) are generated and operated on the virtual machine monitor 801, and the operation of the hardware of one ECU is simulated by the virtual hardware 840 of each virtual machine 805, and, for example, the firmware 841 has the same contents as the firmware implemented in that ECU. For example, the virtual machine monitor 801 is configured so that communication between the ECUs via a bus is simulated between the plurality of virtual hardware operating thereon.
[0204] When setting each ECU constituting the operating environment for firmware operation verification in the simulator 800, the FW operation verification unit 530a sets a virtual machine to operate in the same manner as each ECU. At this time, the ECU constituting the operating environment may be set by loading a virtual machine (a virtual ECU, so to speak) that has already been set to simulate the operation of the ECU onto the virtual machine monitor 801.
[0205] [2.11 Effect of the second embodiment] In the in-vehicle network system 11 according to the second embodiment, when firmware is registered in the server 500a, operation verification is performed in advance in an environment corresponding to the ECU configuration of the vehicle model. Then, the server 500a distributes verified ECU configuration information including information on the ECU used in the operation verification for the firmware registered after the operation verification to the gateway 300a of each vehicle, and FW update information including the firmware. As a result, firmware for which operation verification has been performed is distributed, so that appropriate firmware update is possible in the ECU of each vehicle. In addition, firmware that has failed the operation verification is not registered in the server 500a, so that the possibility of distributing firmware that does not operate normally can be reduced. In addition, since operation verification is performed in the configuration of the ECU for each vehicle model, it is possible to verify in advance malfunctions that occur only in a specific vehicle model.
[0206] Furthermore, the gateway 300a of a vehicle checks whether the operation verification related to the firmware update has been performed appropriately in an operating environment suitable for the vehicle by comparing the verified ECU configuration information in the received FW update information with the system configuration information, which is information on all ECUs in the vehicle, and sends an operation verification request to the server 500a if the operation verification has not been performed appropriately. This allows the gateway 300a to verify whether the firmware update will have any adverse effects before actually updating the ECU of the vehicle. The gateway 300a can then receive from the server 500a firmware for update that has been verified in an operating environment suitable for the vehicle. Therefore, even if an ECU installed in the vehicle breaks down and is replaced with another ECU, or a new ECU is added, the gateway 300a can obtain firmware that has been verified, and the firmware of the ECU can be appropriately updated. That is, the possibility that the vehicle will not function properly after the firmware is updated in the vehicle is reduced.
[0207] (Other embodiments) As described above, the first and second embodiments have been described as examples of the technology according to the present invention. However, the technology according to the present invention is not limited to these, and can be applied to embodiments in which appropriate changes, substitutions, additions, omissions, etc. are made. For example, the following modified examples are also included in one embodiment of the present invention.
[0208] (1) In the above embodiment, the gateway 300, 300a having the external communication unit 375 (external communication function) communicates with the server 500, 500a via the network 400 outside the vehicle, but this is merely an example. For example, the gateway 300, 300a may communicate with the server 500, 500a via another ECU (e.g., a head unit, etc.) having a communication function with the outside. The head unit is a type of ECU equipped with a relatively high-performance processor, includes a display device such as a liquid crystal display provided on the instrument panel of the automobile, and is a device that can notify the driver of the vehicle. Note that the in-vehicle network has a diagnostic port, which is an interface for communicating with external devices such as diagnostic tools, called OBD2 (On-Board Diagnostics2), etc., and is used for diagnosing the ECU. Therefore, the gateway 300, 300a may indirectly communicate with the server 500, 500a by communicating with an external device that is capable of communicating with the server 500, 500a and is connected to a diagnostic port. In these cases, the gateway 300, 300a does not necessarily have an external communication function for communicating with the outside of the vehicle, and an operation verification request or a FW update request accompanied by system configuration information, etc., and FW update information, etc. can be exchanged between the gateway 300, 300a and the server 500, 500a via another ECU or an external device.
[0209] (2) In the above embodiment, the FW version indicating the version number of the firmware of each ECU is managed by the servers 500, 500a and the gateways 300, 300a. However, the FW version may be managed by other devices such as another ECU or a diagnostic tool.
[0210] (3) In the above embodiment, an in-vehicle network is shown as an example of a network communication system that communicates according to the CAN protocol. The technology according to the present invention is not limited to an in-vehicle network, but can also be applied to networks of robots, industrial equipment, and other network communication systems that communicate according to the CAN protocol other than an in-vehicle network. In addition, the CAN protocol should be treated in a broad sense as including CANOpen, which is used in embedded systems in automation systems, or derivative protocols such as TTCAN (Time-Triggered CAN) and CANFD (CAN with Flexible Data Rate). In addition, in the above embodiment, an example is shown in which firmware-related data (frames) are transmitted and received over a bus based on the CAN protocol, but another protocol may be applied, and any communication path and communication method for communicating firmware-related data can be used.
[0211] (4) In the above embodiment, a signature is attached to the data (FW data, FW update information, etc.) to ensure the integrity of the data, but the data may be encrypted to further ensure confidentiality. The signature key and the encryption key may be separate keys.
[0212] (5) In the above embodiment, the same key is used to generate a signature for the FW update information and a signature for the FW data, but different keys may be used for each. For example, a signature for the entire FW update information as distribution data (FW update information signature) may be generated using a key held by the automobile manufacturer, and a signature for each piece of FW data (FW data signature) may be generated using a key held by the manufacturer of the ECU that implements the firmware related to that FW data (or the manufacturer of that firmware). Note that in the above embodiment, an example was shown in which each ECU verifies the FW data signature, but the ECU may not verify the FW data signature, and instead the gateways 300 and 300a may hold a verification key in advance and verify the FW data signature.
[0213] (6) In the second embodiment, when multiple pieces of firmware need to be updated, the gateway 300a receives information on the firmware update order (update order information) included in the FW update information by the server 500a and updates the firmware in the order according to the update order information, but the updates do not necessarily have to be in the update order. Also, the server 500 in the first embodiment may include the update order information in the FW update information and transmit it, and the gateway 300 may update the firmware in order by transmitting the FW data in step S1204 in the order according to the update order information.
[0214] (7) Part of the processing of the servers 500, 500a in the above-described embodiment may be executed by another device (such as a computer) that is capable of communicating with the servers 500, 500a but is separate from the servers 500, 500a.
[0215] (8) In the server 500, 500a in the above embodiment, when the operation verification of the firmware fails, information (fault information) on the configuration of the ECUs (combination of ECUs) that configure the operating environment may be managed. In this case, when the server 500, 500a notifies the gateway 300, 300a of the fault information, the gateway 300, 300a can determine that the firmware should not be updated if the configuration of the ECUs in the vehicle matches the configuration indicated by the fault information.
[0216] (9) In the above embodiment, when multiple firmware updates are performed, the FW operation verification unit 530 generates a verification order pattern and records the verification order in which the operation verification was successful. However, this is not limited to this. Multiple firmware updates may be performed simultaneously and operation verification may be performed. Alternatively, if operation verification fails in all verification order patterns, a pattern for simultaneous verification may be generated and operation verification may be performed.
[0217] (10) As an example of judging whether the appropriate operation verification of the firmware is performed in the gateway 300a in the above-mentioned second embodiment, it is shown that the comparison result between the types of each of the multiple ECUs mounted on the vehicle, which is indicated by the system configuration information, and the types of each of the multiple ECUs used in the operation verification, which is indicated by the verified ECU configuration information, satisfies a certain condition, for example, whether or not they completely match. However, this is only one example, and for example, a method of treating it as having been performed as appropriate operation verification may be used when the types of the multiple ECUs used in the operation verification, which is indicated by the verified ECU configuration information, include all the types of ECUs indicated by the system configuration information. In combination with these, a method of treating it as having been performed as appropriate operation verification may be used when the same types of ECUs as all the types of ECUs indicated by the system configuration information are indicated in the verified ECU configuration information. Then, for example, when the FW update processing unit 370a of the gateway 300a confirms that the same types as all the types indicated by the system configuration information are not indicated in the verified configuration information, it may suppress the update based on the firmware for update included in the FW update information, and control the system configuration information to be transmitted to the server 500a as an external device as a request for operation verification.
[0218] (11) In the above embodiment, an example was shown in which the type of ECU can be identified by the ECU-ID (identification information of the ECU) and the FW version (identification information of the firmware version), but it is also possible to define the type of ECU as something that can be identified only by the ECU-ID. Note that, although an example was shown in which the ECU-ID is information that can identify individual ECUs and distinguish between types of ECUs, the ECU-ID may be information that cannot identify individual ECUs but can identify the type of ECU.
[0219] (12) The FW operation verification unit 530 of the server 500 shown in the first embodiment may also verify the operation of the firmware using the simulator 800 shown in the second embodiment. In addition to the server 500, 500a verifying the operation of the firmware to be updated using the same type of ECU as each ECU connected to the in-vehicle network in a certain vehicle (i.e., each type of ECU indicated by the system configuration information), the gateway 300, 300a of the vehicle may also perform the operation verification. That is, the gateway 300, 300a may be provided with a simulation unit including a simulator similar to the simulator 800 shown in the second embodiment, and may perform the operation verification of the firmware received from the server 500, 500a in an operating environment in which the gateway 300, 300a itself simulates each type of ECU indicated by the system configuration information. In this case, the gateway 300, 300a verifies that the firmware operates without any problems, and then causes the ECU corresponding to the target ECU to update the firmware. For example, when the FW update processing unit 370a of the gateway 300a confirms that the same types as all the types indicated by the system configuration information are not indicated in the verified configuration information, the FW update processing unit 370a may control the gateway 300a to perform a simulation of the operation of the firmware for update using each ECU of the same type as all the types indicated by the system configuration information, and to perform an update based on the firmware for update after the operation verification by the simulation. Note that when the gateway 300, 300a performs the operation verification of the firmware, the gateway 300, 300a may actually transmit a message (frame) received from the in-vehicle network to the in-vehicle network in the operating environment (virtual environment) configured by the simulator. In this case, the message received by the gateway 300, 300a may be transmitted from a virtual machine (virtual ECU) that does not execute the firmware for update in the virtual environment. Also, each of one or more ECUs to be updated in firmware may be realized as a virtual machine operating in a computer configured like the simulator 800.
[0220] (13) The update firmware (binary data) shown in the above embodiment may be the entire firmware implemented in the ECU or a part of it. When the update firmware is a part of the firmware implemented in the ECU, it is overwritten on a part of the existing firmware in the ECU. In this case, the update firmware may be configured to include difference data (binary data) and information (e.g., address information, etc.) indicating which part it is applied to. In this case, the difference data may be merged with the existing firmware in the gateway 300, 300a or the ECU to be updated, and then the firmware in the boot ROM of the ECU may be replaced.
[0221] (14) The order of execution of the various processing steps (e.g., the specific steps shown in Figures 11 to 14 and Figures 21 to 25) shown in the above embodiments is not necessarily limited to the order as described above, and the order of execution may be changed, multiple steps may be performed in parallel, or some of the steps may be omitted, without departing from the spirit of the invention.
[0222] (15) In the above embodiment, the gateway 300, 300a and other ECUs are described as devices including digital circuits such as a processor and memory, analog circuits, communication circuits, etc., but may also include other hardware components such as a hard disk drive, a display, a keyboard, a mouse, etc. Also, instead of a control program stored in a memory being executed by a processor to realize a function in software, the function may be realized by dedicated hardware (digital circuits, etc.).
[0223] (16) It is assumed that some or all of the components constituting each device in the above embodiments are composed of one system LSI (Large Scale Integration). A system LSI is an ultra-multifunctional LSI manufactured by integrating multiple components on a single chip, and specifically, is a computer system including a microprocessor, a ROM, a RAM, etc. A computer program is recorded in the RAM. The microprocessor operates according to the computer program, and the system LSI achieves its functions. Each component of each device may be individually integrated into a single chip, or may be integrated into a single chip that includes some or all of the components. Although the term system LSI is used here, it may also be called an IC, LSI, super LSI, or ultra LSI depending on the degree of integration. The method of integration is not limited to LSI, and may be realized by a dedicated circuit or a general-purpose processor. FPGA (Field Programmable Gate Array) that can be programmed after LSI manufacture Or, a reconfigurable processor that can reconfigure the connections and settings of circuit cells inside the LSI may be used. Furthermore, if an integrated circuit technology that can replace LSI appears due to the progress of semiconductor technology or a different derived technology, it is natural that such technology can be used to integrate functional blocks. The application of biotechnology is also a possibility.
[0224] (17) Some or all of the components constituting each of the above devices may be composed of an IC card or a standalone module that can be attached to each device. The IC card or the module is a computer system composed of a microprocessor, ROM, RAM, etc. The IC card or the module may include the above-mentioned ultra-multifunction LSI. The microprocessor operates according to a computer program, causing the IC card or the module to achieve its functions. The IC card or the module may be tamper-resistant.
[0225] (18) One aspect of the present invention may be a firmware updating method including all or part of the processing steps shown in, for example, Figures 11, 12, 24, 25, etc. Also, the present invention may be a computer program (control program) for implementing this method by a computer, or a digital signal consisting of the computer program. For example, the present invention may be a control program for executing a firmware updating process including a receiving step, an acquiring step, and an updating processing step in the firmware updating method. Also, one aspect of the present invention may be a computer-readable recording medium for the computer readable computer program or the digital signal, for example, a flexible disk, a hard disk, a CD-ROM, an MO, a DVD, a DVD-ROM, a DVD-RAM, a BD (Blu-ray ( The information may be recorded on a disc (registered trademark), a semiconductor memory, etc. The computer program or the digital signal may be the digital signal recorded on a medium. In one aspect of the present invention, the computer program or the digital signal may be transmitted via an electric communication line, a wireless or wired communication line, a network such as the Internet, data broadcasting, or the like. In another aspect of the present invention, a computer system including a microprocessor and a memory may be used, in which the memory stores the computer program, and the microprocessor operates according to the computer program. The program or the digital signal may be recorded on the recording medium and transferred, or the program or the digital signal may be transferred via the network, or the like, to be implemented by another independent computer system.
[0226] (19) The scope of the present invention also includes configurations realized by arbitrarily combining the components and functions shown in the above embodiment and modified examples. [Industrial Applicability]
[0227] The present invention can be used to properly update firmware of an ECU connected to an in-vehicle network that complies with CAN. [Explanation of symbols]
[0228] 10 In-vehicle network system 100a~100d Electronic control unit (ECU) 101 Engine 102 Brake 103 Door opening / closing sensor 104 Window opening / closing sensor 110, 310 Frame transmitter / receiver 120, 320 Frame Interpretation Section 130, 330 Reception ID determination unit 140, 340 Reception ID list storage section 150, 350 frame processing section 160, 370, 370a FW update processing unit 161 FW cache holder 163, 373 Signature Verification Department 164, 374, 591 Key holding part 170 Data Acquisition Section 180 Frame Generation Unit 200a, 200b bus 300, 300a Gateway (gateway device) 360 Transfer rule storage unit 372, 531 ECU information holding unit 375 External Communications Department 380 Frame Generator 390 ECU information acquisition section 400 Network 500, 500a Server 510, 510a Data transmission and reception unit 520, 520a FW update control unit 530, 530a FW operation verification section 532 All FW holding part 570, 570a Distribution data generation unit 571 FW holding part 572 ECU management information holding unit 590 Signature generation section 800 Simulator 801 Virtual Machine Monitor 802~805 Virtual Machine 810, 820, 830, 840 Virtual Hardware 841 Firmware
Claims
1. A device connected to a network used for communication by a plurality of electronic control units mounted on a vehicle, an acquisition unit that acquires firmware update information including identification information that identifies one of the plurality of electronic control units, update firmware for the electronic control unit identified by the identification information, and verified configuration information; the verified configuration information indicates identification information for identifying each of a plurality of electronic control units used in verifying the operation of the update firmware and a firmware version of each of the plurality of electronic control units identified by the identification information, and among the firmware versions of each of the plurality of electronic control units, the firmware of an electronic control unit to be updated indicates a firmware version before the update; an acquisition unit that acquires system configuration information including identification information that identifies each of the plurality of electronic control units connected to the network and a firmware version of each of the plurality of electronic control units identified by the identification information; an update processing unit that compares a firmware version of each of the plurality of electronic control units identified by identification information indicated by the system configuration information with a firmware version of each of the plurality of electronic control units identified by identification information indicated by the verified configuration information, and performs control for updating the firmware of the corresponding electronic control unit based on the update firmware when a comparison result satisfies a certain condition. Device.
2. The firmware update processing unit further includes a transmitting unit that transmits information related to the firmware update information and the system configuration information as an operation verification request when a comparison result in the update processing unit does not satisfy a certain condition.
2. The apparatus of claim 1.
3. After the transmission unit transmits the operation verification request, the acquisition unit acquires the firmware update information again; The update processing unit compares the firmware version of each of the plurality of electronic control units identified by the identification information indicated by the system configuration information with the firmware version of each of the plurality of electronic control units identified by the identification information indicated by the verified configuration information, and when the comparison result satisfies a certain condition, performs control for updating the firmware of the corresponding electronic control unit based on the update firmware.
3. The apparatus of claim 2.
4. The plurality of electronic control units connected to the network are communicating over said network in accordance with a Canonical Area Network (CAN) protocol; The update processing unit transmits the update firmware to the corresponding electronic control unit via the network as the control for updating the firmware of the corresponding electronic control unit based on the update firmware.
3. Apparatus according to claim 1 or 2.
5. The case where the comparison result satisfies a certain condition is a case where the types of the plurality of electronic control units specified in the identification information before the update indicated by the verified configuration information include all types of the plurality of electronic control units specified in the identification information indicated by the system configuration information.
2. The apparatus of claim 1.
6. When the firmware update information includes a plurality of update firmware, the firmware update information further includes update order information indicating an update order of the firmware used for the operation verification, When the comparison result satisfies a certain condition, the update processing unit performs control for updating the firmware of the corresponding electronic control unit based on the update firmware in accordance with the order indicated by the update order information.
2. The apparatus of claim 1.
7. The firmware update information includes a time required for updating the firmware of the corresponding electronic control unit based on the update firmware or a memory size required for the update, When the comparison result satisfies a certain condition, the update processing unit determines a timing for performing control for updating the firmware of the corresponding electronic control unit based on the update firmware.
2. The apparatus of claim 1.
8. Further, a simulation unit that simulates the plurality of electronic control units, If the comparison result does not satisfy a certain condition, the simulation unit is caused to perform a simulation of the operation of the update firmware using the system configuration information, and after the operation is verified by the simulation, control is performed for updating the firmware of the corresponding electronic control unit based on the update firmware.
2. The apparatus of claim 1.
9. The case where the comparison result satisfies a certain condition is a case where the comparison result is a perfect match.
9. The apparatus of claim 8.
10. 1. A firmware updating method for updating firmware of an electronic control unit, comprising: an acquisition step in which a device connected to a network used for communication by a plurality of electronic control units mounted on a vehicle acquires firmware update information including identification information for identifying one of the plurality of electronic control units, firmware for updating the electronic control unit identified by the identification information, and verified configuration information; the verified configuration information indicates identification information for identifying each of a plurality of electronic control units used in verifying the operation of the update firmware and a firmware version of each of the plurality of electronic control units identified by the identification information, and among the firmware versions of each of the plurality of electronic control units, the firmware of an electronic control unit to be updated indicates a firmware version before the update; an acquisition step in which the device acquires system configuration information including identification information for identifying each of the plurality of electronic control units connected to the network and firmware versions of each of the plurality of electronic control units identified by the identification information; and an update processing step of comparing a firmware version of each of the plurality of electronic control units specified by identification information indicated by the system configuration information with a firmware version of each of the plurality of electronic control units specified by identification information indicated by the verified configuration information, and performing control for updating the firmware of the corresponding electronic control unit based on the update firmware when a comparison result satisfies a certain condition. How to update firmware.
11. The firmware updating method further comprises: a transmission step of transmitting information regarding the firmware update information and the system configuration information as an operation verification request when the comparison result in the update processing step does not satisfy a certain condition. The firmware updating method according to claim 10.
12. A control program for causing a device having a processor, the device being connected to a network used for communication by a plurality of electronic control units mounted on a vehicle, to execute a firmware update process, the control program comprising: The firmware update process includes: an acquiring step of acquiring firmware update information including identification information for identifying one of the plurality of electronic control units, and update firmware and verified configuration information for the electronic control unit identified by the identification information; the verified configuration information indicates identification information for identifying each of a plurality of electronic control units used in verifying the operation of the update firmware and a firmware version of each of the plurality of electronic control units identified by the identification information; an acquisition step of acquiring system configuration information including identification information for identifying each of the plurality of electronic control units connected to the network and firmware versions of each of the plurality of electronic control units identified by the identification information; and an update processing step of comparing a firmware version of each of the plurality of electronic control units specified by identification information indicated by the system configuration information with a firmware version of each of the plurality of electronic control units specified by identification information indicated by the verified configuration information, and performing control for updating the firmware of the corresponding electronic control unit based on the update firmware when a comparison result satisfies a certain condition. Control program.
Citation Information
Patent Citations
Data rewriting method and electronic control device
JP2004310221A
Onboard information equipment, onboard equipment management system, method for distributing upgrade information of program of control unit of vehicle, and upgrade method and system for program of control unit of vehicle
JP2005202503A
Software management device
JP2006011647A
Vehicular electronic control device
JP2007126024A
Program management system for on-vehicle electronic control unit
JP2009053920A
