Controller Area Network Bus Communication System and Retransmission Control Method

JP2026170852APending Publication Date: 2026-10-22PEGATRON
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2026039962
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-04-09
Filing Date
2026-03-12
Publication Date
2026-10-22

Smart Images

  • Figure 2026170852000001_ABST
    Figure 2026170852000001_ABST
Patent Text Reader

Abstract

This provides a controller area network bus communication system and a retransmission control method that avoid system crashes and / or data loss problems. [Solution] The method includes setting a preset number of transmissions and a retransmission strategy via a first device. The retransmission strategy includes a plurality of transmission counts and a plurality of timeout intervals corresponding to each of these transmission counts. The method also includes sending a transmission request to a second device via the first device, determining via the first device, based on the retransmission strategy, whether a reply corresponding to the transmission request has been received within the current timeout interval corresponding to the current transmission count, determining via the first device, in response to not receiving a reply within the current timeout interval, whether the current transmission count is less than the preset number, and retransmitting the transmission request to the second device via the first device in response to the current transmission count being less than the preset number.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a controller area network (CAN) bus, and in particular, to a controller area network bus communication system and a retransmission control method.

Background Art

[0002] In current controller area network bus technology, after a master device sends a transmission request to a slave device, if the master device does not receive a response corresponding to the transmission request from the slave device within a timeout interval, the master device retransmits the transmission request until a response is received or the number of times the transmission request is retransmitted reaches a preset value.

[0003] In general, master devices usually adopt a fixed-interval retransmission mechanism. After sending a transmission request to a slave device, the master device monitors whether a corresponding response is received within a fixed timeout interval each time. However, since this fixed timeout interval has a limited length, it cannot provide sufficient recovery time for the slave device and / or the controller area network bus, and repeated retransmissions of the transmission request within a short period of time may generate a large amount of load, which may lead to problems of system crash and / or data loss.

Summary of Invention

Problems to be Solved by the Invention

[0004] In view of this, the present invention provides a controller area network bus communication system and a retransmission control method capable of dynamically adjusting the length of a timeout interval, thereby improving the stability of the controller area network bus communication system and solving the above-mentioned problems. [Means for solving the problem]

[0005] The controller area network bus communication system of the present invention includes a first device and a second device. The second device is connected to the first device via a controller area network bus. The first device sets a preset number of transmissions and a retransmission strategy, the retransmission strategy including a plurality of transmission counts and a plurality of timeout intervals corresponding to each of these transmission counts, and all of these timeout intervals are different. The first device sends a transmission request to the second device. Based on the retransmission strategy, the first device determines whether it has received a reply corresponding to the transmission request within the current timeout interval corresponding to the current number of transmissions. In response to not having received a reply within the current timeout interval, the first device determines whether the current number of transmissions is less than the preset number. In response to the current number of transmissions being less than the preset number, the first device retransmits the transmission request to the second device.

[0006] The retransmission control method of the present invention is used in a controller area network bus communication system, which includes a first device and a second device. The second device is connected to the first device via a controller area network bus. The retransmission control method includes setting a preset number of transmissions and a retransmission strategy via the first device, wherein the retransmission strategy includes a plurality of transmission counts and a plurality of timeout intervals corresponding to each of these transmission counts, and all of these timeout intervals are different; sending a transmission request to the second device via the first device; determining via the first device, based on the retransmission strategy, whether a reply corresponding to the transmission request has been received within the current timeout interval corresponding to the current number of transmissions; determining via the first device, in response to not receiving a reply within the current timeout interval, whether the current number of transmissions is less than the preset number; and retransmitting the transmission request to the second device via the first device in response to the current number of transmissions being less than the preset number. [Effects of the Invention]

[0007] As described above, the controller area network bus communication system and retransmission control method of the present invention can improve the stability of the controller area network bus communication system by allowing the preset number of retransmissions and retransmission strategy to be set and the length of the timeout interval to be dynamically adjusted.

[0008] To make the above-mentioned features and advantages of the present invention easier to understand, embodiments are described below in detail in conjunction with the drawings. [Brief explanation of the drawing]

