CN111399949A - Method for starting background debugging function of automobile instrument - Google Patents

Method for starting background debugging function of automobile instrument Download PDF

Info

Publication number
CN111399949A
CN111399949A CN202010255650.6A CN202010255650A CN111399949A CN 111399949 A CN111399949 A CN 111399949A CN 202010255650 A CN202010255650 A CN 202010255650A CN 111399949 A CN111399949 A CN 111399949A
Authority
CN
China
Prior art keywords
dcon
vehicle
socket
mounted system
parent process
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010255650.6A
Other languages
Chinese (zh)
Inventor
蓝剑威
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Marelli Automotive Electronics Guangzhou Co Ltd
Original Assignee
Marelli Automotive Electronics Guangzhou 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 Marelli Automotive Electronics Guangzhou Co Ltd filed Critical Marelli Automotive Electronics Guangzhou Co Ltd
Priority to CN202010255650.6A priority Critical patent/CN111399949A/en
Publication of CN111399949A publication Critical patent/CN111399949A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms

Abstract

The invention discloses a method for starting a debugging function at a background, which comprises the following steps: setting a vehicle-mounted key module entering a vehicle-mounted system to start a dcon parent process; creating a shell sub-process for capturing serial port data of the vehicle-mounted system, and creating two communication pipelines to enable the dcon parent process to be in two-way communication with the shell sub-process; the shell sub-process redirects the standard output, standard error and standard input of the dcon parent process and the shell sub-process through a dup2 function called by a vehicle-mounted system; the dcon parent process is in communication connection with the socket; and the socket of the vehicle-mounted system is in communication connection with the socket of the upper computer through TCP/UDP, and serial port data of the vehicle-mounted system of the dcon parent process is sent to the upper computer through the socket. According to the invention, serial port communication data of the vehicle-mounted system is captured by the shell child process and sent to the dcon parent process, the socket receives the serial port data of the vehicle-mounted system of the dcon parent process and sends the serial port data to the upper computer through the TCP/UDP communication protocol, a serial port communication line needing to be welded is omitted, the inside of a vehicle body is prevented from being disassembled and assembled, and the cost is reduced.

Description

