CN109240260B - Remote fault diagnosis method based on bus automatic switching and free configuration protocol - Google Patents

Remote fault diagnosis method based on bus automatic switching and free configuration protocol Download PDF

Info

Publication number
CN109240260B
CN109240260B CN201810947285.8A CN201810947285A CN109240260B CN 109240260 B CN109240260 B CN 109240260B CN 201810947285 A CN201810947285 A CN 201810947285A CN 109240260 B CN109240260 B CN 109240260B
Authority
CN
China
Prior art keywords
middleware
configuration
instruction
diagnosis
box
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.)
Active
Application number
CN201810947285.8A
Other languages
Chinese (zh)
Other versions
CN109240260A (en
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.)
Guangzhou Ruixiude Information Technology Co ltd
Original Assignee
Guangzhou Ruixiude Information Technology 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 Guangzhou Ruixiude Information Technology Co ltd filed Critical Guangzhou Ruixiude Information Technology Co ltd
Priority to CN201810947285.8A priority Critical patent/CN109240260B/en
Publication of CN109240260A publication Critical patent/CN109240260A/en
Application granted granted Critical
Publication of CN109240260B publication Critical patent/CN109240260B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B23/00Testing or monitoring of control systems or parts thereof
    • G05B23/02Electric testing or monitoring
    • G05B23/0205Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
    • G05B23/0218Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterised by the fault detection method dealing with either existing or incipient faults

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Maintenance And Management Of Digital Transmission (AREA)

Abstract

The invention discloses a remote fault diagnosis method based on bus automatic switching and free configuration protocol, which comprises the following steps: the application terminal calls a corresponding middleware according to the CAN bus mode of the current diagnosis; the middleware calls a vehicle basic information acquisition interface, acquires a corresponding instruction from a configuration library and sends the instruction to the diagnosis box in a TCP communication mode; the diagnosis box forwards the instruction to the ECU so that the ECU returns a CANECU data packet and an instruction execution state to the diagnosis box after executing corresponding diagnosis processing according to the instruction; the diagnosis box forwards the CANECU data packet and the instruction execution state to the middleware; and the middleware analyzes the CANECU data packet through the configuration analysis rule of the configuration library and returns the analysis data and the instruction execution state to the application terminal, so that the application terminal displays the analysis data and the instruction execution state. The invention can realize remote fault diagnosis of various vehicle types by switching between buses.

Description