[0009] [Figure 1] This is a schematic diagram showing a controller area network bus communication system according to one embodiment of the present invention. [Figure 2] This is a schematic diagram illustrating the timing for managing a conventional controller area network bus communication system. [Figure 3] This is a schematic diagram illustrating the timing for managing a controller area network bus communication system according to one embodiment of the present invention. [Figure 4] This is a flowchart of a retransmission control method according to one embodiment of the present invention. [Modes for carrying out the invention]

[0010] Figure 1 is a schematic diagram showing a controller area network bus communication system according to one embodiment of the present invention. Referring to Figure 1, the controller area network bus communication system 10 may include a first device 100 and a second device 200. The first device 100 and the second device 200 are connected to the second device 200 via a controller area network bus B. In this embodiment, the first device 100 is, for example, a data (or signal) transmitting end and is also referred to as a master device. The second device 200 is, for example, a data (or signal) receiving end and is also referred to as a slave device. In one embodiment, the controller area network bus communication system 10 can be applied, for example, to an in-vehicle system.

[0011] The first device 100 (or the second device 200) may have components necessary to operate the first device 100 (or the second device 200), such as a processing unit (e.g., a processor, but the present invention is not limited thereto), a communication unit (e.g., various communication chips, mobile communication chips, Bluetooth chips, WiFi chips, etc., but the present invention is not limited thereto), and a storage unit (e.g., removable random access memory, flash memory, hard disk, etc., but the present invention is not limited thereto). The first device 100 (or the second device 200) may further include logic circuits having specific functions. For example, the first device 100 may include a timer (not shown) for calculating the current number of transmissions.

[0012] Figure 2 is a schematic timing diagram for managing a conventional controller area network bus communication system. Referring to Figure 2, generally, in a conventional transmission method, the schematic timing diagram for a first device 100 (i.e., master device) and a second device 200 (i.e., slave device) that perform data (or signal) interaction via the controller area network bus B may be as shown in Figure 2, for example. In Figure 2, the length of the message handshake interval may be, for example, M milliseconds, and the length of the timeout interval may be, for example, T milliseconds. Here, M and T are both positive integers, and M is greater than T. The values ​​of M and T may be calculated by, for example, the first device 100, or designed by the user according to actual requirements, but this invention is not limited thereto.

[0013] To further explain, the message handshake interval is used to represent the time it takes for the first device 100 to interact with the second device 200 for data (or signals). The first device 100 can set the length of the message handshake interval based, for example, on the average time (e.g., M milliseconds) it takes to interact with the second device 200 for one data (or signal) interaction. The first device 100 can also determine the timeout interval based, for example, on the current usage of the controller area network bus communication system 10 (e.g., system load, noise interference level, etc.).

[0014] First, at time T0, the first device 100 can send a request to the second device 200, requesting data (or signal) interaction with the second device 200. After sending the request, the first device 100 monitors whether it receives a response corresponding to the request within a timeout interval (i.e., from time T1 to time T1+T) to determine whether the second device 200 has received the request. Assuming that the second device 200 has received the request, at time T1, the second device 200 can send a response corresponding to the request to the first device 100, indicating that the first device 100 may begin sending the data (or signal) it intends to send to the second device 200. In this case, as shown in Figure 2, if the first device 100 receives a reply corresponding to the transmission request within the timeout interval, the first device 100 can perform data (or signal) interaction with the second device 200 before the message handshake interval (i.e., from time T0 to time T0+M) ends.

[0015] It should be explained that the time interval between time point T0 and time point T1 is extremely short and can therefore be ignored. That is, time point T1 may, for example, be equal to time point T0.

[0016] Subsequently, when attempting to perform the next data (or signal) interaction, the first device 100 may again send a transmit request to the second device 200 at the start of the next message handshake interval (i.e., time T0+M).

