CN117640702A - Communication protocol acquisition method and device, electronic equipment and storage medium - Google Patents
Communication protocol acquisition method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN117640702A CN117640702A CN202410107719.9A CN202410107719A CN117640702A CN 117640702 A CN117640702 A CN 117640702A CN 202410107719 A CN202410107719 A CN 202410107719A CN 117640702 A CN117640702 A CN 117640702A
- Authority
- CN
- China
- Prior art keywords
- communication
- obd
- protocol
- communication protocol
- pin
- 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.)
- Granted
Links
- 238000004891 communication Methods 0.000 title claims abstract description 245
- 238000000034 method Methods 0.000 title claims abstract description 50
- 238000012423 maintenance Methods 0.000 claims description 10
- 238000004590 computer program Methods 0.000 claims description 9
- 238000003745 diagnosis Methods 0.000 abstract description 3
- 230000006870 function Effects 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 2
- 230000002452 interceptive effect Effects 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 1
- 230000004913 activation Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 230000014759 maintenance of location Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L12/40006—Architecture of a communication node
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Communication Control (AREA)
Abstract
The invention belongs to the technical field of automobile diagnosis, and particularly relates to a communication protocol acquisition method and device, electronic equipment and a storage medium, wherein the method is applied to OBD equipment, and the OBD equipment is in communication connection with a client; the method comprises the following steps: for each pin of an OBD device, acquiring a voltage value of the pin; and determining a prediction pin and a prediction communication protocol according to all the voltage values of the pins. According to the communication protocol acquisition method, the device, the electronic equipment and the storage medium, the communication protocol is predicted by acquiring the voltage of each pin of the OBD equipment, according to the voltage of each pin of the OBD equipment, the physical communication interface is configured, the OBD request command is sent through the physical communication interface, if the feedback signal of the driving computer is received within the configured communication time, the communication connection between the OBD equipment and the driving computer is established, so that the automatic acquisition of the communication protocol is realized, and the efficiency of acquiring the communication protocol is improved.
Description
Technical Field
The present invention relates to the field of automotive diagnosis technologies, and in particular, to a method and an apparatus for collecting a communication protocol, an electronic device, and a storage medium.
Background
The automotive OBD system supports interactive communication of multiple protocols, such as the common CAN, K, PWM, VPW, 9 communication protocols of 4 physical interfaces.
At present, the vehicle-mounted OBD device needs to establish communication connection with the driving computer by configuring corresponding communication speed under the condition of confirming a physical communication port supported by the vehicle, so as to realize data reading and writing operation. Because of the large difference between the communication ports actually supported by different brands and models of vehicles, automatic identification of the vehicle protocols becomes an indispensable function.
Disclosure of Invention
In view of the above, the present invention aims to provide a communication protocol acquisition method, a device, an electronic apparatus, and a storage medium.
In a first aspect, an embodiment of the present invention provides a communication protocol acquisition method, where the method is applied to an OBD device, and the OBD device is in communication connection with a client;
the method comprises the following steps:
acquiring a voltage value of each pin of the OBD equipment;
determining a predicted pin and a predicted communication protocol according to the voltage values of all pins;
configuring a physical communication interface of the OBD device according to communication parameters of a predictive communication protocol; the communication parameters include at least: communication rate, communication duration, data message format;
sending an OBD general request command to a vehicle driving computer through a physical communication interface;
judging whether a signal returned by the vehicle is received within the communication duration;
if yes, sending the prompt information scanned to support the protocol to the client, and outputting the protocol name of the communication protocol.
In combination with the first aspect, the OBD device prestores one-to-one correspondence between a plurality of communication protocols and a plurality of modes; each mode includes a voltage value of at least one target pin and a target pin;
determining a predicted pin and a predicted communication protocol according to the voltage values of all pins, wherein the method comprises the following steps:
judging whether a mode meeting preset conditions exists or not according to the voltage values of all pins;
if yes, determining the mode as a prediction mode, and determining a communication protocol corresponding to the prediction mode as a prediction communication protocol.
With reference to the first aspect, after the step of determining whether a mode satisfying the preset condition exists according to the voltage values of all pins, the method further includes:
if not, the prompt information that the OBD equipment is a non-standard protocol interface and communication is not tried is returned to the client.
With reference to the first aspect, the step of configuring the physical communication interface of the OBD device according to the communication parameters of the predictive communication protocol includes:
acquiring communication parameters corresponding to a predicted communication protocol;
connecting a physical communication interface of the OBD with a prediction pin;
and configuring parameters of the physical communication interface according to the communication parameters.
With reference to the first aspect, after the step of determining whether the signal returned by the vehicle is received within the communication duration, the method further includes:
if not, sending a prompt message that the supported protocol is not scanned and whether an ignition switch of the vehicle is not turned on to the client.
With reference to the first aspect, after the step of sending the prompt information that the protocol is scanned to support to the client and outputting the protocol name of the communication protocol, the method further includes:
if the request command sent by the client is not received within the set link maintenance time, a link maintenance command is sent to the driving computer so as to maintain the communication connection between the OBD equipment and the driving computer;
if the request command sent by the client is not received within the set disconnection time, the communication connection between the OBD equipment and the driving computer is disconnected.
In combination with the first aspect, the application also provides a communication protocol acquisition method, which is applied to an automobile driving computer, wherein a target communication protocol is prestored in the automobile driving computer; the method comprises the following steps:
receiving an OBD universal request command sent by OBD equipment; the OBD general request command carries a prediction communication protocol;
judging whether the predicted communication protocol is matched with the target communication protocol or not;
if yes, a signal is returned to the OBD equipment so as to establish communication connection between the automobile driving computer and the OBD equipment.
In a second aspect, the present application provides a communication protocol acquisition device, where the device is applied to an OBD device, and the OBD device is in communication connection with a client;
the device comprises:
the acquiring module is used for acquiring the voltage value of each pin of the OBD equipment;
the determining module is used for determining a predicted pin and a predicted communication protocol according to the voltage values of all pins;
the configuration module is used for configuring a physical communication interface of the OBD device according to the communication parameters of the prediction communication protocol; the communication parameters include at least: communication rate, communication duration, data message format;
the sending module is used for sending an OBD general request command to the vehicle driving computer through the physical communication interface;
the judging module is used for judging whether a signal returned by the vehicle is received in the communication time length;
and the prompt module is used for sending the prompt information scanned to the support protocol to the client and outputting the protocol name of the communication protocol when the signal returned by the vehicle is received in the communication time.
In a third aspect, the present application provides an electronic device comprising a memory for storing a computer program and a processor that runs the computer program to cause the electronic device to perform the method described above.
In a fourth aspect, the present application provides a storage medium having stored therein computer program instructions which, when read and executed by a processor, perform the method described above.
The embodiment of the invention has the following beneficial effects: according to the communication protocol acquisition method, the device, the electronic equipment and the storage medium, the communication protocol is predicted by acquiring the voltage of each pin of the OBD equipment, according to the voltage of each pin of the OBD equipment, the physical communication interface is configured, the OBD request command is sent through the physical communication interface, if the feedback signal of the driving computer is received within the configured communication time, the communication connection between the OBD equipment and the driving computer is established, so that the automatic acquisition of the communication protocol is realized, the efficiency of the acquisition of the communication protocol is improved, and the bus interference is reduced.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
In order to make the above objects, features and advantages of the present invention more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the description below are some embodiments of the invention and that other drawings may be obtained from these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a communication protocol acquisition method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a communication protocol acquisition device according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Reference numerals:
10-acquisition module, 20-determination module, 30-configuration module, 40-sending module, 50-judgment module and 60-prompt module;
130-processor, 131-memory, 132-bus, 133-communication interface.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In order to facilitate understanding of the present embodiment, technical terms designed in the present application will be briefly described below.
OBD (On-Board Diagnostics), on-board automatic diagnostic system, its function is to monitor the working state of engine and other work modules in real time during the running of car, and once abnormality is found, it can be recorded in the form of fault code in the memory. When the automobile is maintained and overhauled, a maintainer can quickly and accurately position related parts through the fault code so as to facilitate subsequent maintenance.
The automobile OBD system supports interactive communication of multiple protocols, such as CAN, K, PWM, VPW, 9 communication protocols of 4 physical interfaces:
(1)SAE J1850 PWM(41.6 kbaud);
(2)SAEJ1850 VPW (10.4 kbaud);
(3)ISO 9141-2(5 baud init);
(4)ISO14230-4 KWP(5 baud init);
(5)ISO14230-4 KWP(fast init);
(6)lSO 15765-4 CAN(11 bit lD, 500 kbaud);
(7)ISO 15765-4 CAN(29 bit ID, 500 kbaud);
(8)ISO 15765-4 CAN (11 bit ID, 250 kbaud);
(9)ISO 15765-4 CAN (29 bit ID, 250 kbaud)。
after technical terms related to the application are introduced, application scenes and design ideas of the embodiment of the application are briefly introduced.
The communication ports actually supported by vehicles of different brands and models are greatly different, and automatic identification of vehicle protocols becomes an indispensable function.
The embodiment of the application provides a communication protocol acquisition method and device, electronic equipment and storage medium, so that the communication protocol can be identified by acquiring the pin voltage of the OBD equipment, and the efficiency of acquiring the communication protocol can be improved.
Example 1
The application provides a communication protocol acquisition method which is applied to OBD equipment and is in communication connection with a client.
Referring to fig. 1, the method includes:
s110, acquiring a voltage value of each pin of the OBD device.
S120, determining a predicted pin and a predicted communication protocol according to the voltage values of all pins.
S130, configuring a physical communication interface of the OBD device according to communication parameters of a predictive communication protocol; the communication parameters include at least: communication rate, communication duration, data message format.
S140, sending an OBD general request command to the vehicle driving computer through a physical communication interface.
S150, judging whether a signal returned by the vehicle is received in the communication time length.
And S160, if yes, sending the prompt information scanned to support the protocol to the client, and outputting the protocol name of the communication protocol.
In the application, the voltage of each pin of the OBD equipment is obtained to determine the predicted pin and the predicted communication protocol, then the communication parameters in the predicted communication protocol and the physical communication interfaces corresponding to the communication parameters are obtained, after the physical communication interfaces are subjected to parameter configuration, the OBD general request command is sent to the driving computer through the physical communication structure, if the return signal of the driving computer is received within the configured communication time, the communication protocol is determined to be the target communication protocol of the driving computer, and then the protocol name of the communication protocol is output to the client.
With reference to the first aspect, after step S150, the method further includes:
if not, sending prompt information of whether the ignition switch of the vehicle is turned on or not to the client side, wherein the prompt information is not scanned to support the protocol.
When the prediction communication protocol is obtained, but the sent OBD general request command does not receive a signal returned by the driving computer, namely when the communication connection between the OBD equipment and the driving computer fails to be established, the communication connection is fed back to the client in time so as to remind related personnel.
In combination with the first aspect, the OBD device prestores one-to-one correspondence between a plurality of communication protocols and a plurality of modes; each mode includes at least one target pin and a voltage value of the target pin.
Step S120 determines a predicted pin and a predicted communication protocol according to the voltage values of all pins, including:
s121, judging whether a mode meeting preset conditions exists or not according to the voltage values of all pins;
if yes, go to step S122; if not, go to step S123.
S122, determining that the mode is a prediction mode, and determining a communication protocol corresponding to the prediction mode as a prediction communication protocol.
S123, a prompt message that the OBD device is a non-standard protocol interface and does not attempt communication is returned to the client.
And judging whether the voltage of each pin meets a preset mode or not by measuring the voltage values of all pins. If the preset mode is satisfied, the mode is taken as a prediction mode, and a prediction communication protocol corresponding to the prediction mode can be obtained.
For example, the correspondence between each pin and the communication protocol of the OBD device of the present application is shown in table 1-1, in this embodiment, the voltage of each pin is collected first, and whether a preset mode and a corresponding communication protocol to be predicted that are satisfied exist is determined according to a preset correspondence table. For example, the voltage U of the 2 nd foot is measured this time 2 Voltage U of 7 th foot =7v 7 Voltage U of 14 th pin of =8v 14 Voltage U of 15 th foot 15 Voltage U of 16 th pin of =0v 16 =12v。
Table 1-1 is a table of correspondence between pin voltages and mode-communication protocols preset in the OBD device.
Referring to Table 1-1, in U 2 When the communication protocol SAE J1850 VPW is 7v, the first mode is determined to be a prediction mode, the communication protocol SAE J1850 VPW corresponding to the first mode is used as a prediction communication protocol, then, the OBD physical communication interface is configured according to the communication parameters of the communication protocol SAE J1850 VPW, and an OBD general request command is sent to the driving computer through the physical communication interface to request to establish a communication connection, and the communication duration, speed, data message format, i.e. package format, and other information of the communication connection are configured according to the configured parameters.
If the voltage values collected by the 2-pin, the 10-pin and the 15-pin are all 0, it can be determined that the pins do not exist or the bus is in an idle state, and at this time, communication is attempted according to the standard protocol interface in the correspondence between the OBD pins and the protocol as the predictive communication protocol.
If a signal returned by the driving computer is received in the communication time, indicating that the communication protocol is established, sending prompt information of the scanned supporting protocol to the client, and outputting the protocol name of the communication protocol; if the return signal of the driving computer is not received, the communication protocol is not established successfully, at the moment, the information that the supported protocol cannot be scanned is output to the client, and prompt information is output: whether the ignition switch of the vehicle is not turned on.
The prediction modes can be multiple, so that the prediction communication protocols are multiple, the driving computer can support multiple communication protocols, at the moment, parameter configuration is sequentially carried out on the physical communication interfaces according to the prediction communication protocols, and an OBD universal request command is sent through the configured physical communication interfaces, so that whether the communication connection relation of the communication protocols is established is judged according to whether return information of the driving computer is received within the configured communication duration or not until a successfully established communication protocol is obtained.
If all communication protocols fail to be established, step S170 is performed.
With reference to the first aspect, the step of configuring the physical communication interface of the OBD device according to the communication parameters of the predictive communication protocol S130 includes:
s131, obtaining communication parameters corresponding to the predicted communication protocol.
And S132, connecting a physical communication interface of the OBD with a prediction pin.
S133, configuring parameters of the physical communication interface according to the communication parameters.
After the predicted communication protocol is obtained, a predicted pin required for meeting the predicted communication protocol is also determined, and the predicted pin is connected with a physical communication interface of the OBD and then is configured according to communication parameters of the predicted communication protocol.
With reference to the first aspect, step S160 further includes, after the step of sending, to the client, the prompt message that the protocol has been scanned to support, and outputting the protocol name of the communication protocol:
if the request command sent by the client is not received within the set link maintenance time, a link maintenance command is sent to the driving computer so as to maintain the communication connection between the OBD equipment and the driving computer;
if the request command sent by the client is not received within the set disconnection time, the communication connection with the driving computer is disconnected;
wherein the link retention time is less than the disconnection time.
After the communication connection between the OBD diagnosis device and the driving computer is established, if a request command sent by a client is not received within a link maintenance time, the vehicle detection work is not needed temporarily, and at the moment, a link maintenance command is sent to the driving computer to maintain the communication connection link and maintain the bus activation state.
In addition, if the request command sent by the client is received within the link maintaining time, the OBD device sends the request command to the driving computer and returns response data returned by the driving computer to the client, and at the moment, the OBD device is used as a communication bridge for connecting the client and the driving computer and is used for data receiving and transferring.
During the period, if the communication connection between the client and the OBD equipment is disconnected, the OBD equipment does not send a link maintenance command to the driving computer any more, and the communication connection with the driving computer is disconnected, so that the power consumption generated by continuously collecting signals is reduced.
If the request command sent by the client is not received within the set disconnection time, the communication connection between the client and the OBD equipment is disconnected, so that the consumption of electric power energy for acquiring signals in real time is reduced.
The application provides another communication protocol acquisition method which is applied to an automobile driving computer, and a target communication protocol is prestored in the automobile driving computer.
The method comprises the following steps:
s210, receiving an OBD universal request command sent by OBD equipment; the OBD generic request command carries the predictive communication protocol.
S220, judging whether the predicted communication protocol is matched with the target communication protocol.
If yes, go to step S230.
S230, a signal is returned to the OBD device so as to establish communication connection between the automobile driving computer and the OBD device.
After receiving a general request command sent by the OBD device, judging whether a predicted communication protocol in the general request command accords with a target communication protocol prestored in a driving computer, if so, establishing communication connection according to the predicted communication protocol, and feeding back a signal to the OBD device. If not, no signal is returned to the OBD device.
In a second aspect, the present application provides a communication protocol acquisition device, where the device is applied to an OBD device, and the OBD device is in communication connection with a client;
as shown in connection with fig. 2, the device comprises: the device comprises an acquisition module 10, a determination module 20, a configuration module 30, a sending module 40, a judging module 50 and a prompting module 60.
The acquiring module 10 is configured to acquire, for each pin of the OBD device, a voltage value of the pin.
The determining module 20 is configured to determine a predicted pin and a predicted communication protocol according to the voltage values of all pins.
The configuration module 30 is configured to configure a physical communication interface of the OBD device according to communication parameters of the predicted communication protocol; the communication parameters include at least: communication rate, communication duration, data message format.
The sending module 40 is configured to send the OBD universal request command to the vehicle driving computer through the physical communication interface.
The judging module 50 is configured to judge whether a signal returned from the vehicle is received within the communication duration.
The prompt module 60 is configured to, when receiving a signal returned by the vehicle during the communication time, send prompt information that the supporting protocol has been scanned to the client, and output a protocol name of the communication protocol.
In a third aspect, an embodiment of the present application provides an electronic device, as shown in fig. 3, where the electronic device includes a memory 131 and a processor 130, where the memory 131 is configured to store a computer program, and the processor 130 runs the computer program to cause the electronic device to execute the above method.
Further, the electronic device shown in connection with fig. 3 further comprises a bus 132 and a communication interface 133, and the processor 130, the communication interface 133 and the memory 131 are connected by the bus 132.
The memory 131 may include a high-speed random access memory (RAM, random Access Memory), and may further include a non-volatile memory (non-volatile memory), such as at least one magnetic disk memory. The communication connection between the system network element and at least one other network element is implemented via at least one communication interface 133 (which may be wired or wireless), and may use the internet, a wide area network, a local network, a metropolitan area network, etc. Bus 132 may be an ISA bus, a PCI bus, an EISA bus, or the like. The buses may be classified as address buses, data buses, control buses, etc. For ease of illustration, only one bi-directional arrow is shown in FIG. 3, but not only one bus or type of bus.
The processor 130 may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuitry in hardware or instructions in software in processor 130. The processor 130 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but may also be a digital signal processor (Digital Signal Processing, DSP for short), application specific integrated circuit (Application Specific Integrated Circuit, ASIC for short), off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA for short), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software modules in a decoding processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in the memory 131, and the processor 130 reads the information in the memory 131, and in combination with its hardware, performs the steps of the method of the foregoing embodiment.
In a fourth aspect, embodiments of the present application provide a readable storage medium having stored therein computer program instructions that, when read and executed by a processor, perform the method described above.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described system and apparatus may refer to corresponding procedures in the foregoing method embodiments, which are not described herein again.
In addition, in the description of embodiments of the present invention, unless explicitly stated and limited otherwise, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communication between two elements. The specific meaning of the above terms in the present invention will be understood by those skilled in the art in specific cases.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. are based on the directions or positional relationships shown in the drawings, are merely for convenience of describing the present invention and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above examples are only specific embodiments of the present invention for illustrating the technical solution of the present invention, but not for limiting the scope of the present invention, and although the present invention has been described in detail with reference to the foregoing examples, it will be understood by those skilled in the art that the present invention is not limited thereto: any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or perform equivalent substitution of some of the technical features, while remaining within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.
Claims (10)
1. The communication protocol acquisition method is characterized by being applied to OBD equipment, and the OBD equipment is in communication connection with a client;
the method comprises the following steps:
for each pin of an OBD device, acquiring a voltage value of the pin;
determining a predicted pin and a predicted communication protocol according to all the voltage values of the pins;
configuring a physical communication interface of the OBD device according to the communication parameters of the predictive communication protocol; the communication parameters include at least: communication rate, communication duration, data message format;
sending an OBD general request command to a vehicle driving computer through the physical communication interface;
judging whether a signal returned by the vehicle is received in the communication duration;
if yes, sending the prompt information scanned to support the protocol to the client, and outputting the protocol name of the communication protocol.
2. The method of claim 1, wherein the OBD device has pre-stored therein a one-to-one correspondence of a plurality of communication protocols to a plurality of modes; each of the modes includes at least one target pin and a voltage value of the target pin;
determining a predicted pin and a predicted communication protocol according to all the voltage values of the pins, wherein the method comprises the following steps:
judging whether a mode meeting a preset condition exists or not according to all the voltage values of the pins;
if yes, determining the mode as a prediction mode, and determining a communication protocol corresponding to the prediction mode as a prediction communication protocol.
3. The method according to claim 2, wherein after the step of determining whether the mode satisfying the preset condition exists according to the voltage values of all the pins, further comprising:
if not, the prompt message that the OBD device is a non-standard protocol interface and does not attempt communication is returned to the client.
4. The method of claim 1, wherein configuring the physical communication interface of the OBD device according to the communication parameters of the predictive communication protocol comprises:
acquiring communication parameters corresponding to the predicted communication protocol;
connecting a physical communication interface of the OBD with the prediction pin;
and configuring parameters of the physical communication interface according to the communication parameters.
5. The method of claim 1, further comprising, after the step of determining whether a signal returned by the vehicle is received within the communication duration:
if not, sending a prompt message that the supported protocol is not scanned and whether an ignition switch of the vehicle is not turned on to the client.
6. The method of claim 1, further comprising, after the step of sending the client a hint message that a protocol has been scanned to support and outputting a protocol name of the communication protocol:
if the request command sent by the client is not received within the set link maintenance duration, a link maintenance command is sent to the driving computer so as to maintain the communication connection between the OBD equipment and the driving computer;
and if the request command sent by the client is not received within the set disconnection time, disconnecting the communication connection between the OBD equipment and the driving computer.
7. The communication protocol acquisition method is characterized in that the method is applied to an automobile driving computer, and a target communication protocol is prestored in the automobile driving computer; the method comprises the following steps:
receiving an OBD universal request command sent by OBD equipment; the OBD general request command carries a prediction communication protocol;
judging whether the predicted communication protocol is matched with the target communication protocol or not;
if yes, a signal is returned to the OBD equipment so as to establish communication connection between the automobile driving computer and the OBD equipment.
8. The communication protocol acquisition device is characterized by being applied to OBD equipment, and the OBD equipment is in communication connection with a client;
the device comprises:
the acquiring module is used for acquiring the voltage value of each pin of the OBD equipment;
the determining module is used for determining a predicted pin and a predicted communication protocol according to all the voltage values of the pins;
the configuration module is used for configuring a physical communication interface of the OBD device according to the communication parameters of the prediction communication protocol; the communication parameters include at least: communication rate, communication duration, data message format;
the sending module is used for sending an OBD general request command to the vehicle driving computer through the physical communication interface;
the judging module is used for judging whether a signal returned by the vehicle is received in the communication duration;
and the prompt module is used for sending the prompt information which is scanned to support the protocol to the client and outputting the protocol name of the communication protocol when the signal returned by the vehicle is received in the communication time.
9. An electronic device comprising a memory for storing a computer program and a processor that runs the computer program to cause the electronic device to perform the method of any one of claims 1 to 7.
10. A storage medium having stored therein computer program instructions which, when read and executed by a processor, perform the method of any of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410107719.9A CN117640702B (en) | 2024-01-26 | 2024-01-26 | Communication protocol acquisition method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410107719.9A CN117640702B (en) | 2024-01-26 | 2024-01-26 | Communication protocol acquisition method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117640702A true CN117640702A (en) | 2024-03-01 |
CN117640702B CN117640702B (en) | 2024-06-21 |
Family
ID=90018466
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410107719.9A Active CN117640702B (en) | 2024-01-26 | 2024-01-26 | Communication protocol acquisition method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117640702B (en) |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108107875A (en) * | 2018-01-25 | 2018-06-01 | 深圳市道通科技股份有限公司 | A kind of vehicle diagnosis method, device and vehicle communication interface |
CN108255158A (en) * | 2018-01-16 | 2018-07-06 | 深圳市道通科技股份有限公司 | Vehicular diagnostic method and device |
CN111158347A (en) * | 2020-01-14 | 2020-05-15 | 深圳市元征科技股份有限公司 | OBD detection method and related equipment |
CN111796583A (en) * | 2020-08-21 | 2020-10-20 | 上海星融汽车科技有限公司 | Vehicle ECU (electronic control Unit) identification method and system and vehicle diagnosis equipment |
CN111813095A (en) * | 2020-07-30 | 2020-10-23 | 深圳市元征科技股份有限公司 | Vehicle diagnosis method, device and medium |
CN113377085A (en) * | 2021-06-29 | 2021-09-10 | 上海星融汽车科技有限公司 | Vehicle decoder communication parameter analysis system |
CN215835419U (en) * | 2021-09-27 | 2022-02-15 | 深圳市星卡软件技术开发有限公司 | Adaptive circuit and device based on OBD communication protocol |
CN114143273A (en) * | 2021-11-24 | 2022-03-04 | 深圳数马电子技术有限公司 | Channel allocation method, device, computer equipment and computer readable storage medium |
CN116701177A (en) * | 2023-04-28 | 2023-09-05 | 长城汽车股份有限公司 | Method and device for testing interface pins of vehicle-mounted diagnostic system and electronic equipment |
CN116775525A (en) * | 2023-06-02 | 2023-09-19 | 维沃移动通信有限公司 | Data transmission circuit, method, device, equipment and medium |
-
2024
- 2024-01-26 CN CN202410107719.9A patent/CN117640702B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108255158A (en) * | 2018-01-16 | 2018-07-06 | 深圳市道通科技股份有限公司 | Vehicular diagnostic method and device |
CN108107875A (en) * | 2018-01-25 | 2018-06-01 | 深圳市道通科技股份有限公司 | A kind of vehicle diagnosis method, device and vehicle communication interface |
US20210012587A1 (en) * | 2018-01-25 | 2021-01-14 | Autel Intelligent Technology Corp., Ltd. | Automobile diagnostic method, apparatus and vehicle communication interface |
CN111158347A (en) * | 2020-01-14 | 2020-05-15 | 深圳市元征科技股份有限公司 | OBD detection method and related equipment |
CN111813095A (en) * | 2020-07-30 | 2020-10-23 | 深圳市元征科技股份有限公司 | Vehicle diagnosis method, device and medium |
CN111796583A (en) * | 2020-08-21 | 2020-10-20 | 上海星融汽车科技有限公司 | Vehicle ECU (electronic control Unit) identification method and system and vehicle diagnosis equipment |
CN113377085A (en) * | 2021-06-29 | 2021-09-10 | 上海星融汽车科技有限公司 | Vehicle decoder communication parameter analysis system |
CN215835419U (en) * | 2021-09-27 | 2022-02-15 | 深圳市星卡软件技术开发有限公司 | Adaptive circuit and device based on OBD communication protocol |
CN114143273A (en) * | 2021-11-24 | 2022-03-04 | 深圳数马电子技术有限公司 | Channel allocation method, device, computer equipment and computer readable storage medium |
CN116701177A (en) * | 2023-04-28 | 2023-09-05 | 长城汽车股份有限公司 | Method and device for testing interface pins of vehicle-mounted diagnostic system and electronic equipment |
CN116775525A (en) * | 2023-06-02 | 2023-09-19 | 维沃移动通信有限公司 | Data transmission circuit, method, device, equipment and medium |
Also Published As
Publication number | Publication date |
---|---|
CN117640702B (en) | 2024-06-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111208800B (en) | Automobile diagnosis method and device and vehicle communication interface | |
CN109164789B (en) | Vehicle-mounted multimedia system for vehicle information diagnosis | |
WO2019141114A1 (en) | Vehicle diagnosis method and device | |
US20090306849A1 (en) | System for diagnosis of motor vehicles, and for reception of vehicles at a repair facility | |
CN113335208B (en) | Reverse image offline configuration method and system, storage medium and computer equipment | |
CN113406944B (en) | Vehicle diagnosis method, device, equipment and computer readable storage medium | |
CN112198863A (en) | Diagnostic function control method, system, storage medium, vehicle-mounted communication box and vehicle | |
JP4871238B2 (en) | Information collection system, operation information recording device and information management facility | |
CN111132076B (en) | Vehicle-mounted communication method and device, vehicle-mounted and terminal | |
CN110488794A (en) | A kind of vehicle trouble processing method, diagnostic device and storage medium | |
JP2006226805A (en) | On-vehicle failure diagnosis system | |
CN110545220A (en) | Automobile diagnosis protocol detection method and related product | |
CN108390863B (en) | Data processing method and device | |
CN114860276A (en) | Vehicle self-checking and motor writing method, device, equipment and storage medium | |
CN117640702B (en) | Communication protocol acquisition method and device, electronic equipment and storage medium | |
EP2789127B1 (en) | Self-learning automotive data logger identifying automotive messages transmitted over a can bus connecting automotive electronic control units | |
CN117590835A (en) | Protocol self-adaptive diagnosis method and device supporting vehicle OBD interface | |
JP2009126323A (en) | Vehicular failure-diagnosis system | |
CN112509176B (en) | Fault repair method and device based on vehicle data | |
CN111267755B (en) | State calibration method and device of vehicle-mounted equipment, terminal and readable storage medium | |
CN110737974A (en) | Method for standardized calibration of vehicle electronic seat and vehicle-mounted equipment | |
KR20030048598A (en) | Self diagnostic apparatus for automobile and diagnosis method using the same | |
CN117806279A (en) | Method and device for rapidly scanning automobile system and electronic equipment | |
CN114035551B (en) | Configuration method for vehicle remote diagnosis | |
KR101372548B1 (en) | Self diagnosis apparatus for automobile |
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 |