Method for starting background debugging function of automobile instrument
Technical Field
The invention relates to the field of automobile instrument debugging, in particular to a method for starting a background debugging function of an automobile instrument.
Background
At present, after automobiles are assembled and leave factories and enter markets, due to safety considerations, data tampering caused by random invasion of others is prevented, and serial port communication functions of embedded parts (such as embedded parts of automobile instruments) installed inside the automobiles are shielded. When the automobile instrument has a BUG or system information in the dial plate of the automobile instrument needs to be acquired, a background debugging function of the automobile instrument needs to be started to debug and modify the automobile instrument. However, the dcon parent process (debug connection parent process) in the vehicle-mounted system does not have a command parsing function and cannot parse data, and therefore cannot be transmitted to the upper computer for debugging through a socket communication method. This requires dismantling and welding the serial communication line, restarting the serial function, and even modifying the internal code of the embedded product. This kind of mode needs to carry out the dismouting to the car inside, and not only the dismouting is troublesome, still can destroy the car structure at the dismouting in-process.
Disclosure of Invention
The invention provides a method for starting a background debugging function of an automobile instrument under the condition of not damaging the internal structure of the automobile instrument, so as to improve the convenience of debugging operation of the automobile instrument.
The invention discloses a method for starting a background debugging function of an automobile instrument, which comprises the following steps:
s1, the dcon father process calls a fork function through the vehicle-mounted system to establish a debugging connection shell sub-process (terminal resolver sub-process) which can capture and resolve the serial port data of the automobile instrument, and simultaneously initializes the socket communication function of the vehicle-mounted system;
s2, a first communication pipeline and a second communication pipeline are established between the dcon parent process and the shell child process to realize bidirectional communication, and the shell child process transfers data to the dcon parent process;
s3, the shell sub-process redirects the standard output, standard input and standard error of the dcon parent process and the shell sub-process through a vehicle-mounted system call dup2 function; enabling the dcon parent process to read the first communication pipeline and write the second communication pipeline, and enabling the shell child process to read the second communication pipeline and write the first communication pipeline;
s4, the dcon parent process is in communication connection with an upper computer through a socket, the dcon parent process calls a pselect function through the vehicle-mounted system to monitor the reading and writing states of the first communication pipeline and the second communication pipeline, if the first communication pipeline is monitored to be readable, the data of the first communication pipeline is read and written to the socket of the vehicle-mounted system, and if the socket is readable, the data of the socket is read and written to the second communication pipeline;
and S5, the socket of the vehicle-mounted system is in communication connection with the socket of the upper computer through TCP/UDP, and the serial port data of the vehicle-mounted system of the dcon parent process is sent to the upper computer through the socket.
According to the method for starting the background debugging function of the automobile instrument, a shell sub-process capable of capturing and analyzing serial port data of the automobile instrument is established in a vehicle-mounted system, and the serial port data can be analyzed; establishing two communication pipelines between the dcon parent process and the shell child process, and redirecting the standard output, the standard input and the standard error of the shell child process so that the shell child process and the dcon parent process can carry out mutual communication transmission of serial port data; the shell sub-process can receive a grabbing data command of the dcon parent process through the second communication pipeline, the first communication pipeline can transmit the grabbing analyzed automobile instrument data to the dcon parent process for packaging, a socket in the automobile instrument system receives the serial port data of the dcon parent process, the socket directly transmits the serial port data to the upper computer through a TCP/UDP communication protocol, the upper computer can communicate with the automobile system through a wireless network and transmit the serial port data for background debugging, the shell sub-process grabs and analyzes the serial port data of the automobile instrument, the analyzed serial port data are transferred to the upper computer through the dcon parent process, a serial port communication line is omitted, the inside of an automobile body is prevented from being disassembled and assembled, and cost is reduced.
Drawings
Fig. 1 is a flow chart of a method for starting a background debugging function of an automobile instrument.
Fig. 2 is a communication connection structure diagram of a method for starting a background debugging function of an automobile instrument.
Detailed Description
As shown in fig. 1, the method for starting the background debugging function of the automobile instrument, provided by the invention, comprises the following steps:
s1, the dcon father process calls a fork function through the vehicle-mounted system to establish a debugging connection shell child process which can capture and analyze serial port data of the automobile instrument, and simultaneously initializes the socket communication function of the vehicle-mounted system;
s2, a first communication pipeline and a second communication pipeline are established between the dcon parent process and the shell child process to realize bidirectional communication, and the shell child process transfers data to the dcon parent process;
s3, the shell sub-process redirects the standard output, standard input and standard error of the dcon parent process and the shell sub-process through a vehicle-mounted system call dup2 function; enabling the dcon parent process to read the first communication pipeline and write the second communication pipeline, and enabling the shell child process to read the second communication pipeline and write the first communication pipeline;
s4, the dcon parent process is in communication connection with an upper computer through a socket, the dcon parent process calls a pselect function through the vehicle-mounted system to monitor the reading and writing states of the first communication pipeline and the second communication pipeline, if the first communication pipeline is monitored to be readable, the data of the first communication pipeline is read and written to the socket of the vehicle-mounted system, and if the socket is readable, the data of the socket is read and written to the second communication pipeline;
and S5, the socket of the vehicle-mounted system is in communication connection with the socket of the upper computer through TCP/UDP, and the serial port data of the vehicle-mounted system of the dcon parent process is sent to the upper computer through the socket.
According to the method for starting the background debugging function of the automobile instrument, a shell sub-process capable of capturing and analyzing serial port data of the automobile instrument is established in a vehicle-mounted system, and the serial port data can be analyzed; establishing two communication pipelines between the dcon parent process and the shell child process, and redirecting the standard output, the standard input and the standard error of the shell child process so that the shell child process and the dcon parent process can carry out mutual communication transmission of serial port data; the shell sub-process can receive a grabbing data command of the dcon parent process through the second communication pipeline, the first communication pipeline can transmit the grabbing analyzed automobile instrument data to the dcon parent process for packaging, a socket in the automobile instrument system receives the serial port data of the dcon parent process, the socket directly transmits the serial port data to the upper computer through a TCP/UDP communication protocol, the upper computer can communicate with the automobile system through a wireless network and transmit the serial port data for background debugging, the shell sub-process grabs and analyzes the serial port data of the automobile instrument, the analyzed serial port data are transferred to the upper computer through the dcon parent process, a serial port communication line is omitted, the inside of an automobile body is prevented from being disassembled and assembled, and cost is reduced. The TCP/UDP communication connection between the upper computer and the vehicle-mounted system is realized through the socket port, so that not only can the interaction of serial port information be carried out, but also the transmission of files can be carried out.
In the method for starting the background debugging function of the automobile instrument, the step S1 further includes: s101, after the key is pressed twice within 10 seconds according to the sequence of the up, down, left, right and OK keys, the vehicle-mounted system starts the dcon parent process. By setting the key sequence function of the vehicle-mounted keys, the vehicle-mounted system can be quickly started, the dcon process is started, the serial port function is started for background debugging, and meanwhile, the background debugging function can be prevented from being started by mistake.
In the method for starting the background debugging function of the automobile instrument, the step S1 further includes: a key module which can trigger the vehicle-mounted system to start a dcon parent process is arranged in the vehicle-mounted system; when the key module is triggered, the vehicle-mounted system starts a dcon father process; and triggering the key module to enable the vehicle-mounted system to start the dcon parent process.
In the method for starting the background debugging function of the automobile instrument, the step S6 further includes the following steps: s601, after a dcon parent process of the vehicle-mounted operating system is started, popping up a message box on an instrument display screen to display an IP address of the dcon parent process; s602, a streaming socket and a datagram socket are built in the dcon parent process, connection preparation information is broadcasted to the network port 4320 through the datagram socket, and the upper computer process selects to build TCP connection with the upper computer process after receiving the broadcast connection preparation information of the vehicle-mounted system through the monitoring network port 4320. In the same local area network, after the network communication between the upper computer and the vehicle-mounted operating system is connected once through the TCP, the connection can be automatically established in the next connection, and the connection establishing time is saved.