[0017] Next, the first device 100 monitors whether it receives a reply corresponding to the transmission request within the timeout interval (i.e., from time T2 to time T2+T). Generally, the reasons why the first device 100 does not receive a reply within the timeout interval may include, for example, the second device 200 being busy, the second device 200 not receiving the transmission request due to severe noise interference on the controller area network bus B, or the first device 100 being unable to receive a reply. Conversely, if the first device 100 does not receive a reply corresponding to the transmission request within the timeout interval, the first device 100 can resend the transmission request.

[0018] However, frequently sending transmission requests can overload the controller area network bus communication system 10, potentially leading to system crashes. Therefore, in conventional methods, the first device 100 can set, for example, a maximum number of retransmissions (e.g., 4 times).

[0019] As shown in Figure 2, if the first device 100 does not receive a reply within the timeout interval, at time T2+T, the first device 100 resends the transmission request to the second device 200 and monitors whether it receives a reply within the timeout interval (i.e., from time T3 to time T3+T). The number of retries at this time is 1. However, since the first device 100 still has not received a reply within the timeout interval, at time T3+T, the first device 100 resends the transmission request to the second device 200 again, this time the number of retries is 2. Since the first device 100 still has not received a reply within the timeout interval (i.e., from time T4 to time T4+T), at time T4+T, the first device 100 resends the transmission request to the second device 200 again, this time the number of retries is 3.

[0020] Finally, since the first device 100 has still not received a reply within the timeout interval (i.e., from time T5 to time T5+T), at time T5+T, the first device 100 can send the final transmission request to the second device 200. The number of retries at this point is 4, reaching the maximum number of retries. As shown in Figure 2, since the first device 100 has still not received a reply corresponding to its last send request within the timeout interval (i.e., from time T6 to time T6+T), the first device 100 temporarily refrains from data (or message) interaction with the second device 200 during the current message handshake period (i.e., from time T0+M to time T0+2M). At the start of the next message handshake interval (i.e., time T0+2M), it sends another send request to the second device 200, and in response to the first device 100 receiving a reply within the timeout interval (i.e., from time T7 to time T7+T), it can then perform data (or message) interaction with the second device 200.

[0021] It should be explained that the time interval between time point T0+M (or time point T0+2M) and time point T2 (or time point T7) is extremely short and can be ignored. That is, time point T0+M (or time point T0+2M) may be equal to, for example, time point T2 (or time point T7). Also, the time interval between time point T2+T (or time points T3+T, T4+T, T5+T) and time point T3 (or time points T4, T5, T6) is extremely short and can be ignored. That is, time point T2+T (or time points T3+T, T4+T, T5+T) may be equal to, for example, time point T3 (or time points T4, T5, T6). Furthermore, in a certain state, the time interval between time point T6+T and time point T0+1.5M is extremely short and can be ignored. That is, time point T6+T may be equal to, for example, time point T0+1.5M.

[0022] It should be noted that the retry interval in Figure 2 is, for example, from time point T0+1M to time point T0+1.5M. In the conventional method, as shown in Figure 2, when a reply to a transmission request is not received, the first device 100 adopts a fixed interval retransmission mechanism within the retry interval (that is, all the timeout intervals in Figure 2 are fixed at T milliseconds), and when no reply is received even after the number of retransmissions reaches the maximum retransmission count, the data (or message) interaction with the second device 200 is temporarily suspended within the message handshake interval.

[0023] However, since the fixed interval retransmission mechanism quickly reaches the maximum number of retransmissions, if the busy state of the second device 200 and / or the noise interference on the controller area network bus B cannot be quickly eliminated in a short time, the probability that the first device 100 has to abandon transmission increases, which affects transmission reliability and may cause problems such as data loss.

[0024] In view of this, the present invention provides a retransmission control method capable of dynamically adjusting the length of the timeout interval, which avoids imposing a burden on the controller area network bus B by repeatedly transmitting transmission requests in a short time, and provides more processing time to the second device 200 in the busy state and / or more noise elimination time to the controller area network bus B, thereby improving the stability of the controller area network bus communication system 10.

[0025] Figure 3 is a schematic timing diagram for managing a controller area network bus communication system according to one embodiment of the present invention.

