CN114281744A - CAN bus relay circuit, control method, device and electronic equipment - Google Patents

CAN bus relay circuit, control method, device and electronic equipment Download PDF

Info

Publication number
CN114281744A
CN114281744A CN202111590228.7A CN202111590228A CN114281744A CN 114281744 A CN114281744 A CN 114281744A CN 202111590228 A CN202111590228 A CN 202111590228A CN 114281744 A CN114281744 A CN 114281744A
Authority
CN
China
Prior art keywords
bus
module
unidirectional
repeater
control
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111590228.7A
Other languages
Chinese (zh)
Inventor
李建国
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Topsec Technology Co Ltd
Beijing Topsec Network Security Technology Co Ltd
Beijing Topsec Software Co Ltd
Original Assignee
Beijing Topsec Technology Co Ltd
Beijing Topsec Network Security Technology Co Ltd
Beijing Topsec Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Topsec Technology Co Ltd, Beijing Topsec Network Security Technology Co Ltd, Beijing Topsec Software Co Ltd filed Critical Beijing Topsec Technology Co Ltd
Priority to CN202111590228.7A priority Critical patent/CN114281744A/en
Publication of CN114281744A publication Critical patent/CN114281744A/en
Pending legal-status Critical Current

Links

Images

Abstract

The embodiment of the application provides a CAN bus relay circuit, a control method, a control device and electronic equipment, wherein the CAN bus relay circuit comprises: the system comprises a one-way repeater module and a control module; the first end of the unidirectional repeater module is connected with a first CAN bus, and the second end of the unidirectional repeater module is connected with a second CAN bus; the unidirectional repeater module is used for transmitting the data of the first CAN bus to the second CAN bus in a unidirectional mode according to the signal of the control module; the control module is respectively connected with the unidirectional repeater module and the second CAN bus and is used for controlling the connection state of the first CAN bus and the second CAN bus; the first CAN bus is connected with equipment inside the vehicle, and the second CAN bus is connected with equipment outside the vehicle. By implementing the embodiment, the safety of the vehicle interior equipment can be improved.

Description