Remote fault diagnosis method based on bus automatic switching and free configuration protocol
Technical Field
The invention relates to the technical field of vehicle maintenance, in particular to a remote fault diagnosis method based on bus automatic switching and free configuration protocols.
Background
The existing remote diagnosis technology generally needs to know the protocol of communication with the bottom hardware clearly to communicate with the bottom hardware and obtain related information, such as collecting automobile fault codes, and needs to know the specific protocol of related automobile models, which are not willing to be disclosed by manufacturers and relate to technical confidentiality of the manufacturers. Therefore, how to separate the protocol from the software not only realizes remote fault diagnosis, but also can meet the confidentiality requirement of the manufacturer on the protocol, and becomes the current research focus.
Disclosure of Invention
The embodiment of the invention provides a remote fault diagnosis method based on automatic bus switching and free configuration protocols, which can realize remote fault diagnosis of various vehicle types through switching among buses.
To solve the above problem, an embodiment of the present invention provides a remote fault diagnosis method based on bus automatic switching and free configuration protocol, which is suitable for being executed in a computer device, and at least includes the following steps:
the application terminal calls a corresponding middleware according to the CAN bus mode of the current diagnosis;
the middleware calls a vehicle basic information acquisition interface, acquires a corresponding instruction from a configuration library and sends the instruction to a diagnosis box in a TCP communication mode;
the diagnosis box forwards the instruction to the ECU so that the ECU returns a CANECU data packet and an instruction execution state to the diagnosis box after executing corresponding diagnosis processing according to the instruction;
the diagnostic box forwards the CANECU data packet and the instruction execution state to the middleware;
and the middleware analyzes the CANECU data packet according to the configuration analysis rule of the configuration library and returns analysis data and the instruction execution state to the application terminal so that the application terminal displays the analysis data and the instruction execution state.
Further, the middleware analyzes the CANECU packet according to the configuration analysis rule of the configuration library, specifically:
after receiving the CANECU data packet and the instruction execution state, the middleware acquires a configuration analysis rule of vehicle basic information stored in advance from a configuration library through an SQL/data rule, and analyzes the CANECU data packet according to the configuration analysis rule to obtain analysis data.
Further, the command is related to the acquisition of basic information of the vehicle, and comprises a box communication command and a CAN communication command.
Further, it is characterized in that the diagnosis box supports 4-way CAN channels and 2-way K lines, and stores a program for controlling access to the corresponding data channels.
Further, the application terminal is connected with the middleware through a JNI interface, and the middleware is connected with the diagnostic box through a USB/TCP interface.
Further, the middleware calls a vehicle basic information acquisition interface to acquire a corresponding instruction from a configuration library, and specifically comprises:
and the middleware calls a basic information acquisition interface of the vehicle and acquires corresponding instructions from a configuration library through SQL/data rules.
The embodiment of the invention has the following beneficial effects:
the embodiment of the invention provides a remote fault diagnosis method based on bus automatic switching and free configuration protocol, which comprises the following steps: the application terminal calls a corresponding middleware according to the CAN bus mode of the current diagnosis; the middleware calls a vehicle basic information acquisition interface, acquires a corresponding instruction from a configuration library and sends the instruction to a diagnosis box in a TCP communication mode; the diagnosis box forwards the instruction to the ECU so that the ECU returns a CANECU data packet and an instruction execution state to the diagnosis box after executing corresponding diagnosis processing according to the instruction; the diagnostic box forwards the CANECU data packet and the instruction execution state to the middleware; and the middleware analyzes the CANECU data packet according to the configuration analysis rule of the configuration library and returns analysis data and the instruction execution state to the application terminal so that the application terminal displays the analysis data and the instruction execution state. The invention can realize remote fault diagnosis of various vehicle types by switching between buses.
Drawings
Fig. 1 is a schematic flowchart of a remote fault diagnosis method based on bus automatic switching and free configuration protocol according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a remote fault diagnosis method based on bus automatic switching and free configuration protocol according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart diagram of a method of interfacing to an ECU portion provided by an embodiment of the present invention;
fig. 4 is a schematic flow chart of obtaining basic information of a vehicle according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1 and fig. 2, the present embodiment provides a bus automatic switching method suitable for remote fault diagnosis, which is suitable for being executed in a computer device, and at least includes the following steps:
s101, calling a corresponding middleware by an application terminal according to a CAN bus mode of current diagnosis;
s102, calling a basic information acquisition interface of the vehicle by the middleware, acquiring a corresponding instruction from a configuration library, and sending the instruction to a diagnosis box in a TCP (transmission control protocol) communication mode;
s103, the diagnosis box forwards the instruction to the ECU so that the ECU returns a CANECU data packet and an instruction execution state to the diagnosis box after executing corresponding diagnosis processing according to the instruction;
s104, the diagnosis box forwards the CANECU data packet and the instruction execution state to the middleware;
and S105, the middleware analyzes the CANECU data packet according to the configuration analysis rule of the configuration library, and returns analysis data and the instruction execution state to the application terminal, so that the application terminal displays the analysis data and the instruction execution state.
For step S105, the middleware analyzes the CANECU packet according to the configuration analysis rule of the configuration library, specifically:
after receiving the CANECU data packet and the instruction execution state, the middleware acquires a configuration analysis rule of vehicle basic information stored in advance from a configuration library through an SQL/data rule, and analyzes the CANECU data packet according to the configuration analysis rule to obtain analysis data.
Preferably, the command is related to the acquisition of basic information of the vehicle, and comprises a box communication command and a CAN communication command.
Preferably, the diagnostic box supports 4 CAN channels and 2K lines and stores a program for controlling access to the corresponding data channel.
Preferably, the application terminal is connected with the middleware through a JNI interface, and the middleware is connected with the diagnostic box through a USB/TCP interface.
Preferably, the middleware calls a vehicle basic information acquisition interface to acquire a corresponding instruction from a configuration library, specifically:
and the middleware calls a basic information acquisition interface of the vehicle and acquires corresponding instructions from a configuration library through SQL/data rules.
Specifically, as shown in fig. 3, the method connected to the ECU portion includes the following steps: selecting a new diagnostic machine type ECU by the application terminal; the application terminal calls the middleware through the JNI to acquire the communication configuration corresponding to the diagnosis machine type; the middleware acquires corresponding communication configuration from the configuration library through SQL/data rules (wherein the configuration includes a bus connection circuit mode to know that the new diagnosis machine type is a CAN circuit); the middleware sends an instruction to inform the box to connect the CAN data channel based on communication configuration; the diagnostic box returns the state to the middleware after switching channels, and the middleware returns the returned state to the application through the calling of a JNI interface; the application terminal displays the successful connection status.
Specifically, as shown in fig. 3, the method for supporting automatic switching between buses by the hardware part specifically includes the following steps: the application terminal is diagnosing a certain ECU through a K line before; selecting a new diagnostic machine type ECU by the application terminal; the application terminal calls the middleware through the JNI to acquire the communication configuration corresponding to the diagnosis machine type; the middleware acquires corresponding communication configuration from the configuration library through SQL/data rules (wherein the configuration includes a bus connection circuit mode to know that the new diagnosis machine type is a CAN circuit); the middleware sends an instruction to inform the box to connect the CAN data channel based on communication configuration; the diagnostic box returns the state to the middleware after switching the channel, and the middleware returns the returned state to the application terminal through the calling of the JNI interface; the application terminal displays the successful connection status.
It can be understood that, as shown in fig. 4, taking the obtaining of the vehicle basic information as an example, the specific steps of obtaining the vehicle basic information in the embodiment are as follows: the diagnosis bus connection mode is a CAN bus mode; the diagnostic application performs acquisition of vehicle basic information; the application terminal calls the middleware in a JNI mode and calls a vehicle basic information acquisition interface; the middleware acquires the command of the basic information of the vehicle from the configuration library through SQL/data rules; the middleware sends an instruction to the diagnosis box in a TCP communication mode, wherein the instruction comprises a box communication instruction and a CAN communication instruction; the diagnosis box sends a CAN communication instruction to the ECU; after the ECU is processed, returning a CANECU data packet and an instruction execution state to the diagnosis box; the diagnostic box forwards and returns the return data packet and the instruction execution state to the middleware; the middleware analyzes the data packet through the configuration rule of the configuration library and returns data and state to the application through the JNI interface; and the application terminal acquires the data returned by the middleware and displays the data on a display layer of the application terminal.
The embodiment of the invention provides a remote fault diagnosis method based on bus automatic switching and free configuration protocol, which comprises the following steps: the application terminal calls a corresponding middleware according to the CAN bus mode of the current diagnosis; the middleware calls a vehicle basic information acquisition interface, acquires a corresponding instruction from a configuration library and sends the instruction to a diagnosis box in a TCP communication mode; the diagnosis box forwards the instruction to the ECU so that the ECU returns a CANECU data packet and an instruction execution state to the diagnosis box after executing corresponding diagnosis processing according to the instruction; the diagnostic box forwards the CANECU data packet and the instruction execution state to the middleware; and the middleware analyzes the CANECU data packet according to the configuration analysis rule of the configuration library and returns analysis data and the instruction execution state to the application terminal so that the application terminal displays the analysis data and the instruction execution state. The embodiment of the invention can realize remote fault diagnosis of various vehicle types by switching between buses.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.