[0026] In one embodiment, the first device 100 can configure a preset number of transmissions and a retransmission strategy, where the retransmission strategy includes a plurality of transmission counts and a plurality of timeout intervals corresponding to each of the plurality of transmission counts, and each timeout interval is different. Specifically, the first device 100 can configure the number of times a transmission request can be sent within a single message handshake interval (i.e., a preset number) (for example, 5 times), and configure a timeout interval corresponding to each transmission request sent.

[0027] For example, the first device 100 can set the timeout interval for the first transmission request to A milliseconds. For example, the first device 100 can set the timeout interval for the second transmission request to B milliseconds. For example, the first device 100 can set the timeout interval for the third transmission request to C milliseconds. For example, the first device 100 can set the timeout interval for the fourth transmission request to D milliseconds. For example, the first device 100 can set the timeout interval for the fifth transmission request to E milliseconds.

[0028] To elaborate further, the length of each timeout interval is positively correlated with the magnitude of its corresponding transmission count. That is, A, B, C, D, and E are all positive integers, and E is greater than D, D is greater than C, C is greater than B, and B is greater than A. For example, the first device 100 can generate multiple timeout intervals that increase increment randomly, or the values ​​of A, B, C, D, and E are a geometric series.

[0029] It should be explained that the timeout interval mentioned above is related to the length of the message handshake interval (i.e., M milliseconds). The first device 100 can avoid situations where it sends multiple transmission requests in a short period of time by, for example, approximating the total length of multiple timeout intervals to the length of the message handshake interval. This allows the second device 200 and / or the controller area network bus B to recover sufficiently when the first device 100 has not received a reply corresponding to a transmission request, thereby improving the stability of the controller area network bus communication system 10.

[0030] After setting the preset number of transmissions and the retransmission strategy, at time T0, the first device 100 can send a transmission request to the second device 200 and request data (or signal) interaction with the second device 200. Subsequently, based on the retransmission strategy, the first device 100 can determine whether it has received a reply corresponding to the transmission request within the current timeout interval corresponding to the current number of transmissions. Specifically, the transmission request sent at time T0 is the first transmission request sent by the first device 100 during this message handshake interval (i.e., from time T0 to time T0+M), and at this time, the current number of transmissions is 1. Based on this, the first device 100 can determine, based on the retransmission strategy, whether it has received a reply corresponding to the transmission request within the current timeout interval corresponding to the current number of transmissions (i.e., from time T1 to time T1+A).

[0031] As shown in Figure 3, since the first device 100 received a reply from the second device 200 within the current timeout interval, the first device 100 can perform data (or signal) interaction with the second device 200 before the message handshake interval ends.

[0032] Next, at the start of the next message handshake interval (i.e., time T0+M), the first device 100 can send a send request to the second device 200. Similarly, the first device 100 can determine, based on the retransmission strategy, whether it has received a reply corresponding to the send request within the current timeout interval corresponding to the current number of transmissions.

[0033] To explain in more detail, the send request sent at time T0+M is the first send request sent by the first device 100 during the current message handshake interval (i.e., from time T0+M to time T0+2M), and at this time, the current number of transmissions is 1. Based on this, the first device 100 can determine, based on its retransmission strategy, whether it received a reply corresponding to the send request within the current timeout interval (i.e., from time T2 to time T2+A) corresponding to the current number of transmissions.

[0034] As shown in Figure 3, since the first device 100 did not receive a reply within the current timeout interval, the first device 100 can further determine whether the current number of transmissions (i.e., 1) is less than the preset number (i.e., 5). In this case, since the current number of transmissions is less than the preset number, the first device 100 can retransmit the transmission request to the second device 200 at time T2+A and, based on the retransmission strategy, determine whether it received a reply corresponding to the transmission request within the current timeout interval (i.e., from time T3 to time T3+B) corresponding to the current number of transmissions (i.e., 2).

[0035] Since the first device 100 did not receive a reply within the current timeout interval, the first device 100 can again determine whether the current number of transmissions (i.e., 2) is less than the preset number. In this case, since the current number of transmissions is less than the preset number, the first device 100 retransmits the transmission request to the second device 200 at time T3+B and, based on the retransmission strategy, can determine whether it received a reply corresponding to the transmission request within the current timeout interval (i.e., from time T4 to time T4+C) corresponding to the current number of transmissions (i.e., 3).