CAN bus relay circuit, control method, device and electronic equipment
Technical Field
The application relates to the technical field of CAN buses, in particular to a CAN bus relay circuit, a control method, a control device and electronic equipment.
Background
Although a reliable message passing mechanism based on an acknowledgement field built in a protocol is provided in a Controller Area Network (CAN) bus, the CAN bus lacks a protocol-level message authentication mechanism, that is, any external device accessing the CAN bus CAN send any CAN message to the CAN bus of the system, and not only CAN send Network traffic outside the system to the system, but also CAN send the external Network traffic which may be malicious or not. For example, an external device connected to a vehicle CAN network and a vehicle system internal CAN bus device have the same ability to access the CAN bus, and CAN directly access the vehicle system internal network, and CAN information is received and transmitted on the CAN bus. Any network security hole in the application of the external device controller that affects CAN communication CAN lead to serious consequences, causing a control system of the vehicle to crash and the vehicle to be out of control.
In newly designed vehicle systems, the designer may specify some application-level authentication mechanism, such as a checksum or a Cryptographic Message Authentication Code (CMAC). However, upgrading the authentication mechanism for those conventional vehicles, after-market equipment, or after-conversion, special purpose vehicles, etc. is difficult, sometimes even impossible. Various consumer intelligent vehicle-mounted devices are installed On a vehicle to improve the driving experience, and the devices are mostly connected to a Second-generation vehicle-mounted self-diagnosis system (OBD-II) interface On the vehicle to realize the perception and control of the internal operation condition of the vehicle. The government also sets regulations requiring the addition of wireless tracking devices to long-distance passenger buses and hazardous material transport vehicles to monitor the operation and usage of the vehicles, these devices being connected to the vehicle's OBD-II interface and sometimes even directly to the vehicle's internal CAN bus. The quality and safety of aftermarket on-board equipment cannot be controlled by the automotive manufacturer. The vehicle-mounted intelligent devices are mostly connected to an intelligent vehicle management system through a 4G/5G wireless network and an internet network, so that the vehicle is exposed to greater network security risks.
Disclosure of Invention
An object of the embodiments of the present application is to provide a CAN bus relay circuit, a control method, a device, and an electronic device, which CAN protect an internal CAN bus of a vehicle system.
In a first aspect, an embodiment of the present application provides a CAN bus relay circuit, where the circuit includes: the system comprises a one-way repeater module and a control module;
the first end of the unidirectional repeater module is connected with a first CAN bus, and the second end of the unidirectional repeater module is connected with a second CAN bus; the third section is connected with the control module, and the unidirectional repeater module is used for transmitting the data of the first CAN bus to the second CAN bus in a unidirectional mode according to the signal of the control module;
the control module is connected with the second CAN bus and used for controlling the connection state of the first CAN bus and the second CAN bus;
the first CAN bus is connected with equipment inside the vehicle, and the second CAN bus is connected with equipment outside the vehicle.
In the implementation process, the one-way repeater module CAN enable the data of the first CAN bus to be transmitted to the second CAN bus in a one-way mode according to the signal of the control module, therefore, the external equipment cannot transmit the data to the equipment inside the vehicle through the second CAN bus, and the protection of the equipment inside the vehicle is achieved. The control module controls the connection state of the first CAN bus and the second CAN bus, and the safety of the vehicle internal equipment CAN be further improved.
Further, the one-way repeater module includes: the system comprises a first CAN interface, a one-way repeater and a second CAN interface;
the one-way repeater is connected between the first end of the first CAN interface and the first end of the second CAN interface;
the second end of the first CAN interface is connected with the first CAN bus;
the second end of the second CAN interface is connected with the second CAN bus;
the one-way repeater is connected with the control module.
In the implementation process, the one-way repeater enables data on the first CAN bus to be transmitted to the second CAN bus, and data on the second CAN bus cannot be transmitted to the first CAN bus. The protection of the equipment inside the vehicle is realized.
Further, the control module includes:
the response module is connected with the second CAN bus;
the response module is used for sending confirmation information to the equipment connected to the second CAN bus.
In the implementation process, the device connected to the second CAN Bus may send the CAN message to the second CAN Bus, and since the unidirectional repeater module is isolated and operates in the physical layer of the CAN Bus, and no device on the second CAN Bus responds to the CAN message on the second CAN Bus, the device will continuously retransmit the CAN message on the second CAN Bus and accumulate errors, so that the external CAN Bus device finally enters an Error-Passive state or a Bus-Off state. The response module sends confirmation information to the equipment connected on the second CAN bus, so that the problem is avoided.
Further, the control module further comprises:
the monitoring module is connected with the one-way repeater module and the second CAN bus;
the monitoring module is used for acquiring error information on the second CAN bus, sending a control signal to the one-way repeater module according to the error information and disconnecting the first CAN bus from the second CAN bus.
In the implementation process, a monitoring module is arranged and used for acquiring error information on the second CAN bus, sending a control signal to the one-way repeater module according to the error information and disconnecting the first CAN bus from the second CAN bus. Based on the above embodiment, the connection between the first CAN bus and the second CAN bus CAN be monitored, and the communication safety is further ensured.
Further, the one-way repeater includes a first CAN transceiver and a second CAN transceiver connected to each other;
the control module comprises a third CAN transceiver and a CAN control chip which are connected with each other;
the first CAN transceiver is connected with the first CAN bus;
the second CAN transceiver is connected with the second CAN bus;
the CAN control chip is connected with the second CAN transceiver.
In the implementation process, the first CAN transceiver and the second CAN transceiver are respectively connected with the first CAN bus and the second CAN bus, and the CAN control chip is connected with the second CAN transceiver and the third CAN transceiver to realize the unidirectional transmission of data on the first CAN bus to the second CAN bus.
In a second aspect, an embodiment of the present application provides a CAN bus control method, which is applied to a control module, and the method includes:
acquiring the transmission state of a second CAN bus; the second CAN bus is connected with the second end of the unidirectional repeater module, the first end of the unidirectional repeater module is connected with the first CAN bus, and the third end of the unidirectional repeater module is connected with the control module; the unidirectional repeater module is used for transmitting the data of the first CAN bus to the second CAN bus in a unidirectional mode according to the signal of the control module, and the control module is connected with the second CAN bus;
and controlling the connection state of the first CAN bus and the second CAN bus connected with the unidirectional repeater module according to the transmission state of the second CAN bus.
In the implementation process, the one-way repeater module CAN realize one-way transmission of data of the first CAN bus to the second CAN bus, so that external equipment cannot transmit the data to equipment inside the vehicle through the second CAN bus, and the protection of the equipment inside the vehicle is realized. The control module controls the connection state of the first CAN bus and the second CAN bus, and the safety of the vehicle internal equipment CAN be further improved.
Further, the step of acquiring the transmission state of the second CAN bus includes:
acquiring error information of the second CAN bus;
recording the occurrence times of the error information;
the step of controlling the connection state of the first CAN bus and the second CAN bus connected to the unidirectional repeater module according to the transmission state of the second CAN bus comprises the following steps:
and if the number of times of the error information is greater than a preset threshold value, sending a control signal to the one-way repeater module so as to disconnect the first CAN bus and the second CAN bus.
Further, after the step of acquiring the transmission status of the second CAN bus, the method further includes:
and sending response confirmation information to equipment connected to the second CAN bus according to the data on the second CAN bus.
In a third aspect, an embodiment of the present application provides a CAN bus control apparatus, including:
the acquisition module is used for acquiring the transmission state of the second CAN bus; the second CAN bus is connected with the second end of the unidirectional repeater module, the first end of the unidirectional repeater module is connected with the first CAN bus, and the third end of the unidirectional repeater module is connected with the control module; the unidirectional repeater module is used for transmitting the data of the first CAN bus to the second CAN bus in a unidirectional mode according to the signal of the control module, and the control module is connected with the second CAN bus;
and the connection state control module is used for controlling the connection state of the first CAN bus and the second CAN bus which are connected with the unidirectional repeater module according to the transmission state of the second CAN bus.
In the implementation process, the one-way repeater module CAN realize one-way transmission of data of the first CAN bus to the second CAN bus, so that external equipment cannot transmit the data to equipment inside the vehicle through the second CAN bus, and the protection of the equipment inside the vehicle is realized. The control module controls the connection state of the first CAN bus and the second CAN bus, and the safety of the vehicle internal equipment CAN be further improved.
In a fourth aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method according to any of the second aspect when executing the computer program.
Additional features and advantages of the disclosure will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the above-described techniques.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a structural composition diagram of a CAN bus relay circuit provided in an embodiment of the present application;
fig. 2 is a schematic view of another structural component of the CAN bus relay circuit provided in the embodiment of the present application;
fig. 3 is a circuit configuration diagram of a unidirectional relay module according to an embodiment of the present application;
fig. 4 is a circuit structure diagram of a control module according to an embodiment of the present disclosure;
fig. 5 is a schematic flowchart of a CAN bus control method provided in the embodiment of the present application;
fig. 6 is a schematic diagram of an internal component of a CAN bus control device according to an embodiment of the present disclosure;
fig. 7 is a schematic diagram of an internal component of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
Example 1
Referring to fig. 1, an embodiment of the present application provides a CAN bus relay circuit, including: a one-way repeater module 1 and a control module 2;
the first end of the unidirectional repeater module 1 is connected with a first CAN bus, and the second end of the unidirectional repeater module is connected with a second CAN bus; the unidirectional repeater module 1 is used for transmitting the data of the first CAN bus to the second CAN bus in a unidirectional mode according to the signal of the control module 2;
the control module 2 is respectively connected with the unidirectional repeater module 1 and the second CAN bus and is used for controlling the connection state of the first CAN bus and the second CAN bus;
the first CAN bus is connected with equipment inside the vehicle, and the second CAN bus is connected with equipment outside the vehicle.
In the implementation process, the unidirectional repeater module 1 CAN realize unidirectional transmission of data of the first CAN bus to the second CAN bus, so that external equipment cannot transmit the data to equipment inside the vehicle through the second CAN bus, and the protection of the equipment inside the vehicle is realized. The control module 2 controls the connection state of the first CAN bus and the second CAN bus, and the safety of the vehicle internal equipment CAN be further improved.
Referring to fig. 2, the unidirectional repeater module 1 includes: a first CAN interface 12, a one-way repeater 11 and a second CAN interface 13;
the one-way repeater 11 is connected between a first end of the first CAN interface 12 and a first end of the second CAN interface 13;
the second end of the first CAN interface 12 is connected to a first CAN bus;
the second end of the second CAN interface 13 is connected to a second CAN bus;
the unidirectional repeater 11 is connected to the control module 2.
In the above implementation process, the unidirectional repeater 11 enables data on the first CAN bus to be transmitted to the second CAN bus, and data on the second CAN bus cannot be transmitted to the first CAN bus. The protection of the equipment inside the vehicle is realized.
In a possible embodiment, the control module 2 comprises:
the response module 21 is connected with the second CAN bus;
the response module 21 is used to send acknowledgement information to the devices connected to the second CAN bus.
In the implementation process, the device connected to the second CAN Bus may send the CAN message to the second CAN Bus, and since the unidirectional repeater module 1 is isolated and the unidirectional repeater module 1 operates on the physical layer of the CAN Bus, and no device on the second CAN Bus responds to the CAN message on the second CAN Bus, the device will continuously retransmit the CAN message on the second CAN Bus and accumulate errors, so that the external CAN Bus device finally enters into an Error-Passive state or a Bus-Off state. The response module 21 sends an acknowledgement message to the device connected to the second CAN bus, avoiding the above-mentioned problems.
In a possible embodiment, the control module 2 further comprises:
the monitoring module 22 is connected with the unidirectional repeater module 1 and the second CAN bus through the monitoring module 22;
the monitoring module 22 is configured to acquire error information on the second CAN bus, send a control signal to the unidirectional repeater module 1 according to the error information, and disconnect the first CAN bus and the second CAN bus.
In one possible embodiment, the monitoring module is connected to the second CAN bus via a third CAN interface 23.
In the implementation process, the nodes on the first CAN bus and the second CAN bus are required to monitor the buses by using the non-destructive media access control working mode used by the first CAN bus and the second CAN bus. The unidirectional repeater module 1 isolates the first and second CAN-buses. The devices connected to the first CAB bus and the devices connected to the second CAN bus will each monitor the status of the bus and when the bus is found to be idle, CAN send CAN messages to the CAN bus. There is a case where a device on the second CAN bus starts sending CAN messages when it detects that the second CAN bus is free, and at the same time, a device on the first CAN bus also starts sending CAN messages when it detects that the first CAN bus is free and sends them to the second CAN bus through the one-way repeater 11, causing a collision of messages on the second CAN bus. A device on the second CAN bus will initiate an error detection procedure and will attempt to send a CAN message during the second CAN bus idle period. During heavy loading of the first CAN-Bus, the above process may be repeated a sufficient number of times, eventually causing the CAN devices on the second CAN-Bus to accumulate sufficient transmission Error counts to enter the Error-Passive state or the Bus-Off state. Therefore, on the basis of the above embodiment, the monitoring module 22 is provided, and the monitoring module 22 is configured to acquire the error information on the second CAN bus, send a control signal to the unidirectional repeater module 1 according to the error information, and disconnect the first CAN bus and the second CAN bus. According to the above embodiment, the above problem can be avoided.
Referring to fig. 3, 4, in one possible embodiment, the unidirectional repeater 11 comprises a first CAN transceiver and a second CAN transceiver connected to each other;
the control module 2 comprises a third CAN transceiver and a CAN control chip which are connected with each other;
the first CAN transceiver is connected with a first CAN bus;
the second CAN transceiver is connected with a second CAN bus;
the CAN control chip is connected with the second CAN transceiver.
It should be noted that the module formed by the third CAN transceiver and the CAN control chip includes the monitoring module 22 and the response module 21.
In the implementation process, the first CAN transceiver and the second CAN transceiver are respectively connected with the first CAN bus and the second CAN bus, and the CAN control chip is connected with the second CAN transceiver and the third CAN transceiver to realize the unidirectional transmission of data on the first CAN bus to the second CAN bus.
Exemplarily, referring to fig. 3, the CAN interface of the first CAN transceiver may be connected with the first CAN bus as the first CAN interface 12 of the unidirectional repeater module 1. The CAN interface of the second CAN transceiver CAN be used as the second CAN interface 13 of the unidirectional repeater module 1 and is connected with the second CAN bus.
Configuring the first CAN receiver in a silent state: the level of the SilentEnable pin is high, and the TXD pin is suspended. At the moment, the first CAN receiver has CAN differential signal receiving capacity, and the received CAN message is output to an RXD pin; CAN messages cannot be sent onto the first CAN bus. The silentEnable pin of the second CAN transceiver is controlled by the control module 2, and the control module 2 CAN enable the second CAN transceiver to be in a normal working state or a silent state by controlling the level state of the silentEnable, and the RXD pin is suspended. The second CAN transceiver in a silent state CAN output CAN messages on the TXD pin onto the second CAN bus; CAN messages received from the second CAN bus cannot be output on the RXD pin. The RXD pin of the first CAN transceiver is connected with the TXD pin of the second CAN transceiver. The SilentEnable signal line is connected to the control line of the control module 2. The CAN interface of the third CAN transceiver serves as the third CAN interface 23 of the control module 2. The third CAN transceiver is in a normal working state: the Silent signal of the third CAN transceiver is grounded. And a TXD pin and an RXD pin of the third CAN transceiver are respectively connected with a CAN-RXD pin and a CAN-TXD pin of the CAN controller chip. The Control line Control of the CAN controller chip is connected to the SilentEnable signal line of the unidirectional repeater 11.
Example 2
Referring to fig. 5, an embodiment of the present application provides a CAN bus control method applied to a control module, where the method includes:
s1: acquiring the transmission state of a second CAN bus; the second CAN bus is connected with the second end of the unidirectional repeater module, the first end of the unidirectional repeater module is connected with the first CAN bus, and the third end of the unidirectional repeater module is connected with the control module; the unidirectional repeater module is used for transmitting the data of the first CAN bus to the second CAN bus in a unidirectional mode according to the signal of the control module;
s2: and controlling the connection state of the first CAN bus and the second CAN bus connected with the unidirectional repeater module according to the transmission state of the second CAN bus.
In the implementation process, the one-way repeater module CAN realize one-way transmission of data of the first CAN bus to the second CAN bus, so that external equipment cannot transmit the data to equipment inside the vehicle through the second CAN bus, and the protection of the equipment inside the vehicle is realized. The control module controls the connection state of the first CAN bus and the second CAN bus, and the safety of the vehicle internal equipment CAN be further improved.
In one possible embodiment, S1 includes the following sub-steps: acquiring error information of a second CAN bus; recording the occurrence frequency of error information; s2 includes the following substeps: and if the number of times of error information is greater than a preset threshold value, sending a control signal to the one-way repeater module so as to disconnect the first CAN bus and the second CAN bus.
Further, the method further comprises:
acquiring data on a second CAN bus;
after the step of acquiring the transmission state of the second CAN bus, the method further includes:
and sending response confirmation information to the equipment connected to the second CAN bus according to the data on the second CAN bus.
Based on the structural configuration of the control module 2 provided in embodiment 1, it is considered that the CAN control chip in the control module is a digital signal processing chip, and is connected to the CAN transceiver through the digital serial signal line, and in order to correctly transmit and receive information through the digital serial signal line, the baud rate of the digital serial signal processing portion needs to be set. In the above embodiment, the CAN control chip needs to receive and send information from the second CAN bus, and the second CAN bus may be connected to CAN devices with different baud rates, so that the application provides a method for obtaining the baud rate of the CAN bus, so that the control module CAN operate correctly; the method for the CAN controller to obtain the Baud rate of the CAN bus is completed in a passive monitoring mode, and the operation of the CAN bus is not influenced; (3) the whole device is zero-configured and can be used for various application scenes. The method comprises the following steps:
bitrate is obtained from EEPROM, and stockbitrate is set to CurrentBitrate. The bite default value stored in the EEPROM is 25000 or the bite obtained last time; (2) initializing a CAN controller by using CurrentBitrate; (3) resetting an error counter of the controller; (4) starting a timer; (5) polling whether a received CAN information frame exists; (6) if the CAN information frame is successfully received, and the CurrentBitrate! Writing CurrentBitrate into EEPROM and ending the program; (7) if the CAN information frame is not successfully received, polling an error counter of the CAN; (8) if the error counter is increased, selecting the next selectable value from the Bitrate table as a CurrentBitrate value, and jumping to (2); (9) if the timer is overtime, selecting the next selectable value from the Bitrate table as a CurrentBitrate value, and executing jump to (2); (10) and if the timer is not over time, jumping to (5). The value of the bitate table is {250000, 500000, 1250000, 66666666, 100000}, set according to the usual CAN bus rate, in order to find the appropriate bitate as soon as possible. In the above embodiment, toredbatte and cureentbatte are two temporary variables used when a program runs, and an EEPROM has a bitate table which stores baud values allowed by the CAN bus standard; the Baud value Birate of the CAN bus obtained in the last operation is also stored in the EEPROM.
The embodiment of the present application further provides a bus control method based on the CAN control chip, including:
(1) clearing an error counter of the CAN controller; (2) starting a timer; (3) a polling error counter; (4) checking whether the value of the error counter exceeds a threshold value, and if so: setting the SilentEnable signal to be at a high level, so that a CAN transceiver of the unidirectional repeater module is in a silent state, at the moment, information on the first CAN bus cannot be sent to the second CAN bus, and starting a timer; waiting for the timer to time out; setting the SilentEnable signal to be low level, so that a CAN transceiver of the unidirectional repeater module is in a working state; skipping to the step (1); (5) if the timer is not overtime, executing the step (3); otherwise, executing step (1).
Example 3
Referring to fig. 6, an embodiment of the present application provides a CAN bus control device, including:
the acquisition module 3 is used for acquiring the transmission state of the second CAN bus; the second CAN bus is connected with the second end of the unidirectional repeater module 1, the first end of the unidirectional repeater module 1 is connected with the first CAN bus, and the third end of the unidirectional repeater module 1 is connected with the control module 2; the unidirectional repeater module 1 is used for transmitting the data of the first CAN bus to the second CAN bus in a unidirectional mode according to the signal of the control module 2, and the control module 2 is connected with the second CAN bus;
and the connection state control module 4 is used for controlling the connection state of the first CAN bus and the second CAN bus connected to the unidirectional repeater module 1 according to the transmission state of the second CAN bus.
In a possible embodiment, the connection state control module 4 comprises:
an error information acquisition unit for acquiring error information of the second CAN bus;
a recording unit for recording the number of times of occurrence of error information;
and the control unit is used for sending a control signal to the one-way repeater module 1 when the occurrence frequency of the error information is greater than a preset threshold value so as to disconnect the first CAN bus and the second CAN bus.
In a possible embodiment, the obtaining module 3 is further configured to send a response confirmation message to a device connected to the second CAN bus according to data on the second CAN bus.
Example 4
Fig. 7 shows a block diagram of an electronic device according to an embodiment of the present disclosure, where fig. 7 is a block diagram of the electronic device. The electronic device may include a processor 71, a communication interface 72, a memory 73, and at least one communication bus 74. Wherein the communication bus 74 is used to enable direct connection communication of these components. In the embodiment of the present application, the communication interface 72 of the electronic device is used for performing signaling or data communication with other node devices. The processor 71 may be an integrated circuit chip having signal processing capabilities.
The Processor 71 may be a general-purpose Processor including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor 71 may be any conventional processor or the like.
The Memory 73 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The memory 73 stores computer readable instructions which, when executed by the processor 71, enable the electronic device to perform the various steps involved in the above-described method embodiments.
Optionally, the electronic device may further include a memory controller, an input output unit.
The memory 73, the memory controller, the processor 71, the peripheral interface, and the input/output unit are electrically connected to each other directly or indirectly to implement data transmission or interaction. For example, these components may be electrically connected to each other via one or more communication buses 74. The processor 71 is adapted to execute executable modules stored in the memory 73, such as software functional modules or computer programs comprised by the electronic device.
The input and output unit is used for providing a task for a user to create and start an optional time period or preset execution time for the task creation so as to realize the interaction between the user and the server. The input/output unit may be, but is not limited to, a mouse, a keyboard, and the like.
It will be appreciated that the configuration shown in fig. 7 is merely illustrative and that the electronic device may include more or fewer components than shown in fig. 7 or have a different configuration than shown in fig. 7. The components shown in fig. 7 may be implemented in hardware, software, or a combination thereof.
The embodiment of the present application further provides a storage medium, where the storage medium stores instructions, and when the instructions are run on a computer, when the computer program is executed by a processor, the method in the method embodiment is implemented, and in order to avoid repetition, details are not repeated here.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. A CAN bus repeater circuit, comprising: the system comprises a one-way repeater module and a control module;
the first end of the unidirectional repeater module is connected with a first CAN bus, and the second end of the unidirectional repeater module is connected with a second CAN bus; the third section is connected with the control module, and the unidirectional repeater module is used for transmitting the data of the first CAN bus to the second CAN bus in a unidirectional mode according to the signal of the control module;
the control module is connected with the second CAN bus and used for controlling the connection state of the first CAN bus and the second CAN bus;
the first CAN bus is connected with equipment inside the vehicle, and the second CAN bus is connected with equipment outside the vehicle.
2. The CAN bus repeater circuit of claim 1, wherein the unidirectional repeater module comprises: the system comprises a first CAN interface, a one-way repeater and a second CAN interface;
the one-way repeater is connected between the first end of the first CAN interface and the first end of the second CAN interface;
the second end of the first CAN interface is connected with the first CAN bus;
the second end of the second CAN interface is connected with the second CAN bus;
the one-way repeater is connected with the control module.
3. The CAN bus relay circuit of claim 1, wherein the control module comprises:
the response module is connected with the second CAN bus;
the response module is used for sending confirmation information to the equipment connected to the second CAN bus.
4. The CAN bus relay circuit of claim 1, wherein the control module further comprises:
the monitoring module is connected with the one-way repeater module and the second CAN bus;
the monitoring module is used for acquiring error information on the second CAN bus, sending a control signal to the one-way repeater module according to the error information and disconnecting the first CAN bus from the second CAN bus.
5. The CAN bus repeater circuit of claim 1 wherein the unidirectional repeater includes a first CAN transceiver and a second CAN transceiver connected to each other;
the control module comprises a third CAN transceiver and a CAN control chip which are connected with each other;
the first CAN transceiver is connected with the first CAN bus;
the second CAN transceiver is connected with the second CAN bus;
the CAN control chip is connected with the second CAN transceiver.
6. A CAN bus control method is applied to a control module and is characterized by comprising the following steps:
acquiring the transmission state of a second CAN bus; the second CAN bus is connected with the second end of the unidirectional repeater module, the first end of the unidirectional repeater module is connected with the first CAN bus, and the third end of the unidirectional repeater module is connected with the control module; the unidirectional repeater module is used for transmitting the data of the first CAN bus to the second CAN bus in a unidirectional mode according to the signal of the control module, and the control module is connected with the second CAN bus;
and controlling the connection state of the first CAN bus and the second CAN bus connected with the unidirectional repeater module according to the transmission state of the second CAN bus.
7. The CAN-bus control method of claim 6, wherein the step of obtaining the transmission status of the second CAN-bus comprises:
acquiring error information of the second CAN bus;
recording the occurrence times of the error information;
the step of controlling the connection state of the first CAN bus and the second CAN bus connected to the unidirectional repeater module according to the transmission state of the second CAN bus comprises the following steps:
and if the number of times of the error information is greater than a preset threshold value, sending a control signal to the one-way repeater module so as to disconnect the first CAN bus and the second CAN bus.
8. The CAN-bus control method of claim 6, further comprising, after the step of obtaining the transmission status of the second CAN-bus:
and sending response confirmation information to equipment connected to the second CAN bus according to the data on the second CAN bus.
9. A CAN bus control apparatus, comprising:
the acquisition module is used for acquiring the transmission state of the second CAN bus; the second CAN bus is connected with the second end of the unidirectional repeater module, the first end of the unidirectional repeater module is connected with the first CAN bus, and the third end of the unidirectional repeater module is connected with the control module; the unidirectional repeater module is used for transmitting the data of the first CAN bus to the second CAN bus in a unidirectional mode according to the signal of the control module, and the control module is connected with the second CAN bus;
and the connection state control module is used for controlling the connection state of the first CAN bus and the second CAN bus which are connected with the unidirectional repeater module according to the transmission state of the second CAN bus.
10. An electronic device, comprising: memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the CAN-bus control method according to any of claims 6-8 when executing the computer program.
CN202111590228.7A 2021-12-23 2021-12-23 CAN bus relay circuit, control method, device and electronic equipment Pending CN114281744A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111590228.7A CN114281744A (en) 2021-12-23 2021-12-23 CAN bus relay circuit, control method, device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111590228.7A CN114281744A (en) 2021-12-23 2021-12-23 CAN bus relay circuit, control method, device and electronic equipment

