This application is based upon and claims the benefit of priority from the prior Japanese Patent Application No. 2016-051518, filed on Mar. 15, 2016, the entire contents of which are incorporated herein by reference.
Field of the Invention
The present invention relates to a communication apparatus and a communication system.
Description of the Related Art
As described in Japanese Patent No. 5304351, a number of ECUs (Electronic Control Units) are provided in a recent vehicle, and communicate with each other via a vehicle network such as a CAN (Controller Area Network). The vehicle network may be called an in-vehicle network. In accordance with a CAN communication protocol, unique identification information (ID) is assigned to each ECU. To diagnose a vehicle, a diagnostic apparatus outside the vehicle communicates with each ECU using the identification information assigned to the ECU.
Along with the computerization of a vehicle, the number of ECUs increases, and the number of pieces of identification information assigned to the ECUs may reach the upper limit defined by the communication standard. In addition to a communication system mounted on the vehicle, the same problem may arise in terms of an increase in number of communication apparatuses of a communication system mounted on another machine. According to an aspect of the present invention, the number of pieces of identification information assigned to communication apparatuses forming a communication system is reduced.
According to some embodiments, a communication system is provided. The system comprises: a first communication apparatus connected to a first communication path and a second communication path; and at least one second communication apparatus connected to the second communication path. The first communication apparatus includes a first communication unit configured to perform communication with the first communication path, a second communication unit configured to perform communication with the second communication path, and a control unit configured to: receive, from the first communication path, a first frame storing a diagnosis request and identification information of the first communication apparatus; specify, among the at least one second communication apparatus, a second communication apparatus to process the diagnosis request; generate a second frame by rewriting the identification information stored in the first frame to identification information of the specified second communication apparatus; and transmit the second frame to the second communication path.
Further features of the present invention will become apparent from the following description of exemplary embodiments (with reference to the attached drawings).
<Communication System>
A communication system 100 according some embodiments will be described with reference to
In the example of
One ECU in each domain is also connected to a communication path different from the sub bus 119 or 129. This communication path will be referred to as a main bus 103 hereinafter. In the example of
Identification information (ID) is assigned to each of the communication apparatuses (the ECUs 111 to 118 and 121 to 128 and gateway apparatus 101) of the communication system 100. Different IDs are respectively assigned to communication apparatuses (the master ECUs 111 and 121 and gateway apparatus 101) connected to the main bus 103. Furthermore, in each domain, different IDs are respectively assigned to communication apparatuses (the master ECU and slave ECUs) connected to one sub bus. Identical IDs may be assigned to a plurality of ECUs belonging to different domains. For example, “11” is assigned, as an ID, to the ECU 112 belonging to the brake system domain 110 and the ECU 122 belonging to the power train system domain 120. As will be described in detail below, communication is performed using the ID assigned to each ECU. By allowing identical IDs of slave ECUs, the number of IDs used in the communication system 100 can be reduced.
The gateway apparatus 101 is also connected to a terminal 102 for accepting connection from the outside of the communication system 100. A diagnostic apparatus 130 existing outside the communication system 100 can connect to the terminal 102. When performing, for example, legal inspection and maintenance, the diagnostic apparatus 130 communicates with the communication system 100 via the terminal 102, and diagnoses the vehicle. The diagnostic apparatus 130 has a correspondence table between a “diagnosis request” and a “domain” as represented by a table 301 shown in
<Communication Apparatus>
Examples of the arrangements of the communication apparatuses included in the communication system 100 will be described with reference to
The master ECU 111 includes a control circuit 201 and communication circuits 204 and 205. The control circuit 201 controls the overall operation of the master ECU 111. The control circuit 201 includes a processor 202 such as a microprocessor formed by a CPU and the like, and a memory 203 formed by a ROM, a RAM, and the like. An operation by the ECU 111 is controlled when the processor 202 executes a program stored in the memory 203. Instead, the control circuit 201 may be formed by a dedicated circuit such as an ASIC (Application Specific Integrated Circuit), or a combination of a dedicated circuit and a processor.
As shown in
The communication circuit 204 processes communication with the main bus 103. More specifically, the communication circuit 204 performs a reception operation of receiving data which flows through the main bus 103 and is destined for the master ECU 111, and transferring the data to the control circuit 201, and a transmission operation of transmitting the data received from the control circuit 201 to the main bus 103. The communication circuit 205 processes communication with the sub bus 119. More specifically, the communication circuit 205 performs a reception operation of receiving data which flows through the sub bus 119 and is destined for the master ECU 111, and transferring the data to the control circuit 201, and a transmission operation of transmitting the data received from the control circuit 201 to the sub bus 119. The communication circuits 204 and 205 may be formed as different circuits or formed as an integrated circuit.
The memory 203 also stores tables 302 and 303 shown in
The table 303 is a correspondence table between an “ECU” and an “ID”. The column of the “ECU” of the table 303 indicates a function controlled by a slave ECU belonging to the same brake system domain 110 as that of the master ECU 111. The column of the “ID” of the table 303 indicates an ID assigned to each ECU. The table 303 may be different for each domain of the same vehicle type and grade, and may be different for each vehicle type and grade of the same domain.
The slave ECU 112 includes a control circuit 211 and a communication circuit 214. The control circuit 211 controls the overall operation of the slave ECU 112. The control circuit 211 includes a processor 212 such as a microprocessor formed by a CPU and the like, and a memory 213 formed by a ROM, a RAM, and the like. An operation by the ECU 112 is controlled when the processor 212 executes a program stored in the memory 213. Instead, the control circuit 211 may be formed by a dedicated circuit such as an ASIC (Application Specific Integrated Circuit), or a combination of a dedicated circuit and a processor.
As shown in
The communication circuit 214 processes communication with the sub bus 119. More specifically, the communication circuit 214 performs a reception operation of receiving data which flows through the sub bus 119 and is destined for the slave ECU 112, and transferring the data to the control circuit 211, and a transmission operation of transmitting the data received from the control circuit 211 to the sub bus 119.
<Frame>
The format of a frame 400 used for communication in the communication system 100 will be described with reference to
A practical example of the frame communicated between the communication apparatuses will be described with reference to
The frame 402 is transmitted from the gateway apparatus 101 to the main bus 103. The frame 402 is identical to the frame 401. That is, the gateway apparatus 101 transfers, to the main bus 103, the frame received from the diagnostic apparatus 130 without any change.
A frame 403 is transmitted from the master ECU 111 to the sub bus 119. An ID field 400a of the frame 403 stores an ID assigned to a slave ECU for controlling a function to be diagnosed. For example, if the diagnosis request is related to VSA, the master ECU 111 stores “11”, which is the ID of the slave ECU 112, in the ID field 400a of the frame 403. A data field 400b of the frame 403 is the same as the data field 400b of the frame 402.
A frame 404 is transmitted from the ECU 112 to the sub bus 119. An ID field 400a of the frame 404 stores “11”, which is the ID assigned to the slave ECU 112. A data field 400b of the frame 404 stores a diagnosis result by the slave ECU 112.
A frame 405 is transmitted from the master ECU 111 to the main bus 103. An ID field 400a of the frame 405 stores “14”, which is the ID assigned to the master ECU 111. A data field 400b of the frame 405 stores a diagnosis result by the slave ECU 112.
A frame 406 is transmitted from the gateway apparatus 101 to the diagnostic apparatus 130. The frame 406 is identical to the frame 405. That is, the gateway apparatus 101 transfers, to the diagnostic apparatus 130, the frame received from the master ECU 111 without any change. Since the diagnostic apparatus 130 and the gateway apparatus 101 are directly connected, the diagnostic apparatus 130 receives the frame 406 from the gateway apparatus 101 regardless of the value of the ID stored in the ID field 400a.
Communication between the diagnostic apparatus 130 and the gateway apparatus 101 may comply with a protocol different from that for communication in the main bus 103 and the sub buses 119 and 129. In this case, the diagnostic apparatus 130 transfers, to the gateway apparatus 101, pieces of information included in the ID field 400a and data field 400b of the frame 401 in accordance with another protocol, and the gateway apparatus 101 generates the frame 402 in accordance with the information. The gateway apparatus 101 extracts the pieces of information included in the ID field 400a and data field 400b of the frame 405, and transfers the pieces of information to the diagnostic apparatus 130.
<Flowcharts>
An example of the operation of the communication system 100 will be described with reference to
In step S501, the communication circuit 204 determines whether a frame destined for the self ECU flows through the main bus 103. If the ID field 400a of the frame flowing through the main bus 103 stores the ID (“14”) of the self ECU, the communication circuit 204 determines that the frame is destined for the self ECU. If the frame 402 destined for the self ECU flows (“YES” in step S501), in step S502 the communication circuit 204 receives the frame 402 and transfers it to the control circuit 201; otherwise (“NO” in step S501), the communication circuit 204 repeats step S501.
In step S503, with reference to the table 302, the control circuit 201 specifies an ECU to process the diagnosis request stored in the data field 400b of the frame 402. In step S504, with reference to the table 303, the control circuit 201 determines whether the specified ECU is connected to the sub bus 119 (that is, whether the specified ECU belongs to the brake system domain 110).
If it is determined that the specified ECU is connected to the sub bus 119 (“YES” in step S504), in step S505 the control circuit 201 generates the frame 403 by rewriting the ID field 400a of the frame 402 to the ID of the specified ECU, and transfers the frame 403 to the communication circuit 205. With reference to the table 303, the control circuit 201 can acquire the ID of the specified ECU. In step S506, the communication circuit 205 transmits the received frame 403 to the sub bus 119.
If it is determined that the specified ECU is not connected to the sub bus 119 (“NO” in step S504), in step S507 the control circuit 201 generates a frame by storing, in the data field 400b, a negative acknowledgement representing that no ECU necessary for diagnosis is included, and transfers the generated frame to the communication circuit 204. The control circuit 201 stores the ID (“14”) of the self ECU in the ID field 400a of this frame. In step S508, the communication circuit 204 transmits the received frame to the main bus 103.
An operation in which the slave ECU (for example, the ECU 112) receives a diagnosis request will be described with reference to
In step S601, the communication circuit 214 determines whether a frame destined for the self ECU flows through the sub bus 119. If the ID field 400a of the frame flowing through the sub bus 119 stores the ID (“11”) of the self ECU, the communication circuit 214 determines that this frame is destined for the self ECU. If the frame 403 destined for the self ECU flows (“YES” in step S601), in step S602 the communication circuit 214 receives the frame 403 and transfers it to the control circuit 211; otherwise (“NO” in step S601), the communication circuit 214 repeats step S601.
In step S603, the control circuit 211 executes processing in accordance with the diagnosis request stored in the data field 400b of the frame 403, and generates a diagnosis result. In step S604, the control circuit 211 generates the frame 404 by storing the ID (“11”) of the self ECU in the ID field 400a, and storing the diagnosis result in the data field 400b. The ID of the self ECU is stored in the memory 213 of the control circuit 211. The control circuit 211 transfers the generated frame 404 to the communication circuit 214. In step S605, the communication circuit 214 transmits the received frame 404 to the sub bus 119.
An operation in which the master ECU (for example, the ECU 111) receives the diagnosis result will be described with reference to
In step S701, the control circuit 201 determines whether the frame 403 has been transmitted to the slave ECU (for example, the ECU 112) in step S506. If it is determined that the frame 403 has not been transmitted (“NO” in step S701), the master ECU 111 need not receive the frame 404 transmitted by the slave ECU (for example, the ECU 112), and thus the control circuit 201 ends the process.
If it is determined that the frame 403 has been transmitted (“YES” in step S701), the communication circuit 205 determines in step S702 whether the frame from the slave ECU flows through the sub bus 119. If the ID field 400a of the frame flowing through the sub bus 119 stores the ID (“11”) included in the table 303, the communication circuit 205 determines that this frame is destined for the self ECU. If the frame 404 destined for the self ECU flows (“YES” in step S702), in step S703 the communication circuit 205 receives the frame 404 and transfers it to the control circuit 201.
In step S704, the control circuit 201 generates the frame 405 by rewriting the ID stored in the ID field 400a of the received frame 404 to the ID (“14”) of the self ECU, and transfers the frame 405 to the communication circuit 204. In step S705, the communication circuit 205 transmits the received frame 405 to the main bus 103.
If the frame 404 destined for the self ECU does not flow (“NO” in step S702), the control circuit 201 determines in step S706 whether a predetermined time has elapsed after transmitting the frame 403 in step S506. If it is determined that the predetermined time has elapsed (“YES” in step S706), the control circuit 201 determines that the frame 404 cannot be normally received from the slave ECU 112. In this case, the control circuit 201 creates a frame by storing, in the data field 400b, a negative acknowledgement representing a communication error, and transfers the frame to the communication circuit 204. The control circuit 201 stores the ID (“14”) of the self ECU in the ID field 400a of this frame. After that, in step S705, the communication circuit 205 transmits the received frame 405 to the main bus 103.
If it is determined that the predetermined time has not elapsed (“NO” in step S706), the control circuit 201 returns the process to step S702, and stands by for a frame from the slave ECU. As the predetermined time, a frame response time is set in consideration of the time (for example, about 50 ms) from when the frame 401 is received until transmission of the frame 406 is completed.
In the above-described embodiment, an ECU functions as a communication apparatus connected to both the main bus 103 and the sub bus 119 or 129. Instead, a dedicated communication apparatus (that is, a communication apparatus without the sensor 206 and the actuator 207) may be connected to both the main bus 103 and the sub bus 119 or 129, and may perform the operations of the flowcharts of
[Arrangement 1]
There is provided a communication system (for example, 100) comprising:
According to arrangement 1, it is possible to reduce the number of pieces of identification information assigned to the communication apparatuses forming the communication system.
[Arrangement 2]
There is provided the system according to arrangement 1, wherein the control unit is further configured to:
receive, from the second communication path, a third frame (for example, 404) storing a diagnosis result for the diagnosis request; and
transmit a fourth frame (for example, 405) storing the diagnosis result to the first communication path.
According to arrangement 2, it is possible to respond with the diagnosis result via the same communication path.
[Arrangement 3]
There is provided the system according to arrangement 2, wherein the third frame includes the identification information of the specified second communication apparatus.
According to arrangement 3, since the first communication apparatus requires no new identification information to receive the third frame, it is possible to further reduce the number of pieces of identification information assigned to the communication apparatuses.
[Arrangement 4]
There is provided the system according to arrangement 2, wherein the control unit is further configured to generate the fourth frame by rewriting the identification information stored in the third frame to the identification information of the first communication apparatus.
According to arrangement 4, it is possible to further reduce the number of pieces of identification information assigned to the communication apparatuses using the identification information of the first communication apparatus as the identification information of the frame for returning the diagnosis result.
[Arrangement 5]
There is provided the system according to arrangement 1, wherein the control unit is further configured to:
determine whether the specified second communication apparatus is connected to the second communication path; and
transmit, if it is determined that the specified second communication apparatus is not connected to the second communication path, a frame storing a negative acknowledgement to the first communication path.
According to arrangement 5, it is possible to generate an appropriate response according to the second communication apparatus included in the communication system.
[Arrangement 6]
There is provided the system according to arrangement 1, wherein the control unit is further configured to receive the first frame from a diagnostic apparatus (for example, 130) existing outside the communication system.
According to arrangement 6, it is possible to receive the diagnosis request from the external diagnostic apparatus.
[Arrangement 7]
There is provided the system according to arrangement 1, wherein the at least one second communication apparatus comprises an ECU.
According to arrangement 7, it is possible to obtain the above-described effect in the communication system using the ECU.
[Arrangement 8]
There is provided the system according to arrangement 1, wherein the first communication apparatus comprises an ECU.
According to arrangement 8, it is possible to cause the first communication apparatus, which performs the above operation, to operate as an ECU.
[Arrangement 9]
There is provided the system according to arrangement 1, wherein communication via the first communication path and the second communication path complies with a CAN communication protocol.
According to arrangement 9, it is possible to obtain the above-described effect in communication complying with the CAN communication protocol.
[Arrangement 10]
There is provided the system according to arrangement 1, wherein the system forms an in-vehicle network.
According to arrangement 10, it is possible to obtain the above-described effect in the in-vehicle network.
[Arrangement 11]
There is provided the system according to arrangement 1, wherein the at least one second communication apparatus performs processing related to a power train function.
According to arrangement 11, it is possible to obtain the above-described effect in the communication system for performing the processing related to the power train function.
[Arrangement 12]
There is provided a communication apparatus (for example, 111, 121) connected to a first communication path (for example, 103) and a second communication path (for example, 119, 129), comprising:
a first communication unit (for example, 204) configured to perform communication with the first communication path,
a second communication unit (for example, 205) configured to perform communication with the second communication path, and
a control unit (for example, 201) configured to:
According to arrangement 12, it is possible to reduce the number of pieces of identification information assigned to the communication apparatuses forming the communication system.
While the present invention has been described with reference to exemplary embodiments, it is to be understood that the invention is not limited to the disclosed exemplary embodiments. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.
This application claims the benefit of Japanese Patent Application No. 2016-051518, filed Mar. 15, 2016, which is hereby incorporated by reference herein in its entirety.
Number | Date | Country | Kind |
---|---|---|---|
2016-051518 | Mar 2016 | JP | national |