[0036] Since the first device 100 did not receive a reply within the current timeout interval, the first device 100 can again determine whether the current number of transmissions (i.e., 3) is less than the preset number. In this case, since the current number of transmissions is less than the preset number, the first device 100 retransmits the transmission request to the second device 200 at time T4+C and, based on the retransmission strategy, can determine whether it received a reply corresponding to the transmission request within the current timeout interval (i.e., from time T5 to time T5+D) corresponding to the current number of transmissions (i.e., 4).

[0037] Since the first device 100 did not receive a reply within the current timeout interval, the first device 100 can again determine if the current number of transmissions (i.e., 4) is less than the preset number. In this case, since the current number of transmissions is less than the preset number, the first device 100 retransmits the transmission request to the second device 200 at time T5+D and, based on the retransmission strategy, can determine whether it received a reply corresponding to the transmission request within the current timeout interval (i.e., from time T6 to time T6+E) corresponding to the current number of transmissions (i.e., 5).

[0038] Since the first device 100 did not receive a reply within the current timeout interval, it can again determine whether the current number of transmissions (i.e., 5) is less than the preset number. In this case, since the current number of transmissions has reached the preset number (i.e., 5), the first device 100 does not send a transmission request to the second device 200. In other words, if the first device 100 sends 5 transmission requests and does not receive a corresponding reply each time, it indicates that the second device 200 is busy and / or that noise interference on the controller area network bus B is severe, and therefore the first device 100 can stop sending transmission requests to the second device 200.

[0039] Subsequently, at the start of the next message handshake interval (i.e., time T0+2M), the first device 100 sends another send request to the second device 200 and, based on the retransmission strategy, can determine whether it received a reply corresponding to the send request within the current timeout interval (i.e., from time T7 to time T7+A) corresponding to the current number of transmissions (i.e., 1). As shown in Figure 3, the first device 100 has received a reply within the current timeout interval and can therefore interact with the second device 200 for data (or messages).

[0040] It should be explained that in one embodiment, the time interval between time point T0 (or time points T0+M, T0+2M) and time point T1 (or time points T2, T7) is extremely short and can be ignored. That is, time point T0 (or time points T0+M, T0+2M) may be equal to, for example, time point T1 (or time points T2, T7). Also, in one embodiment, the time interval between time point T2+A (or time points T3+B, T4+C, T5+D, T6+E) and time point T3 (or time points T4, T5, T6, T0+2M) is extremely short and can be ignored. That is, time point T2+A (or time points T3+B, T4+C, T5+D, T6+E) may be equal to, for example, time point T3 (or time points T4, T5, T6, T0+2M).

[0041] Based on the above, the retransmission control method provided by the embodiment of the present invention can dynamically adjust the length of the timeout interval, thus avoiding an unnecessary increase in system load caused by repeatedly sending transmission requests in a short period of time. Specifically, by setting a plurality of gradually increasing timeout intervals, the first device 100 can give the busy second device 200 more processing time and / or the controller area network bus B more noise rejection time, thereby increasing the probability that the first device 100 will interact with the second device 200 for data (or signals), and furthermore, effectively improving the stability of the controller area network bus communication system 10.

[0042] Figure 4 is a flowchart of a retransmission control method according to one embodiment of the present invention, which can be implemented by the controller area network bus communication system 10 of Figure 1. Referring to Figures 1 and 4 together, in step S401, a preset number of transmissions and a retransmission strategy are set via the first device 100, and the retransmission strategy includes a plurality of transmission counts and a plurality of timeout intervals corresponding to each of these transmission counts, and these timeout intervals are all different. In step S402, a transmission request is sent to the second device 200 via the first device 100.