Claims (4)

1. A method for starting a background debugging function of an automobile instrument is characterized by comprising the following steps:
s1, the dcon father process calls a fork function through the vehicle-mounted system to establish a debugging connection shell child process which can capture and analyze serial port data of the automobile instrument, and simultaneously initializes the socket communication function of the vehicle-mounted system;
s2, a first communication pipeline and a second communication pipeline are established between the dcon parent process and the shell child process to realize bidirectional communication, and the shell child process transfers data to the dcon parent process;
s3, the shell sub-process redirects the standard output, standard input and standard error of the dcon parent process and the shell sub-process through a vehicle-mounted system call dup2 function; enabling the dcon parent process to read the first communication pipeline and write the second communication pipeline, and enabling the shell child process to read the second communication pipeline and write the first communication pipeline;
s4, the dcon parent process is in communication connection with an upper computer through a socket, the dcon parent process calls a pselect function through the vehicle-mounted system to monitor the reading and writing states of the first communication pipeline and the second communication pipeline, if the first communication pipeline is monitored to be readable, the data of the first communication pipeline is read and written to the socket of the vehicle-mounted system, and if the socket is readable, the data of the socket is read and written to the second communication pipeline;
and S5, the socket of the vehicle-mounted system is in communication connection with the socket of the upper computer through TCP/UDP, and the serial port data of the vehicle-mounted system of the dcon parent process is sent to the upper computer through the socket.
2. The method for starting the background debugging function of the automobile instrument as claimed in claim 1, wherein the step S1 further comprises:
s101, after the key is pressed twice within 10 seconds according to the sequence of the up, down, left, right and OK keys, the vehicle-mounted system starts the dcon parent process.
3. The method for starting the background debugging function of the automobile instrument as claimed in claim 1, wherein the step S1 further comprises:
a key module which can trigger the vehicle-mounted system to start a dcon parent process is arranged in the vehicle-mounted system; when the key module is triggered, the vehicle-mounted system starts a dcon parent process.
4. The method for starting the background debugging function of the automobile instrument as claimed in claim 1, wherein the step S6 further comprises the steps of:
s601, after a dcon parent process of the vehicle-mounted operating system is started, popping up a message box on an instrument display screen to display an IP address of the dcon parent process;
s602, a streaming socket and a datagram socket are built in the dcon parent process, connection preparation information is broadcasted to the network port 4320 through the datagram socket, and the upper computer process selects to build TCP connection with the upper computer process after receiving the broadcast connection preparation information of the vehicle-mounted system through the monitoring network port 4320.
CN202010255650.6A 2020-04-02 2020-04-02 Method for starting background debugging function of automobile instrument Pending CN111399949A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010255650.6A CN111399949A (en) 2020-04-02 2020-04-02 Method for starting background debugging function of automobile instrument

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010255650.6A CN111399949A (en) 2020-04-02 2020-04-02 Method for starting background debugging function of automobile instrument

Publications (1)

Publication Number Publication Date
CN111399949A true CN111399949A (en) 2020-07-10

Family

ID=71433596

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010255650.6A Pending CN111399949A (en) 2020-04-02 2020-04-02 Method for starting background debugging function of automobile instrument

Country Status (1)