Claims (6)

1. A remote fault diagnosis method based on bus automatic switching and free configuration protocol is characterized in that an application terminal diagnoses the type of an ECU through a K line, calls a middleware through a JNI interface to obtain communication configuration corresponding to the ECU, the middleware obtains corresponding communication configuration from a configuration library through SQL/data rules, the middleware sends an instruction to inform a box to connect a CAN data channel based on the communication configuration, returns the state to the middleware after the channel is switched by a diagnosis box, returns the returned state to the application terminal through the calling of the JNI interface, and displays the successfully connected state so as to realize bus automatic switching;
the remote fault diagnosis method comprises the following steps:
the application terminal calls a corresponding middleware according to the CAN bus mode of the current diagnosis;
the middleware calls a vehicle basic information acquisition interface, acquires a corresponding instruction from a configuration library and sends the instruction to a diagnosis box in a TCP communication mode;
the diagnosis box forwards the instruction to the ECU so that the ECU returns a CANECU data packet and an instruction execution state to the diagnosis box after executing corresponding diagnosis processing according to the instruction;
the diagnostic box forwards the CANECU data packet and the instruction execution state to the middleware;
and the middleware analyzes the CANECU data packet according to the configuration analysis rule of the configuration library and returns analysis data and the instruction execution state to the application terminal so that the application terminal displays the analysis data and the instruction execution state.
2. The remote fault diagnosis method based on bus automatic switching and free configuration protocol as claimed in claim 1, wherein the middleware parses the CANECU packet according to the configuration parsing rule of the configuration library, specifically:
after receiving the CANECU data packet and the instruction execution state, the middleware acquires a configuration analysis rule of vehicle basic information stored in advance from a configuration library through an SQL/data rule, and analyzes the CANECU data packet according to the configuration analysis rule to obtain analysis data.
3. The remote fault diagnosis method based on bus automatic switching and free configuration protocol as claimed in claim 1, wherein the command is related to obtaining basic information of the vehicle, including a box communication command and a CAN communication command.
4. The remote fault diagnosis method based on bus automatic switching and free configuration protocol as claimed in claim 1, wherein the diagnosis box supports 4-way CAN channel and 2-way K line and stores a program for controlling access to the corresponding data channel.
5. The remote fault diagnosis method based on bus automatic switching and free configuration protocol according to claim 1, wherein the application terminal is connected with the middleware through a JNI interface, and the middleware is connected with the diagnosis box through a USB/TCP interface.
6. The remote fault diagnosis method based on the bus automatic switching and free configuration protocol as claimed in claim 1, wherein the middleware calls a vehicle basic information acquisition interface to acquire corresponding instructions from a configuration library, specifically:
and the middleware calls a basic information acquisition interface of the vehicle and acquires corresponding instructions from a configuration library through SQL/data rules.
CN201810947285.8A 2018-08-17 2018-08-17 Remote fault diagnosis method based on bus automatic switching and free configuration protocol Active CN109240260B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810947285.8A CN109240260B (en) 2018-08-17 2018-08-17 Remote fault diagnosis method based on bus automatic switching and free configuration protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810947285.8A CN109240260B (en) 2018-08-17 2018-08-17 Remote fault diagnosis method based on bus automatic switching and free configuration protocol