Publications (1)

Publication Number Publication Date
CN114281744A true CN114281744A (en) 2022-04-05

Family

ID=80874469

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111590228.7A Pending CN114281744A (en) 2021-12-23 2021-12-23 CAN bus relay circuit, control method, device and electronic equipment

Country Status (1)

Country Link
CN (1) CN114281744A (en)

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008244719A (en) * 2007-03-27 2008-10-09 Auto Network Gijutsu Kenkyusho:Kk Relay connection unit for vehicle
CN102801594A (en) * 2012-07-09 2012-11-28 宁波长壁流体动力科技有限公司 CAN (Controller Area Network) bus repeater of electro-hydraulic control system of coal mine hydraulic bracket
CN105083169A (en) * 2015-07-25 2015-11-25 上海修源网络科技有限公司 Communication frame of electric automobile controller and electric automobile controller
JP2016020185A (en) * 2014-07-15 2016-02-04 株式会社デンソー Transmission line abnormality detector
JP2016037211A (en) * 2014-08-08 2016-03-22 本田技研工業株式会社 Vehicular diagnostic system
CN105553946A (en) * 2015-12-08 2016-05-04 严威 Vehicle-mounted system based on CAN bus firewall and control method thereof
CN105843206A (en) * 2016-01-07 2016-08-10 乐卡汽车智能科技(北京)有限公司 Vehicle bus security monitoring method, device and system
CN106774231A (en) * 2015-11-20 2017-05-31 上海汽车集团股份有限公司 CAN control device
WO2017129873A1 (en) * 2016-01-28 2017-08-03 Renault S.A.S Gateway device for an on-board communication system of a motor vehicle
US20190036732A1 (en) * 2017-07-27 2019-01-31 X Development Llc Asymmetric CAN-based Communication for Aerial Vehicles
CN109644189A (en) * 2016-08-23 2019-04-16 C2A安全有限公司 Data/address bus protects device and method
CN109644210A (en) * 2016-09-02 2019-04-16 株式会社自动网络技术研究所 Communication system, communication device, relay, communication IC(integrated circuit), control IC and communication means
CN110166557A (en) * 2019-05-23 2019-08-23 浙江吉利控股集团有限公司 Car networking data processing equipment, vehicle termination and storage medium
US20200076542A1 (en) * 2018-09-04 2020-03-05 Hyundai Motor Company Vehicle and method for controlling the same
CN111344192A (en) * 2017-08-17 2020-06-26 雷德本德有限公司 System and method for disabling a malicious ECU in a Controller Area Network (CAN) bus
CN111443623A (en) * 2018-12-29 2020-07-24 北京奇虎科技有限公司 Safety protection device and method based on vehicle CAN bus structure

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008244719A (en) * 2007-03-27 2008-10-09 Auto Network Gijutsu Kenkyusho:Kk Relay connection unit for vehicle
CN102801594A (en) * 2012-07-09 2012-11-28 宁波长壁流体动力科技有限公司 CAN (Controller Area Network) bus repeater of electro-hydraulic control system of coal mine hydraulic bracket
JP2016020185A (en) * 2014-07-15 2016-02-04 株式会社デンソー Transmission line abnormality detector
JP2016037211A (en) * 2014-08-08 2016-03-22 本田技研工業株式会社 Vehicular diagnostic system
CN105083169A (en) * 2015-07-25 2015-11-25 上海修源网络科技有限公司 Communication frame of electric automobile controller and electric automobile controller
CN106774231A (en) * 2015-11-20 2017-05-31 上海汽车集团股份有限公司 CAN control device
CN105553946A (en) * 2015-12-08 2016-05-04 严威 Vehicle-mounted system based on CAN bus firewall and control method thereof
CN105843206A (en) * 2016-01-07 2016-08-10 乐卡汽车智能科技(北京)有限公司 Vehicle bus security monitoring method, device and system
WO2017129873A1 (en) * 2016-01-28 2017-08-03 Renault S.A.S Gateway device for an on-board communication system of a motor vehicle
CN109644189A (en) * 2016-08-23 2019-04-16 C2A安全有限公司 Data/address bus protects device and method
CN109644210A (en) * 2016-09-02 2019-04-16 株式会社自动网络技术研究所 Communication system, communication device, relay, communication IC(integrated circuit), control IC and communication means
US20190036732A1 (en) * 2017-07-27 2019-01-31 X Development Llc Asymmetric CAN-based Communication for Aerial Vehicles
CN111344192A (en) * 2017-08-17 2020-06-26 雷德本德有限公司 System and method for disabling a malicious ECU in a Controller Area Network (CAN) bus
US20200076542A1 (en) * 2018-09-04 2020-03-05 Hyundai Motor Company Vehicle and method for controlling the same
CN111443623A (en) * 2018-12-29 2020-07-24 北京奇虎科技有限公司 Safety protection device and method based on vehicle CAN bus structure
CN110166557A (en) * 2019-05-23 2019-08-23 浙江吉利控股集团有限公司 Car networking data processing equipment, vehicle termination and storage medium