Country Link
CN (1) CN111399949A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112162919A (en) * 2020-09-11 2021-01-01 上海擎感智能科技有限公司 Debugging method and system for vehicle-mounted equipment and computer readable storage medium
CN115469943A (en) * 2022-09-22 2022-12-13 安芯网盾(北京)科技有限公司 Detection method and device for JAVA virtual terminal command execution

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101420312A (en) * 2007-10-22 2009-04-29 株洲南车时代电气股份有限公司 Debugging method and system for vehicle mounted apparatus
CN103577209A (en) * 2012-08-06 2014-02-12 浙江大华技术股份有限公司 Embedded equipment-based application program remote on-line debugging method and device
CN106445762A (en) * 2016-08-29 2017-02-22 广州视源电子科技股份有限公司 Complete equipment debugging method and system
CN106528199A (en) * 2016-09-29 2017-03-22 未来汽车科技(深圳)有限公司 Method and terminal for updating automobile instrument panel system
CN107908576A (en) * 2017-12-08 2018-04-13 上海市共进通信技术有限公司 The method for realizing re-direction applications program standard output control
CN109740342A (en) * 2018-12-20 2019-05-10 深圳市网心科技有限公司 Obtain method, system, computer installation and storage medium that shell executes permission

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101420312A (en) * 2007-10-22 2009-04-29 株洲南车时代电气股份有限公司 Debugging method and system for vehicle mounted apparatus
CN103577209A (en) * 2012-08-06 2014-02-12 浙江大华技术股份有限公司 Embedded equipment-based application program remote on-line debugging method and device
CN106445762A (en) * 2016-08-29 2017-02-22 广州视源电子科技股份有限公司 Complete equipment debugging method and system
CN106528199A (en) * 2016-09-29 2017-03-22 未来汽车科技(深圳)有限公司 Method and terminal for updating automobile instrument panel system
CN107908576A (en) * 2017-12-08 2018-04-13 上海市共进通信技术有限公司 The method for realizing re-direction applications program standard output control
CN109740342A (en) * 2018-12-20 2019-05-10 深圳市网心科技有限公司 Obtain method, system, computer installation and storage medium that shell executes permission

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112162919A (en) * 2020-09-11 2021-01-01 上海擎感智能科技有限公司 Debugging method and system for vehicle-mounted equipment and computer readable storage medium
CN112162919B (en) * 2020-09-11 2024-03-12 上海擎感智能科技有限公司 Debugging method and system of vehicle-mounted equipment and computer readable storage medium
CN115469943A (en) * 2022-09-22 2022-12-13 安芯网盾(北京)科技有限公司 Detection method and device for JAVA virtual terminal command execution
CN115469943B (en) * 2022-09-22 2023-05-16 安芯网盾(北京)科技有限公司 Detection method and device for command execution of JAVA virtual terminal

Similar Documents

Publication Publication Date Title
US10586217B2 (en) Automotive ECU mobile phone interface
CN111399949A (en) Method for starting background debugging function of automobile instrument
Zaldivar et al. Providing accident detection in vehicular networks through OBD-II devices and Android-based smartphones
US6956501B2 (en) Wireless link for car diagnostics
JP4805990B2 (en) MONITOR COMMUNICATION TERMINAL MONITOR DEVICE AND MONITOR CONTROL METHOD
US20140121888A1 (en) Method, server and system for vehicle diagnosis
KR20010103907A (en) Automotive self diagnostic System for using communication network
US7475287B2 (en) System and method for remotely controlling a debugging unit
US20140297097A1 (en) System and method for generating alerts
KR20080041200A (en) Modem with acoustic coupling
CN102700480A (en) Vehicle-mounted head-up display and OBD (On-Board Diagnostic) data processing method based on same
KR101684405B1 (en) Apparatus and method for analyzing error in portable terminal
US20150170435A1 (en) Intelligent, Cloud-Based, and Real-Time Vehicle Care System
CN111427335A (en) Vehicle remote diagnosis method, equipment connector and vehicle connector
CN111552266B (en) Vehicle remote diagnosis method, system, equipment connector and vehicle connector
KR100794130B1 (en) Automatic Function Testing Equipment for Application Software and Additional Service of Mobile Communication Terminal
CN115249386A (en) Remote assistance diagnosis system
CN105303644A (en) Tachograph or vehicle-mounted rearview mirror photo taking checking method and system
CN115373367A (en) Automobile remote diagnosis method, system, diagnostic instrument and terminal equipment
CN115248580A (en) Remote assistance diagnosis method and system
CN112492546A (en) Automobile control method and system and readable storage medium
CN114333231B (en) Emergency call management method, device, vehicle and storage medium
EP1736020A2 (en) Method for analyzing the operation of a radiocommunication terminal, corresponding radiocommunication terminal and analysis device
Dârloşan et al. Intra-car communications and diagnosis solutions
KR100574538B1 (en) System and method for checking car's state using mobile

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: 20200710

RJ01 Rejection of invention patent application after publication