Publications (2)

Publication Number Publication Date
CN109240260A CN109240260A (en) 2019-01-18
CN109240260B true CN109240260B (en) 2020-08-21

Family

ID=65069796

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810947285.8A Active CN109240260B (en) 2018-08-17 2018-08-17 Remote fault diagnosis method based on bus automatic switching and free configuration protocol

Country Status (1)

Country Link
CN (1) CN109240260B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115729220B (en) * 2022-11-29 2024-05-31 重庆长安汽车股份有限公司 Vehicle diagnostic system, method and storage medium

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101706372B (en) * 2009-11-10 2013-11-06 奇瑞汽车股份有限公司 Electronic-control vehicle remote diagnosis system and diagnosis method thereof
CN201716590U (en) * 2009-12-28 2011-01-19 上海通用汽车有限公司 Automatic automobile bus switching instrument
CN102402219A (en) * 2010-09-09 2012-04-04 上海神珑信息技术有限公司 Device and method for acquiring and monitoring automobile information on line based on controller area network (CAN) bus and general packet radio service (GPRS) communication
CN202275322U (en) * 2011-10-17 2012-06-13 芜湖比翼鸟航空科技有限公司 Comprehensive detection platform for automotive electronics
CN105137964A (en) * 2015-09-17 2015-12-09 合肥工业大学 Automobile fault remote diagnosis system based on cellphone APP
CN105517131B (en) * 2015-11-28 2019-02-05 Oppo广东移动通信有限公司 Frequency range processing method, device and terminal in a kind of communication terminal
WO2017139930A1 (en) * 2016-02-17 2017-08-24 吴伟民 Vehicle remote fault detection method and system
CN108021119A (en) * 2016-10-31 2018-05-11 河南蓝信科技股份有限公司 A kind of EOAS device detection systems and its method
CN206363155U (en) * 2016-12-23 2017-07-28 北京一雄信息科技有限公司 Vehicle failure remote diagnosis system
CN206400286U (en) * 2017-01-16 2017-08-11 宁德时代新能源科技股份有限公司 A kind of test system based on hardware in loop equipment
CN207010992U (en) * 2017-07-28 2018-02-13 岭南师范学院 A kind of network vehicle-mounted diagnostic system
CN107450514A (en) * 2017-07-31 2017-12-08 广州亿程交通信息有限公司 Vehicle remote fault diagnosis management method and system
CN108306939B (en) * 2017-12-29 2021-02-12 深圳市元征科技股份有限公司 Data processing method and device and forwarding equipment

Also Published As

Publication number Publication date
CN109240260A (en) 2019-01-18

Similar Documents

Publication Publication Date Title
CN110928567A (en) Vehicle system upgrading method, terminal device and computer-readable storage medium
CN102804126B (en) Vehicle communication interface and method of operating thereof
US11514731B2 (en) Method and system for remote vehicle diagnostics
CN110597229A (en) Vehicle diagnosis mutual exclusion method and device, vehicle and storage medium
CN108701044A (en) Interface switching method, system, equipment and computer readable storage medium
CN113746821A (en) Intelligent device control method and device, storage medium and electronic device
CN109240260B (en) Remote fault diagnosis method based on bus automatic switching and free configuration protocol
CN111405059A (en) Data transmission method of cloud equipment, electronic equipment and Internet of things system
CN111464920A (en) Earphone debugging method, device and storage medium
CN109960657B (en) Test environment deployment method and related device
CN108803582B (en) Automatic bus switching system and method suitable for remote fault diagnosis
CN114520827B (en) Message receiving method, pushing method, system and medium
EP3573306A1 (en) Data processing method and device utilized in client terminal
CN111740972B (en) Method, device, equipment and storage medium for updating communication protocol stack information
CN116300780A (en) Component configuration method, device, electronic equipment and storage medium
CN115373367A (en) Automobile remote diagnosis method, system, diagnostic instrument and terminal equipment
CN114817097A (en) Single-wire communication method, system, device and storage medium
CN109520079B (en) Air conditioner, control method and device thereof, and computer readable storage medium
CN114326673A (en) Vehicle remote diagnosis method and device, connector and storage medium
CN110177364B (en) Bluetooth device pairing connection method and device, storage medium and electronic device
CN113676882A (en) Single-chip multi-antenna Bluetooth positioning system and method
CN107800677B (en) Apparatus and method for providing adaptive connection service
CN115914429B (en) Communication protocol adaptation method, device, electronic equipment, vehicle and storage medium
CN112615932B (en) Communication method based on vehicle bus and vehicle gateway equipment
CN117032195A (en) Remote diagnosis method, storage medium and device for whole vehicle distributed ECU

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
GR01 Patent grant
GR01 Patent grant