[0043] In step S403, based on the retransmission strategy, it is determined via the first device 100 whether a reply corresponding to the transmission request has been received within the current timeout interval corresponding to the current number of transmissions. In step S404, in response to not receiving a reply within the current timeout interval, it is determined via the first device 100 whether the current number of transmissions is less than the preset number. In step S405, in response to the current number of transmissions being less than the preset number, the transmission request is retransmitted to the second device 200 via the first device 100. Details of the implementation of steps S401 to S405 have already been explained in detail in the embodiments described above and will not be repeated here.

[0044] As described above, the embodiments of the present invention allow for the setting of multiple gradually increasing timeout intervals, which not only avoids increasing the system load by sending transmission requests multiple times in a short period of time, but also allows for more processing time for busy slave devices and / or more noise rejection time for the controller area network bus. This increases the probability that a master device will interact with a slave device for data (or signals), and furthermore, effectively improves the stability of the controller area network bus communication system.

[0045] Although the present invention has been disclosed by the embodiments described above, these are not intended to limit the invention, and any person with ordinary skill in the art may make some changes and modifications without departing from the spirit and scope of the invention; therefore, the scope of protection of the present invention is defined by the appended claims. [Industrial applicability]

[0046] The controller area network bus communication system and retransmission control method of the present invention are applicable to controller area network bus technology. [Explanation of Symbols]

[0047] 10. Controller Area Network Bus Communication System 100 First device 200 Second device B Controller Area Network Bus T0, T0+M, T0+1.5M, T0+2M, T1, T1+A, T1+T, T2, T2+A, T2+T, T3, T3+B, T3+T, T4, T4+C, T4+T, T5, T5+D, T5+T, T6, T6+E, T6+T, T7, T7+A, T7+T

Claims

1. First device and A second device connected to the first device via a controller area network bus, The first device includes a preset number of transmissions and a retransmission strategy, the retransmission strategy includes a plurality of transmission counts and a plurality of timeout intervals corresponding to each of the plurality of transmission counts, and the plurality of timeout intervals are all different. The first device sends a transmission request to the second device. The first device determines, based on the retransmission strategy, whether it has received a reply corresponding to the transmission request within the current timeout interval corresponding to the current number of transmissions, In response to not receiving the reply within the current timeout interval, the first device determines whether the current number of transmissions is less than the preset number. A controller area network bus communication system in which, in response to the current number of transmissions being less than the preset number of transmissions, the first device retransmits the transmission request to the second device.

2. The controller area network bus communication system according to claim 1, wherein the first device does not transmit the transmission request to the second device in response to the current number of transmissions reaching the preset number.

3. The controller area network bus communication system according to claim 1, wherein the plurality of timeout intervals are related to a message handshake interval, and the message handshake interval is used to represent the time for data interaction between the first device and the second device.

4. The controller area network bus communication system according to claim 1, wherein the length of each timeout interval is positively correlated with the magnitude of the corresponding number of transmissions.

5. A retransmission control method for use in a controller area network bus communication system, wherein the controller area network bus communication system includes a first device and a second device, and the second device is connected to the first device via a controller area network bus. The first device sets a preset number of transmissions and a retransmission strategy, the retransmission strategy includes a plurality of transmission counts and a plurality of timeout intervals corresponding to each of the plurality of transmission counts, and the plurality of timeout intervals are all different. Sending a transmission request to the second device via the first device, The first device determines, based on the retransmission strategy, whether a reply corresponding to the transmission request has been received within the current timeout interval corresponding to the current number of transmissions, In response to the fact that the reply was not received within the current timeout interval, the first device determines whether the current number of transmissions is less than the preset number, In response to the current number of transmissions being less than the preset number of transmissions, the transmission request is retransmitted to the second device via the first device, A retransmission control method including the following.

6. The retransmission control method according to claim 5, further comprising not transmitting the transmission request to the second device via the first device in response to the current number of transmissions reaching the preset number.

7. The retransmission control method according to claim 5, wherein the plurality of timeout intervals are related to a message handshake interval, and the message handshake interval is used to represent the time for data interaction between the first device and the second device.

8. The retransmission control method according to claim 5, wherein the length of each timeout interval is positively correlated with the magnitude of the corresponding number of transmissions.