Similar Documents

Publication Publication Date Title
US11411681B2 (en) In-vehicle information processing for unauthorized data
CN108028784B (en) Abnormality detection method, monitoring electronic control unit, and vehicle-mounted network system
US10951631B2 (en) In-vehicle network system, fraud-detection electronic control unit, and fraud-detection method
CN111934966B (en) Abnormality detection electronic control unit, vehicle-mounted network system, and abnormality detection method
US10462226B2 (en) Method for detecting fraudulent frame sent over an in-vehicle network system
CN106031098B (en) Abnormal frame coping method, abnormal detection electronic control unit and vehicle-mounted network system
CN107113214B (en) Abnormality detection electronic control unit, vehicle-mounted network system, and communication method
US10902109B2 (en) Misuse detection method, misuse detection electronic control unit, and misuse detection system
JP6807906B2 (en) Systems and methods to generate rules to prevent computer attacks on vehicles
KR102030397B1 (en) Network monitoring device
US11036853B2 (en) System and method for preventing malicious CAN bus attacks
KR20180021287A (en) Appratus and method for detecting vehicle intrusion
US20200183373A1 (en) Method for detecting anomalies in controller area network of vehicle and apparatus for the same
CN112347021B (en) Security module for serial communication device
US20200014758A1 (en) On-board communication device, computer program, and message determination method
US11841942B2 (en) Anomaly detection device and anomaly detection method
CN112261026B (en) Abnormality detection method, abnormality detection electronic control unit, and abnormality detection system
US11394726B2 (en) Method and apparatus for transmitting a message sequence over a data bus and method and apparatus for detecting an attack on a message sequence thus transmitted
Stachowski et al. An assessment method for automotive intrusion detection system performance
JP7392586B2 (en) Log sending control device
CN114281744A (en) CAN bus relay circuit, control method, device and electronic equipment
JP6913869B2 (en) Surveillance equipment, surveillance systems and computer programs
US11902300B2 (en) Method for monitoring a data transmission system, data transmission system and motor vehicle
CN114237995A (en) Bus abnormality detection method, device, equipment and readable storage medium
WO2021241415A1 (en) Anomaly detection system and anomaly detection method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination