CN112905161A - OBD-based automobile online programming method - Google Patents
OBD-based automobile online programming method Download PDFInfo
- Publication number
- CN112905161A CN112905161A CN202110221415.1A CN202110221415A CN112905161A CN 112905161 A CN112905161 A CN 112905161A CN 202110221415 A CN202110221415 A CN 202110221415A CN 112905161 A CN112905161 A CN 112905161A
- Authority
- CN
- China
- Prior art keywords
- obd
- automobile
- file
- simulator
- flash
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/31—Programming languages or programming paradigms
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/08—Error detection or correction by redundancy in data representation, e.g. by using checking codes
- G06F11/10—Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
- G06F11/1008—Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices
- G06F11/1068—Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices in sector programmable memories, e.g. flash disk
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Quality & Reliability (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses an OBD-based automobile online programming method, and belongs to the technical field of environmental monitoring. The method comprises the following steps: the processor reads in an OBD program file of an OBD automobile to be loaded, the OBD program file format of the OBD automobile is a BIN file, an OBD operation system of the OBD automobile is written into an OBD automobile FLASH simulator, the BIN file of the OBD program file is written into the OBD automobile FLASH simulator through the SPI, the automobile FLASH simulator verifies the BIN file written into FLASH of the OBD program, whether the size of the OBD program file is correct or not is verified, and whether the OBD program file can normally operate or not is verified. According to the method based on the OBD automobile online programming, when the BIN file of the OBD program file is correct in size of the verification file, the OBD program file can be preliminarily verified in the file size mode, the OBD program file cannot crash an OBD automobile operation system due to incorrect file codes, and the safety coefficient of the OBD automobile operation system is improved.
Description
Technical Field
The invention relates to the technical field of environmental monitoring, in particular to an automobile online programming method based on OBD.
Background
OBD full name: the translation of On Board Diagnostics into Chinese is: is a detection system extended for automobile fault diagnosis. "OBD II" is an abbreviation for "on Board Diagnostics II", a type II on-Board diagnostic system. To standardize the diagnosis of vehicle emissions and driveability related failures, from 1996 on all new vehicles sold in the united states, the diagnostic instrumentation, fault coding and maintenance procedures had to be similar, i.e. compliant with the OBD ii procedure. With the increasing degree of economic globalization and automobile internationalization, the OBDII system will be widely implemented and applied as the basis of driving performance and emission diagnosis. The OBD II program enables the automobile fault diagnosis to be simple and uniform, and maintenance personnel do not need to study a new system of each manufacturer specially.
If the OBD automobile is directly written into an OBD automobile running system after programming is finished, system collapse can be caused, the written OBD file is damaged, the problems that the file after programming is finished cannot be opened and the like are caused, the OBD automobile running system is damaged, and great potential safety hazards exist, so that the OBD system of the automobile needs to be programmed by using a safe and efficient OBD automobile online programming method.
Disclosure of Invention
Technical problem to be solved
Aiming at the defects of the prior art, the invention provides an OBD-based automobile online programming method, which solves the problems in the background art.
(II) technical scheme
In order to achieve the purpose, the invention is realized by the following technical scheme: an OBD-based automobile online programming method comprises the following steps:
step one, the processor reads in an OBD program file of an OBD automobile to be loaded, and the OBD program file format of the OBD automobile is a BIN file.
And step two, writing the OBD running system of the OBD automobile into an OBD automobile FLASH simulator.
And thirdly, writing the BIN file of the OBD program file into the OBD automobile FLASH simulator through the SPI by the processor.
And step four, the automobile FLASH simulator verifies the BIN file written into the FLASH of the OBD program.
And fifthly, checking whether the size of the OBD program file is correct, checking whether the OBD program file can normally run, entering an OBD automobile FLASH simulator for test running if the size of the OBD program file is correct, judging that loading is successful if the OBD program file can run, finishing loading, writing the BIN file of the OBD program file into a FLASH of the OBD automobile by a processor through an SPI (serial peripheral interface), directly judging that loading fails if the size of the OBD program file is wrong, reloading, and judging that the file is wrong if the OBD program file cannot be tested and run in the automobile FLASH simulator if the size of the OBD program file is correct.
Preferably, the processor reads the written BIN file from the simulator of the OBD automobile simulator through the SPI, compares whether the contents of the read BIN file and the written BIN file are the same, determines that the loading is successful and ends the loading if the contents of the read BIN file and the written BIN file are the same, and determines that the loading is failed and deletes the read BIN file if the contents of the read BIN file and the written BIN file are different.
Preferably, the step in the second step further comprises: and copying the OBD running system of the OBD automobile in a whole disc mode through a GHOST system in the OBD automobile FLASH simulator and writing the OBD running system into a simulator in the OBD automobile FLASH simulator for simulation test.
Preferably, the OBD operation system of the OBD vehicle in the second step further includes: scanning system and oscilloscope system.
Preferably, the step in the fourth step further comprises: the automobile FLASH simulator copies and writes the scanner system and the oscilloscope system into the simulator, and carries out simulation operation on the processor from the simulator of the OBD automobile simulator through the SPI, if the operation is successful, the loading is finished, and if the simulation operation is not possible, the file error is judged.
Preferably, the BIN file is written in a one byte at a time pattern or a one page at a time pattern in step three.
Preferably, the step in the fourth step further comprises: and substituting the BIN file in the FLASH of the OBD program into a simulator in the automobile FLASH simulator, and simultaneously substituting the BIN file in the OBD program into the programs of the scanner system and the oscilloscope system which are copied and written in the automobile FLASH simulator for simulation test.
Preferably, the step of substituting the BIN file in the OBD program into the programs of the scanner system and the oscilloscope system copied and written in the car FLASH simulator to perform the simulation test further includes: if the OBD program file can run, the loading is judged to be successful, the OBD program file of the OBD automobile is written into a FLASH of the OBD automobile through a GHOST system in the FLASH simulator of the OBD automobile, and if the OBD program file cannot run normally, the loading is judged to be failed, and the read OBD program file is deleted.
Preferably, the further step of the automotive FLASH simulator copying and writing the scanner system and the oscilloscope system into the simulator comprises: the sensor sending function and the fault code reading function in the scanner system are written into the simulator, and the oscilloscope display function and the frequency sampling function are written into the simulator.
(III) advantageous effects
The invention provides an OBD-based automobile online programming method. The method has the following beneficial effects:
(1) according to the method based on the OBD automobile online programming, when the size of the BIN file of the OBD program file is correct, the OBD program file can be preliminarily verified in the file size mode, the OBD program file cannot crash due to incorrect file codes, and the safety coefficient of the OBD automobile operation system is improved.
(2) According to the method for on-line programming of the OBD automobile, the BIN file of the OBD program file is simulated and operated through the automobile FLASH simulator, whether the OBD program file is correct or not can be completely judged through the automobile FLASH simulator, the OBD program file is prevented from being mistakenly damaged, and the safety coefficient of protecting the OBD automobile operation system is improved.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to 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.
The invention provides a technical scheme that: an OBD-based automobile online programming method is characterized in that: the method for on-line programming of the OBD-based automobile comprises the following steps:
step one, the processor reads in an OBD program file of an OBD automobile to be loaded, and the OBD program file format of the OBD automobile is a BIN file.
Writing an OBD running system of the OBD into an OBD automobile FLASH simulator; and the OBD running system of the OBD automobile is written into the OBD automobile FLASH simulator through an SPI (serial peripheral interface) of the OBD automobile FLASH simulator and the OBD automobile.
And thirdly, writing the BIN file of the OBD program file into the OBD automobile FLASH simulator through the SPI by the processor.
And step four, the automobile FLASH simulator verifies the BIN file written into the FLASH of the OBD program.
And fifthly, checking whether the size of the OBD program file is correct, checking whether the OBD program file can normally run, entering an OBD automobile FLASH simulator for test running if the size of the OBD program file is correct, judging that loading is successful if the OBD program file can run, finishing loading, writing the BIN file of the OBD program file into a FLASH of the OBD automobile by a processor through an SPI (serial peripheral interface), directly judging that loading fails if the size of the OBD program file is wrong, reloading, and judging that the file is wrong if the OBD program file cannot be tested and run in the automobile FLASH simulator if the size of the OBD program file is correct.
Further, the processor reads the written BIN file from the simulator of the OBD automobile simulator through the SPI, compares whether the contents of the read BIN file and the written BIN file are the same, judges that loading is successful and ends loading if the contents of the read BIN file and the written BIN file are the same, and judges that loading is failed and deletes the read BIN file if the contents of the read BIN file and the written BIN file are different. The OBD program file is preliminarily verified in a file size mode, and the OBD program file cannot cause crash of an OBD automobile running system due to incorrect file codes.
Further, the step in the step two further includes: and copying the OBD running system of the OBD automobile in a whole disc mode through a GHOST system in the OBD automobile FLASH simulator and writing the OBD running system into a simulator in the OBD automobile FLASH simulator for simulation test. Copying the whole disk of the OBD running system and backing up to prevent the damage of the OBD running system caused by mismatching of an OBD FLASH simulator and an OBD program file in the process of simulating running.
Further, the OBD operation system of the OBD vehicle in the second step further includes: scanning system and oscilloscope system. Two major systems in OBD cars are used for detection and recording.
Further, the step in the fourth step further includes: the automobile FLASH simulator copies and writes the scanner system and the oscilloscope system into the simulator, and carries out simulation operation on the processor from the simulator of the OBD automobile simulator through the SPI, if the operation is successful, the loading is finished, and if the simulation operation is not possible, the file error is judged.
Further, in step three, the BIN file is written in a one byte mode at a time, or a one page mode at a time. The BIN file is prevented from being written into the original file because of system jamming or delay.
Further, the step in the fourth step further includes: and substituting the BIN file in the FLASH of the OBD program into a simulator in the automobile FLASH simulator, and simultaneously substituting the BIN file in the OBD program into the programs of the scanner system and the oscilloscope system which are copied and written in the automobile FLASH simulator for simulation test. Whether the OBD program file is correct or not can be completely judged through the automobile FLASH simulator, and the OBD program file is prevented from mistakenly damaging an OBD automobile running system.
Further, substituting the BIN file in the OBD program into the programs of the scanner system and the oscilloscope system copied and written in the automobile FLASH simulator for simulation test further comprises the following steps: if the OBD program file can run, the loading is judged to be successful, the OBD program file of the OBD automobile is written into a FLASH of the OBD automobile through a GHOST system in the FLASH simulator of the OBD automobile, and if the OBD program file cannot run normally, the loading is judged to be failed, and the read OBD program file is deleted. Whether the OBD program file is correct or not can be completely judged through the automobile FLASH simulator, and the OBD program file is prevented from mistakenly damaging an OBD automobile running system.
Further, the step of copying and writing the scanner system and the oscilloscope system into the simulator by the automobile FLASH simulator comprises the following steps: the sensor sending function and the fault code reading function in the scanner system are written into the simulator, and the oscilloscope display function and the frequency sampling function are written into the simulator. The sensor sending function, the fault code reading function, the oscilloscope display function and the frequency sampling function are main operation processes in an OBD (on-board diagnostics) automobile operation system, so that the four functions are written in and are subjected to simulation operation test with a BIN (binary information network) file of an OBD program file.
When unauthorized persons invade, the warning module directly alarms through the alarm, meanwhile, the authority management module collects the illegal invaders through the real-time monitoring module to collect the faces of the illegal invaders and inputs the collected information into the system storage module, when the police officers do not arrive, the illegal invaders escape and the illegal invaders cause certain property loss, the authority management module calls the system storage module information out, the illegal invaders captured by the real-time monitoring module are transmitted to the monitoring large screen, and the police officers can conveniently investigate the illegal invaders.
According to the method based on the OBD automobile online programming, when the BIN file of the OBD program file is correct in size of the verification file, the OBD program file can be preliminarily verified in the file size mode, the OBD program file cannot crash an OBD automobile operation system due to incorrect file codes, and the safety coefficient of the OBD automobile operation system is improved. The BIN file of the OBD program file is simulated and operated through the automobile FLASH simulator, whether the OBD program file is correct or not can be completely judged through the automobile FLASH simulator, the OBD program file is prevented from being mistakenly damaged, and the safety coefficient of protecting the OBD automobile operation system is improved.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.
Claims (9)
1. An OBD-based automobile online programming method is characterized in that: the method for on-line programming of the OBD-based automobile comprises the following steps:
reading an OBD program file of an OBD automobile to be loaded by a processor, wherein the OBD program file format of the OBD automobile is a BIN file;
writing an OBD running system of the OBD into an OBD automobile FLASH simulator;
writing the BIN file of the OBD program file into an OBD automobile FLASH simulator through an SPI (serial peripheral interface) by the processor;
step four, the automobile FLASH simulator verifies the BIN file written into the FLASH of the OBD program;
and fifthly, checking whether the size of the OBD program file is correct, checking whether the OBD program file can normally run, entering an OBD automobile FLASH simulator for test running if the size of the OBD program file is correct, judging that loading is successful if the OBD program file can run, finishing loading, writing the BIN file of the OBD program file into a FLASH of the OBD automobile by a processor through an SPI (serial peripheral interface), directly judging that loading fails if the size of the OBD program file is wrong, reloading, and judging that the file is wrong if the OBD program file cannot be tested and run in the automobile FLASH simulator if the size of the OBD program file is correct.
2. The method for on-line programming of an OBD-based vehicle according to claim 1, wherein: the processor reads the written BIN file from the simulator of the OBD automobile simulator through the SPI, compares whether the contents of the read BIN file and the written BIN file are the same or not, judges that loading is successful if the contents of the read BIN file and the written BIN file are the same, and finishes loading, and judges that loading is failed if the contents of the read BIN file and the written BIN file are different and deletes the read BIN file.
3. The method for on-line programming of an OBD-based vehicle according to claim 1, wherein: the step in the second step further comprises: and copying the OBD running system of the OBD automobile in a whole disc mode through a GHOST system in the OBD automobile FLASH simulator and writing the OBD running system into a simulator in the OBD automobile FLASH simulator for simulation test.
4. The method for on-line programming of an OBD-based vehicle according to claim 1, wherein: the OBD operation system of the OBD vehicle in the second step further includes: scanning system and oscilloscope system.
5. The method for on-line programming of an OBD-based vehicle according to claim 1, wherein: the step in step four further comprises: the automobile FLASH simulator copies and writes the scanner system and the oscilloscope system into the simulator, and carries out simulation operation on the processor from the simulator of the OBD automobile simulator through the SPI, if the operation is successful, the loading is finished, and if the simulation operation is not possible, the file error is judged.
6. The method for on-line programming of an OBD-based vehicle according to claim 1, wherein: in step three, the BIN file is written in a one byte mode at a time, or a one page mode at a time.
7. The method for on-line programming of an OBD-based vehicle according to claim 1, wherein: the step in step four further comprises: and substituting the BIN file in the FLASH of the OBD program into a simulator in the automobile FLASH simulator, and simultaneously substituting the BIN file in the OBD program into the programs of the scanner system and the oscilloscope system which are copied and written in the automobile FLASH simulator for simulation test.
8. An OBD-based automotive on-line programming method according to claim 7, characterized in that: substituting the BIN file in the OBD program into the programs of the scanner system and the oscilloscope system which are copied and written in the automobile FLASH simulator to carry out simulation test, and further comprising the following steps of:
if the OBD program file can run, the loading is judged to be successful, the OBD program file of the OBD automobile is written into a FLASH of the OBD automobile through a GHOST system in the FLASH simulator of the OBD automobile, and if the OBD program file cannot run normally, the loading is judged to be failed, and the read OBD program file is deleted.
9. An OBD-based automotive on-line programming method according to claim 5, characterized in that: the further steps of the automotive FLASH simulator to copy and write the scanner system and oscilloscope system into the simulator include: the sensor sending function and the fault code reading function in the scanner system are written into the simulator, and the oscilloscope display function and the frequency sampling function are written into the simulator.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110221415.1A CN112905161A (en) | 2021-02-27 | 2021-02-27 | OBD-based automobile online programming method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110221415.1A CN112905161A (en) | 2021-02-27 | 2021-02-27 | OBD-based automobile online programming method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112905161A true CN112905161A (en) | 2021-06-04 |
Family
ID=76107392
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110221415.1A Pending CN112905161A (en) | 2021-02-27 | 2021-02-27 | OBD-based automobile online programming method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112905161A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104238547A (en) * | 2014-09-04 | 2014-12-24 | 南京富士通南大软件技术有限公司 | Automatic simulation system used for testing vehicle-mounted machine and method thereof |
CN104679559A (en) * | 2015-02-11 | 2015-06-03 | 北京配天技术有限公司 | Single chip microcomputer on-line programming method |
EP3121753A1 (en) * | 2015-07-21 | 2017-01-25 | Vodafone Automotive S.p.A. | System for controlling the communication between a main device and an auxiliary device and associated main device and auxiliary device used in the system |
CN107273170A (en) * | 2017-07-03 | 2017-10-20 | 西南交通大学 | A kind of SoPC programs remote update system and method |
CN109765876A (en) * | 2018-12-03 | 2019-05-17 | 中国汽车技术研究中心有限公司 | A kind of emulation test method and device of diesel engine post-processing system OBD function |
-
2021
- 2021-02-27 CN CN202110221415.1A patent/CN112905161A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104238547A (en) * | 2014-09-04 | 2014-12-24 | 南京富士通南大软件技术有限公司 | Automatic simulation system used for testing vehicle-mounted machine and method thereof |
CN104679559A (en) * | 2015-02-11 | 2015-06-03 | 北京配天技术有限公司 | Single chip microcomputer on-line programming method |
EP3121753A1 (en) * | 2015-07-21 | 2017-01-25 | Vodafone Automotive S.p.A. | System for controlling the communication between a main device and an auxiliary device and associated main device and auxiliary device used in the system |
CN107273170A (en) * | 2017-07-03 | 2017-10-20 | 西南交通大学 | A kind of SoPC programs remote update system and method |
CN109765876A (en) * | 2018-12-03 | 2019-05-17 | 中国汽车技术研究中心有限公司 | A kind of emulation test method and device of diesel engine post-processing system OBD function |
Non-Patent Citations (1)
Title |
---|
马潮: "《AVR单片机嵌入式***原理与应用实践》", 31 October 2007, 北京航空航天大学出版社 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111527477B (en) | Determining reliability of vehicle control commands using voting mechanisms | |
US6701233B2 (en) | Scan tool with dropped communications detection and recovery and improved protocol selection | |
CN108475362A (en) | Vehicle appraisal procedure, device and equipment | |
KR19990063979A (en) | Diagnostic device for engine management | |
EP0530863B1 (en) | Method of starting up a subsystem in a distributed processing system | |
WO2019137345A1 (en) | Method and apparatus for establishing communication connection with tire pressure monitoring system, and electronic device | |
KR101044544B1 (en) | Method for monitoring the execution of a program in a micro-computer | |
CN113065195A (en) | Vehicle information security threat assessment method, device, medium and electronic equipment | |
WO2023071961A1 (en) | Fault code storage method and apparatus, and device and storage medium | |
JP2958024B2 (en) | Manufacturing and inspection methods for electronic equipment | |
CN112816228A (en) | EOL detection method of EMS and EMS offline detection method | |
CN113359657A (en) | ECU diagnosis configuration code checking method and system and electronic control unit | |
CN103630375A (en) | Fault diagnosis method and system of on-board unit and on-board unit | |
CN112905161A (en) | OBD-based automobile online programming method | |
CN114416140B (en) | Upgrade method and device based on ECU | |
CN114115170B (en) | Method and device for determining vehicle configuration module and after-sale diagnostic instrument | |
Rešetar et al. | A New Method for Emission Control System Malfunction Detection During the Periodic Technical Inspection | |
JP4281392B2 (en) | Information rewriting system for electronic control unit | |
JP2002235599A (en) | Trouble diagnosing device for cab-over type truck | |
RU2458379C2 (en) | Method of processing request to delete error code stored in computer memory installed on-board automobile, and method and system for facilitating maintenance of said automobile | |
Pimentel et al. | Numerical Evaluation of the Safety of Self-Driving Vehicles: Functionality Involving Vehicle Detection | |
JPS6294442A (en) | Diagnosis system for vehicle | |
JP3419060B2 (en) | Diagnostic device for vehicles | |
JP3342039B2 (en) | Processing unit that manages files | |
Ogawa et al. | Diagnostics trends for automotive electronic systems |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210604 |
|
RJ01 | Rejection of invention patent application after publication |