CN106549844B - A kind of MOST-CAN gateway and the diagnosis packet routing method based on the gateway - Google Patents

A kind of MOST-CAN gateway and the diagnosis packet routing method based on the gateway Download PDF

Info

Publication number
CN106549844B
CN106549844B CN201610957120.XA CN201610957120A CN106549844B CN 106549844 B CN106549844 B CN 106549844B CN 201610957120 A CN201610957120 A CN 201610957120A CN 106549844 B CN106549844 B CN 106549844B
Authority
CN
China
Prior art keywords
message
diagnosis
address
processing module
diagnosing protocol
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610957120.XA
Other languages
Chinese (zh)
Other versions
CN106549844A (en
Inventor
孙琦
耿琦
陈宇鹏
崔茂源
厉健峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
FAW Group Corp
Original Assignee
FAW Group Corp
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 FAW Group Corp filed Critical FAW Group Corp
Priority to CN201610957120.XA priority Critical patent/CN106549844B/en
Publication of CN106549844A publication Critical patent/CN106549844A/en
Application granted granted Critical
Publication of CN106549844B publication Critical patent/CN106549844B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/08Protocols for interworking; Protocol conversion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40052High-speed IEEE 1394 serial bus
    • H04L12/40078Bus configuration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN

Abstract

The invention discloses a kind of MOST-CAN gateway and the diagnosis packet routing method based on the gateway, it is intended to realize access of the external diagnostic equipment to the controller on vehicle on MOST network;MOST-CAN network gateway includes: CAN diagnosing protocol processing module, data memory module, MOST-CAN diagnosing protocol conversion module, MOST diagnosing protocol processing module and diagnosis message routing table, and MOST-CAN diagnosis packet routing method of the invention includes: that CAN diagnosis message is converted to the method for routing of MOST diagnosis message and MOST diagnosis message is converted to the method for routing of CAN diagnosis message;MOST-CAN gateway provided by the invention and diagnosis packet routing method, transmitting and receiving, the MOST of the connection, CAN diagnosis message that realize external diagnostic equipment and vehicle MOST network controller diagnose the transmitting and receiving of message, MOST-CAN diagnoses the protocol conversion of message and provides the memory space of temporal data, to realize access of the external diagnostic equipment to MOST network controller on vehicle.

Description

A kind of MOST-CAN gateway and the diagnosis packet routing method based on the gateway
Technical field
The present invention relates to automobile bus fields, are a kind of MOST-CAN gateway and the diagnosis message routing side based on the gateway Method, and in particular to a kind of gateway for being able to achieve CAN and MOST diagnosis message conversion and the diagnosis message routing based on the gateway Method.
Background technique
With becoming increasingly abundant for automobile function, automotive bus technology is also evolving.Wherein, CAN bus and MOST are total Line is all widely used automobile bus.
CAN bus is the abbreviation of " Controller Area Network BUS technology (Controller Area Network-BUS) ", it With extremely strong anti-interference and error correcting capability, it is widely used in vehicle power system controller, chassis system controller, vehicle body and relaxes Information transmission between suitable system controller etc..CAN bus based diagnostic techniques and diagnosing protocol are all very mature.It is opening (physical layer, network layer, transport layer session layer, expression layer, is answered at data link layer in place system Interconnect Reference Model seven-layer structure With layer), there is corresponding international standard diagnosing protocol to be corresponding to it.Vehicle EOL off-line test equipment and after sale diagnostic equipment It is connect, is realized to controller (Electronic Control each on vehicle with vehicle OBD diagnosis connector using CAN bus Unit, ECU) access.
A kind of bus mark of the MOST (Media Oriented Systems Transport) as multimedia information system Standard is used for car multimedia amusement and telematics device.MOST network with its high speed, low cost, anti-interference, light weight, The advantages such as flexible become the core network of many vehicle-mounted digital multimedia systems.Entertain host, DTV, rear seat entertainment system The nodes such as system, DVD pass through MOST bus transfer audio, video data and control information.But the diagnostic techniques based on MOST bus It is also immature, it there is no the diagnosing protocol based on MOST bus of international standard.
Currently, the functions overwhelming majority such as the off-line test of each controller of vehicle, after sale fault diagnosis, program upgrading is logical Cross what CAN bus based diagnostic techniques was realized.MOST since the diagnostic techniques based on MOST bus is still immature, on vehicle The controllers such as node, such as amusement host, DTV, rear seat entertainment system, DVD can't realize failure by MOST bus Diagnosis, version management, program more new function.If it is this dedicated for diagnosis to increase CAN interface all the way on these controllers Scheme does not use the advantage of MOST bus high bandwidth and high speed rate not only, also will cause the waste of controller resource, increases yet The complexities of overall wire sheaves.It, can greatly if increasing MOST interface in vehicle off-line test equipment and after sale diagnostic equipment Increase the cost and development difficulty of equipment supplier.
Therefore, the method for routing for studying CAN and MOST diagnosis message realizes that external diagnostic equipment can directly access MOST Controller on network, has a very important significance.
Summary of the invention
In order to solve the problems existing in the prior art, the purpose of the present invention is to provide one kind to be able to achieve MOST-CAN diagnosis association The gateway of conversion and the diagnosis packet routing method based on the gateway are discussed, can effectively be carried out CAN and MOST diagnosis message Access of the external diagnostic equipment to MOST network controller on vehicle is realized in conversion.
The technical scheme of the present invention is realized as follows:
A kind of MOST-CAN gateway characterized by comprising
CAN diagnosing protocol processing module: MOST-CAN gateway is total by CAN diagnosing protocol processing module and external CAN Line connection sends and receives CAN diagnosis message.
Data memory module: storage CAN diagnoses message.
MOST-CAN diagnosing protocol conversion module: realize that CAN diagnosis message and MOST diagnosis message are converted mutually.
MOST diagnosing protocol processing module: MOST-CAN gateway passes through MOST diagnosing protocol processing module and external MOST Bus connection sends and receives MOST diagnosis message.
Diagnose message routing table: the controller on each MOST network defines four kinds of addresses: 1) external diagnostic equipment is to control The functional addressing of device processed diagnoses request address, is the address of CAN diagnosis message.2) external diagnostic equipment seeks the physics of controller Location diagnoses request address, is the address of CAN diagnosis message.3) controller is to the physical addressing diagnostic response of external diagnostic equipment Location is the address of CAN diagnosis message.4) device address of controller is the address of MOST diagnosis message;Diagnose message routing table The corresponding above four kinds of addresses of controller on each MOST network are defined, the CAN that controller issues is diagnosed in message or MOST There are one of above four kinds of addresses in diagnosis message.
CAN diagnosis message is screened according to diagnosis message routing table and received to CAN diagnosing protocol processing module, then will receive CAN diagnosis message store into data memory module, MOST-CAN diagnosing protocol conversion module will be in data memory module CAN diagnosis message is converted into MOST diagnosis message, and MOST diagnosing protocol processing module sends the MOST diagnosis message after conversion Onto MOST bus.
MOST diagnosing protocol processing module screens according to diagnosis message routing table and receives MOST diagnosis message, MOST-CAN MOST diagnosis message is converted into CAN diagnosis message by diagnosing protocol conversion module, and CAN diagnosing protocol processing module will be after conversion CAN diagnosis message is sent in CAN bus.
The present invention also provides a kind of diagnosis packet routing methods based on MOST-CAN gateway, including CAN to MOST to examine Disconnected packet routing method and MOST to CAN diagnose packet routing method, which is characterized in that steps are as follows:
Step 1: CAN diagnosis message is converted to MOST diagnosis message;
1) CAN diagnosing protocol processing module receives CAN and diagnoses message;First according to diagnosis message routing table to CAN bus On CAN message screened, if message address be diagnosis message routing table defined in external diagnostic equipment to controller Functional addressing diagnosis request address either external diagnostic equipment request address is diagnosed to the physical addressing of controller, then this CAN message is the CAN diagnosis message that be received, and CAN diagnosing protocol processing module can just receive, and be routed according to diagnosis Table finds the device address of controller corresponding with this address and controller rings the physical addressing diagnosis of external diagnostic equipment Answer address;
2) process 1 in CAN diagnosing protocol processing module receiving step one) filter out CAN diagnosis message;Basis first Table 3 in the 8.5th chapters and sections of ISO15765-2 international standard of publication in 2011 judges the type of this diagnosis message;If it is Single frames diagnoses message, and CAN diagnosing protocol processing module directly receives, and then extracts the A_DATA data in this message, i.e., The A_DATA data in A_PDU that the 7.2nd chapter defines in the ISO14229-1 international standard of publication in 2013, storage to data are deposited It stores up in module;Message is diagnosed if it is first frame, CAN diagnosing protocol processing module is international according to the ISO15765-2 of publication in 2011 Standard replys flow control frames, wherein FS parameter is equal to 0, BS parameter and is equal to 00, and the message address of flow control frames is using the mistake in step 1 Journey 1) the inquiry obtained controller of diagnosis message routing table is to the physical addressing diagnostic response address of external diagnostic equipment, then root The class of subsequent CAN diagnosis message is judged according to the Table 3 in the 8.5th chapters and sections of ISO15765-2 international standard of publication in 2011 Type diagnoses message if it is successive frame, and CAN diagnosing protocol processing module all receives, finally, CAN diagnosing protocol processing module A_DATA data in first frame and successive frame are connected according to the received order of message and are stored into data memory module;
3) MOST-CAN diagnosing protocol conversion module realizes the conversion of CAN diagnosis message and MOST diagnosis message;By step Process 2 in one) the A_DATA data that store in data memory module are converted to MOST diagnosis message;
MOST diagnosis message is made of MOST header data and data field;
MOST header data is successively by the device address of controller, function block identifier, functional block example, function identification Symbol, action type composition.Wherein, the length of the device address of controller is 2 bytes, i.e. process 1 in step 1) it finds Device address;Function block identifier accounts for 1 byte, using diagnostic function block identifier.Functional block example accounts for 1 byte.Letter Number identifier accounts for 12.Action type accounts for 4;
MOST data field by encapsulation head version, application layer diagnostic service data field length, protocol type, using layer diagnosis Service data domain composition;Wherein, encapsulation head version accounts for 1 byte;Application layer diagnostic service data field length accounts for 4 bytes, Indicate the length of application layer diagnostic service data field;Protocol type accounts for 1 byte, indicates diagnosing protocol type.Using layer diagnosis Service data domain is variable-length, the A_DATA data that storage is defined according to the 7.2nd chapter in the ISO14229-1 of publication in 2013;
4) message after conversion is dealt into MOST bus by MOST diagnosing protocol processing module;
Two, MOST diagnosis message is converted into CAN diagnosis message:
1) MOST diagnosing protocol processing module receives MOST and diagnoses message, carries out first to the MOST message in MOST bus Screening, need to meet following two screening conditions simultaneously: first, the function block identifier in the header data of the MOST message is necessary It is diagnostic function block identifier;Second, the device address in the header data of the MOST message must be in diagnosis routing table Definition;;The MOST message for meeting conditions above is the MOST diagnosis message that be received, and MOST diagnosing protocol handles mould Block can just receive, and issue MOST-CAN diagnosing protocol conversion module, meanwhile, according in diagnosis routing table lookup and this message Physical addressing diagnostic response address of the corresponding controller in device address to external diagnostic equipment;
2) MOST-CAN diagnosing protocol conversion module identifies controller to external diagnostic equipment according to diagnosis routing table Physical addressing diagnostic response address, and will be from the process 1 in step 2) the application layer diagnosis in received MOST diagnosis message takes Business data field extracts, and issues CAN diagnosing protocol processing module;
3) ISO15765-1 of the CAN diagnosing protocol processing module according to publication in 2011, the ISO15765- of publication in 2011 The ISO15765-3 of publication in 2,2004 years, the ISO14229-1 international standards of 2013 publications are by the process 1 in step 2) and step Process 2 in two) the physical addressing diagnostic response address and application layer diagnostic service of the controller that receives to external diagnostic equipment Data are converted into CAN diagnosis message and are dealt into CAN bus;
The positive effect of the present invention is:
1. MOST-CAN gateway provided by the invention is connected to external diagnostic equipment and vehicle MOST network controller, this hair The MOST-CAN diagnosis packet routing method of bright offer realizes the mutual conversion of CAN diagnosis message and MOST diagnosis message, from And access of the external diagnostic equipment to MOST network controller on vehicle is realized, it is the off-line test and diagnostic equipment after sale of vehicle Solution is provided to the detection and maintenance of MOST network controller.
2. diagnosis message routing table provided by the invention realizes the effective right of CAN message address and the device address MOST It answers, and CAN diagnosing protocol conversion module and MOST diagnosing protocol conversion module all can be total to CAN according to diagnosis message routing table The MOST message in CAN message and MOST bus on line is screened, to make MOST-CAN diagnosing protocol conversion module pair CAN message and MOST message are targetedly converted, and are only converted message in need, are improved transfer efficiency.
3. CAN diagnosing protocol processing module provided by the invention can reply flow control frames for the first frame diagnosis message filtered out Message so that subsequent successive frame diagnosis message all be received and stored in data module, then is diagnosed by MOST-CAN Protocol conversion module is converted into MOST diagnosis message, and is dealt into MOST bus by MOST diagnosing protocol conversion module, effectively The high advantage of MOST bus bandwidth is utilized, improves message transmissions efficiency.
Detailed description of the invention
Fig. 1 is a kind of system structure diagram of the MOST-CAN gateway of the present invention in application;
Fig. 2 is that a kind of CAN of diagnosis packet routing method based on MOST-CAN gateway of the present invention diagnoses message Packet routing method is diagnosed to MOST;
Fig. 3 is that a kind of MOST of diagnosis packet routing method based on MOST-CAN gateway of the present invention diagnoses message Packet routing method is diagnosed to CAN;
Fig. 4 is that the single frames CAN in a kind of diagnosis packet routing method based on MOST-CAN gateway of the present invention is examined Disconnected message and MOST diagnose message transition diagram;
Fig. 5 is that the multiframe CAN in a kind of diagnosis packet routing method based on MOST-CAN gateway of the present invention is examined Disconnected message and MOST diagnose message transition diagram;
Fig. 6 is MOST to the CAN in a kind of diagnosis packet routing method based on MOST-CAN gateway of the present invention Diagnose message routing step schematic diagram.
Specific embodiment
The present invention will be further described with reference to the accompanying drawings and examples:
For gateway application of the present invention in automobile bus field, application scenarios are as shown in Fig. 1.External diagnostic equipment is logical It crosses CAN bus and vehicle is connected to the network.There are several controllers using MOST bus transfer information on vehicle, and total by MOST Line connects into MOST loop network.Gateway of the invention has CAN bus and MOST bus communication interface, in MOST loop network In, it as a node of MOST loop network, while being also a node of vehicle CAN network, it can be with external diagnostic equipment Communication.
Such as Fig. 1, gateway of the invention includes CAN diagnosing protocol processing module: MOST-CAN gateway passes through CAN diagnosing protocol Processing module is connect with external CAN bus, sends and receives CAN diagnosis message.Data memory module: storage CAN diagnosis report Text.MOST-CAN diagnosing protocol conversion module: realize that CAN diagnosis message and MOST diagnosis message are converted mutually.MOST diagnosis association View processing module: MOST-CAN gateway is connect by MOST diagnosing protocol processing module with external MOST bus, is sent and is connect It receives MOST and diagnoses message.Message is diagnosed for CAN, is received by CAN diagnosing protocol processing module, is sent to data memory module, It is converted again through MOST-CAN diagnosing protocol conversion module, it is total to be finally sent to MOST by MOST diagnosing protocol processing module Line.
Message is diagnosed for MOST, is received by MOST diagnosing protocol processing module, MOST-CAN diagnosing protocol is sent to and turns Mold changing block is converted, and is finally sent to CAN bus by CAN diagnosing protocol processing module.
Table 1 diagnoses message routing table
The diagnosis message that gateway need to forward is defined by diagnosis message routing table.Design diagnosis routing table, such as table 1, diagnosis report Literary routing table is made of five column, and first row is controller title.Secondary series is functional addressing of the external diagnostic equipment to controller Request address is diagnosed, is CAN diagnosis message address.Third column are physical addressing diagnosis request of the external diagnostic equipment to controller Address is CAN diagnosis message address.4th column are physical addressing diagnostic response address of the controller to external diagnostic equipment, are CAN diagnoses message address.5th column are the device addresses of controller.It is MOST diagnosis message address.It is fixed to diagnose message routing table These four corresponding addresses of controller on each MOST network of justice.The CAN network or MOST network diagnosis that controller issues There are one of above 4 kinds of addresses in message.If the diagnosis message in CAN network or the diagnosis message on MOST network Not in this routing table, gateway will not be forwarded for address.
If attached drawing 2 is process of the CAN network diagnosis message routing to MOST network.
CAN diagnosing protocol processing module can screen CAN message according to diagnosis routing table.If message address with examine External diagnostic equipment in disconnected routing table diagnoses request address or external diagnostic equipment to controller to the functional addressing of controller Physical addressing diagnosis request ground external diagnostic equipment it is identical to the functional addressing of controller diagnosis request address location, then CAN Diagnosing protocol processing module can receive this message.
The CAN that CAN diagnosing protocol processing module receives and screens diagnoses message.Such as attached drawing 3, issued first according to 2011 The 8.5th chapters and sections of ISO15765-2 international standard in Table 3 judge the type of this message.Message is diagnosed if it is single frames, CAN diagnosing protocol processing module directly receives, and then extracts the A_DATA data in this message, i.e., publication in 2013 The A_DATA data in A_PDU that the 7.2nd chapter defines in ISO14229-1 international standard are stored into data memory module.Such as Fruit is first frame diagnosis message, and CAN network diagnosing protocol processing module replys flow control frames according to the ISO15765-2 of publication in 2011, Wherein, FS parameter is equal to 0, BS parameter and is equal to 00, the control that the message address of flow control frames is obtained using inquiry diagnosis message routing table Device processed is to the physical addressing diagnostic response address of external diagnostic equipment, then again by the successive frame message in following CAN bus It all receives, after then being judged according to the Table 3 in the 8.5th chapters and sections of ISO15765-2 international standard of publication in 2011 The type of continuous CAN diagnosis message, diagnoses message if it is successive frame, and CAN diagnosing protocol processing module all receives, finally, A_DATA data in first frame and successive frame are connected and are deposited according to the received order of message by CAN diagnosing protocol processing module Storage is into data memory module.
MOST-CAN diagnosing protocol conversion module realizes the conversion of CAN diagnosis message and MOST diagnosis message, and data are deposited The A_DATA data stored in storage module are converted to MOST diagnosis message.
MOST diagnosis message is made of MOST header data and data field.
MOST header data is successively by the device address of controller, function block identifier, functional block example, function identification Symbol, action type composition.Wherein, the length of the device address of controller is 2 bytes, and function block identifier accounts for 1 byte, adopts With diagnostic function block identifier, it is defined as 0x06.Functional block example accounts for 1 byte.Function identifier accounts for 12.Action type accounts for 4.
MOST data field by encapsulation head version, application layer diagnostic service data field length, protocol type, using layer diagnosis Service data domain composition.Wherein, encapsulation head version accounts for 1 byte, indicates the version of encapsulation head type, is defined as 0x01. Application layer diagnostic service data field length accounts for 4 bytes, indicates application layer diagnostic service data field, that is, A_DATA length.Agreement Type accounts for 1 byte, indicates diagnosing protocol type, and being defined as 0x01 indicates ISO14229-1 international standard.It is taken using layer diagnosis Business data field is variable-length, and storage defines A_DATA data in the ISO14229-1 international standard according to publication in 2013.
Message is diagnosed for single frames CAN as shown in Fig. 4 and MOST diagnoses message transition diagram.Message is diagnosed according to CAN CAN message address, look into diagnosis routing table obtain MOST diagnosis message device address.CAN diagnoses the A_DATA number in message According to storing to data memory module, and fill to the application layer diagnostic service data field of MOST diagnosis message.
Message is diagnosed for multiframe CAN as shown in Fig. 5 and MOST diagnoses message transition diagram.It will be in first frame and successive frame A_DATA1 to A_DATAn data once connect composition A_DATA, store to data memory module, filling to MOST, which diagnoses, to be reported In application layer diagnostic service data field in text.
If attached drawing 6 is MOST to CAN diagnosis message routing step schematic diagram.
MOST diagnosing protocol processing module receives MOST and diagnoses message, screens first to MOST message, the first step is sentenced Whether the function block identifier in the header data of the MOST message of breaking is diagnostic function block identifier.Second step, judgement should Whether the device address in the header data of MOST message defines in diagnosis routing table.MOST diagnosing protocol processing module receives The MOST diagnosis filtered out and issues MOST-CAN diagnosing protocol conversion module at message, meanwhile, according to diagnosis routing table lookup with The physical addressing diagnostic response address of the corresponding controller in device address in this message to external diagnostic equipment.
MOST-CAN diagnosing protocol conversion module finds controller to the physics of external diagnostic equipment according to diagnosis routing table Diagnostic response address is addressed, and the application layer diagnostic service data field in MOST network diagnosis message is extracted, issues CAN Diagnosing protocol processing module.
CAN diagnosing protocol the processing module ISO15765-1 according to publication in 2011, the ISO15765-2 of publication in 2011, The ISO15765-3 of publication in 2004, the ISO14229-1 international standard of publication in 2013 by the 2) controller that step receives it is external The physical addressing diagnostic response address of portion's diagnostic device and application layer diagnostic service data are converted into CAN diagnosis message and are dealt into CAN In bus.
Illustrate specific embodiment by taking two diagnostic services as an example.
1. designing gateway routing table
Such as table 2, gateway routing table is designed by taking three controllers on MOST network as an example.First row controller indicates MOST Node there are three on network, is A, B and C respectively.Secondary series is that external diagnostic equipment asks the functional addressing diagnosis of controller Seek address 0x7DF.Third column be external diagnostic equipment to the physical addressing of controller diagnose request address 0x7A0,0x7B0 and 0x7C0.4th column are physical addressing diagnostic response address 0x7A8,0x7B8 and the 0x7C8 of controller to external diagnostic equipment.The Five column are device address 0x140,0x141 and 0x142 of controller.
2 gateway routing table of table
2. external diagnostic equipment sends single frames CAN diagnosis message such as table 3 is the list that external diagnostic equipment is dealt into CAN bus The address of frame message and data field.
3 single frames message of table
1) the CAN diagnosing protocol processing module of gateway judges the address of this message, and 0x7A0 is net defined in routing table It closes selection and receives this message.
2) this message is judged according to the Table 3 in the 8.5th chapters and sections of ISO15765-2 international standard of publication in 2011 Type is single frames.
3) CAN diagnosing protocol processing module receives this message, then extracts A_DATA data 0x11,0x01.
4) CAN diagnosis message is converted into MOST diagnosis message.Device address diagnoses corresponding with 0x7A0 in routing table 0x0140.Function block identifier is defined as diagnostic function block identifier 0x06, other are according to actual definition.Encapsulate head version This grade is defined by table 4.The definition of this embodiment such as table 6.
The definition of 4 embodiment MOST diagnostic data domain of table
Syllable sequence Data field Length (byte) Virtual value hex
1 Encapsulate head version 1 01
2..5 Data field length 4 00 00 00 02
6 Protocol type 1 01
7..8 Application layer diagnostic service data field 2 11 01
5) this message is dealt into MOST bus by MOST diagnosing protocol processing module.
2. it is as follows that external diagnostic equipment sends multiframe diagnosis design of EDI messages multiframe diagnosis message:
First frame:
Successive frame:
1) the CAN diagnosing protocol processing module of gateway judges the address of this message, and 0x7B0 is net defined in routing table It closes selection and receives this message.
2) this message is judged according to the Table 3 in the 8.5th chapters and sections of ISO15765-2 international standard of publication in 2011 Frame and successive frame headed by type.
3) CAN diagnosing protocol processing module provides flow control frames, and wherein FS parameter is equal to 0, BS parameter and is equal to 00.Flow control frames Message address is 0x7A8.Successive frame will be dealt into CAN bus by controller A after receiving flow control frames.CAN network diagnosis Protocol process module continues to whole successive frames.
4) by the A_ in A_DATA1 the data 0x2E, 0xF1,0xAA, 0x01,0x02,0x03 and successive frame in first frame DATA2 data 0x04,0x05,0x06,0x07,0x08 are extracted.And it is sequentially connected composition A_DATA data 0x2E, 0xF1, 0xAA, 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08 composition store this into data memory module.
5) CAN diagnosis message is converted into MOST diagnosis message.Device address diagnoses corresponding with 0x7B0 in routing table 0x0141.Function block identifier is defined as diagnostic function block identifier 0x06, other are according to actual definition.Encapsulate head version This grade is defined by table 5.The definition of this embodiment such as table 6.
The definition of 5 embodiment MOST diagnostic data domain of table
Syllable sequence Data field Length (byte) Virtual value hex
1 Encapsulate head version 1 01
2..5 Data field length 4 00 00 00 02
6 Protocol type 1 01
7..17 Application layer diagnostic service data field 11 2E F1AA 01 02 03 04 05 06 07 08
6) this message is dealt into MOST bus by MOST diagnosing protocol processing module.
3.MOST network node sends diagnosis message and is directed to above-mentioned diagnosis message, after MOST network controller receives, meeting Corresponding diagnosis message is issued as response.
Message is diagnosed for single frames, the A_DATA diagnostic data in diagnostic response message that MOST network controller issues is 0x51,0x01.Function block identifier is 0x06, and device address is 0x0140.
Message is diagnosed for multiframe, the A_DATA diagnostic data in diagnostic response message that MOST network controller provides is 0x6E, 0xF1,0xAA.Function block identifier is 0x06, and Device ID is 0x0141.
For this two messages, the processing mode of gateway is identical, illustrates by taking the response of single frames diagnosis message as an example.
1) the MOST diagnosing protocol processing module of gateway judges that the function block identifier of this message is 0x06, and device address is 0x0140 is defined in routing table, and gateway selection receives this message.
2) MOST-CAN diagnosing protocol conversion module finds diagnosis corresponding with device address 0x0140 according to routing table and rings Answer address 0x7A8.Meanwhile extracting application layer diagnostic service data 0x51,0x01.
3) this message is dealt into CAN bus by CAN diagnosing protocol processing module.Format is as follows:
The embodiment of the present application can provide as method, system or computer program product.The embodiment of the present application is not limited to Any specific hardware and software combines.
The method that the embodiment of the present application proposes has passed through experimental verification.According to the method, develop can be realized CAN and The gateway controller of MOST diagnostic message routing, and increase accordingly on original rear seat entertainment system for supporting MOST bus Software module uses CANoe as diagnostic equipment.Through laboratory combined debugging, it was demonstrated that the method is practical.

Claims (2)

1. a kind of MOST-CAN gateway characterized by comprising
CAN diagnosing protocol processing module: MOST-CAN gateway is connected by CAN diagnosing protocol processing module and external CAN bus It connects, sends and receives CAN diagnosis message;
Data memory module: storage CAN diagnoses message;
MOST-CAN diagnosing protocol conversion module: realize that CAN diagnosis message and MOST diagnosis message are converted mutually;
MOST diagnosing protocol processing module: MOST-CAN gateway passes through MOST diagnosing protocol processing module and external MOST bus Connection sends and receives MOST diagnosis message;
Diagnose message routing table: the controller on each MOST network defines four kinds of addresses: 1) external diagnostic equipment is to controller Functional addressing diagnose request address, be CAN diagnosis message address;2) external diagnostic equipment examines the physical addressing of controller Disconnected request address is the address of CAN diagnosis message;3) controller is to the physical addressing diagnostic response address of external diagnostic equipment, It is the address of CAN diagnosis message;4) device address of controller is the address of MOST diagnosis message;It is fixed to diagnose message routing table The corresponding above four kinds of addresses of controller on each MOST network of justice, the CAN that controller issues is diagnosed in message or MOST is examined There are one of above four kinds of addresses in disconnected message;
CAN diagnosis message is screened according to diagnosis message routing table and received to CAN diagnosing protocol processing module, then will be received CAN diagnosis message is stored into data memory module, and MOST-CAN diagnosing protocol conversion module is by the CAN in data memory module Diagnosis message is converted into MOST diagnosis message, and MOST diagnosing protocol processing module sends the MOST diagnosis message after conversion to In MOST bus;
MOST diagnosing protocol processing module screens according to diagnosis message routing table and receives MOST diagnosis message, MOST-CAN diagnosis MOST diagnosis message is converted into CAN diagnosis message by protocol conversion module, and CAN diagnosing protocol processing module is by the CAN after conversion Diagnosis message is sent in CAN bus.
2. a kind of diagnosis packet routing method based on MOST-CAN gateway described in claim 1, which is characterized in that step is such as Under:
Step 1: CAN diagnosis message is converted to MOST diagnosis message;
1) CAN diagnosing protocol processing module receives CAN and diagnoses message;First according to diagnosis message routing table in CAN bus CAN message is screened, if message address is to diagnose external diagnostic equipment defined in message routing table to the function of controller Diagnosis request address either external diagnostic equipment can be addressed, request address is diagnosed to the physical addressing of controller, then this CAN Message is the CAN diagnosis message that be received, and CAN diagnosing protocol processing module can just receive, and according to diagnosis routing table The device address for finding controller corresponding with this address and controller are to the physical addressing diagnostic response of external diagnostic equipment Address;
2) process 1 in CAN diagnosing protocol processing module receiving step one) filter out CAN diagnosis message;First according to 2011 Table 3 in the 8.5th chapters and sections of ISO15765-2 international standard of year publication judges the type of this diagnosis message;If it is single frames Message is diagnosed, CAN diagnosing protocol processing module directly receives, and then extracts the A_DATA data in this message, i.e., 2013 The A_DATA data in A_PDU that the 7.2nd chapter defines in the ISO14229-1 international standard of publication, storage to data memory module In;Message is diagnosed if it is first frame, CAN diagnosing protocol processing module is returned according to the ISO15765-2 international standard of publication in 2011 Multiple flow control frames, wherein FS parameter is equal to 0, BS parameter and is equal to 00, and the message address of flow control frames is using the process 1 in step 1) it looks into The obtained controller of diagnosis message routing table is ask to the physical addressing diagnostic response address of external diagnostic equipment, then according to 2011 Table 3 in the 8.5th chapters and sections of ISO15765-2 international standard of year publication judges the type of subsequent CAN diagnosis message, such as Fruit is successive frame diagnosis message, and CAN diagnosing protocol processing module all receives, finally, CAN diagnosing protocol processing module is by first frame It connects and stores into data memory module according to the received order of message with the A_DATA data in successive frame;
3) MOST-CAN diagnosing protocol conversion module realizes the conversion of CAN diagnosis message and MOST diagnosis message;It will be in step 1 Process 2) the A_DATA data that store in data memory module are converted to MOST diagnosis message;
MOST diagnosis message is made of MOST header data and data field;
MOST header data is successively by the device address of controller, function block identifier, functional block example, function identifier, behaviour Make type composition;Wherein, the length of the device address of controller is 2 bytes, i.e. process 1 in step 1) setting of finding Standby address;Function block identifier accounts for 1 byte, using diagnostic function block identifier;Functional block example accounts for 1 byte;Function mark Know symbol and accounts for 12;Action type accounts for 4;
MOST data field is by encapsulating head version, application layer diagnostic service data field length, protocol type, application layer diagnostic service Data field composition;Wherein, encapsulation head version accounts for 1 byte;Application layer diagnostic service data field length accounts for 4 bytes, indicates The length of application layer diagnostic service data field;Protocol type accounts for 1 byte, indicates diagnosing protocol type;Application layer diagnostic service Data field is variable-length, the A_DATA that storage is defined according to the 7.2nd chapter in the ISO14229-1 international standard of publication in 2013 Data;
4) message after conversion is dealt into MOST bus by MOST diagnosing protocol processing module;
Step 2: MOST diagnosis message is converted to CAN diagnosis message:
1) MOST diagnosing protocol processing module receives MOST and diagnoses message, sieves first to the MOST message in MOST bus Choosing, need to meet following two screening conditions simultaneously: first, the function block identifier in the header data of the MOST message must be Diagnostic function block identifier;Second, the device address in the header data of the MOST message must be fixed in diagnosis routing table Justice;The MOST message for meeting conditions above is the MOST diagnosis message that be received, MOST diagnosing protocol processing module It can just receive, and issue MOST-CAN diagnosing protocol conversion module, meanwhile, according to diagnosis routing table lookup and setting in this message Physical addressing diagnostic response address of the standby corresponding controller in address to external diagnostic equipment;
2) MOST-CAN diagnosing protocol conversion module identifies controller to the physics of external diagnostic equipment according to diagnosis routing table Diagnostic response address is addressed, and will be from the process 1 in step 2) application layer diagnostic service number in received MOST diagnosis message It is extracted according to domain, issues CAN diagnosing protocol processing module;
3) the CAN diagnosing protocol processing module ISO15765-1 according to publication in 2011, the ISO15765-2 of publication in 2011, The ISO15765-3 of publication in 2004, the ISO14229-1 international standards of 2013 publications are by the process 1 in step 2) and step 2 In process 2) the physical addressing diagnostic response address and application layer diagnostic service number of the controller that receives to external diagnostic equipment It is dealt into CAN bus according to CAN diagnosis message is converted into.
CN201610957120.XA 2016-11-02 2016-11-02 A kind of MOST-CAN gateway and the diagnosis packet routing method based on the gateway Active CN106549844B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610957120.XA CN106549844B (en) 2016-11-02 2016-11-02 A kind of MOST-CAN gateway and the diagnosis packet routing method based on the gateway

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610957120.XA CN106549844B (en) 2016-11-02 2016-11-02 A kind of MOST-CAN gateway and the diagnosis packet routing method based on the gateway

Publications (2)

Publication Number Publication Date
CN106549844A CN106549844A (en) 2017-03-29
CN106549844B true CN106549844B (en) 2019-05-14

Family

ID=58393321

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610957120.XA Active CN106549844B (en) 2016-11-02 2016-11-02 A kind of MOST-CAN gateway and the diagnosis packet routing method based on the gateway

Country Status (1)

Country Link
CN (1) CN106549844B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110311992B (en) * 2019-05-31 2020-07-03 上海赫千电子科技有限公司 Function addressing method for unified diagnosis service of automobile Ethernet
CN113141306A (en) * 2021-04-15 2021-07-20 常州易控汽车电子股份有限公司 Diagnostic message routing method and bus routing equipment thereof
CN114338270B (en) * 2021-12-24 2023-05-09 深圳市元征科技股份有限公司 Data communication method, device, electronic equipment and storage medium
CN114584590B (en) * 2022-03-08 2022-12-30 奇瑞汽车股份有限公司 Data transmission method, system, device and storage medium
CN115065535B (en) * 2022-06-16 2023-12-15 南京第三极区块链科技有限公司 Non-invasive secure communication and access control system and application method thereof

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2932844Y (en) * 2006-07-18 2007-08-08 吉林大学 Vehicle body controller that supports multiple bus connection
CN201238315Y (en) * 2008-07-31 2009-05-13 上海通用汽车有限公司 Gateway apparatus supporting entire vehicle multi-bus structure integration
CN202444507U (en) * 2012-03-07 2012-09-19 北京经纬恒润科技有限公司 CAN (Controller Area Network) bus and MOST (Media Oriented System Transport) bus protocol conversion system
CN103986714A (en) * 2014-05-16 2014-08-13 深圳市达图蛙科技开发有限公司 Implementation method and device for connecting bus control network into agent of AVB network
CN104022933A (en) * 2014-06-23 2014-09-03 中国北方车辆研究所 Vehicle bus debugging system based on multi-mode signal conversion
CN104639355A (en) * 2013-11-14 2015-05-20 广州汽车集团股份有限公司 LIN (local interconnect network) communication scheduling setting method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102012014724B3 (en) * 2012-04-14 2013-09-12 Volkswagen Aktiengesellschaft Apparatus, method and computer program for operating a data bus system of a motor vehicle
DE102013217259A1 (en) * 2013-08-29 2015-03-05 Bayerische Motoren Werke Aktiengesellschaft Mode switching of a controller between diagnostic bus and external Ethernet connection

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2932844Y (en) * 2006-07-18 2007-08-08 吉林大学 Vehicle body controller that supports multiple bus connection
CN201238315Y (en) * 2008-07-31 2009-05-13 上海通用汽车有限公司 Gateway apparatus supporting entire vehicle multi-bus structure integration
CN202444507U (en) * 2012-03-07 2012-09-19 北京经纬恒润科技有限公司 CAN (Controller Area Network) bus and MOST (Media Oriented System Transport) bus protocol conversion system
CN104639355A (en) * 2013-11-14 2015-05-20 广州汽车集团股份有限公司 LIN (local interconnect network) communication scheduling setting method
CN103986714A (en) * 2014-05-16 2014-08-13 深圳市达图蛙科技开发有限公司 Implementation method and device for connecting bus control network into agent of AVB network
CN104022933A (en) * 2014-06-23 2014-09-03 中国北方车辆研究所 Vehicle bus debugging system based on multi-mode signal conversion

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CAN/MOST网关的设计与实现;付利娜等;《吉林大学学报(信息科学版)》;20080731;第26卷(第4期);全文
基于MOST50总线的多路同步音视频传输设计;崔茂源等;《汽车技术》;20150731(第7期);全文

Also Published As

Publication number Publication date
CN106549844A (en) 2017-03-29

Similar Documents

Publication Publication Date Title
CN106549844B (en) A kind of MOST-CAN gateway and the diagnosis packet routing method based on the gateway
CN106685737B (en) IMS accident analysis operational system, method and server based on IP phone
CN105388893A (en) CAN communication data monitoring method and system based on OBD interface
WO2023065712A1 (en) Distributed train control network intrusion detection method, system, and storage medium
EP2429128B1 (en) Flow statistics aggregation
US9026711B2 (en) Motor vehicle control system with simplified information exchange
CN112383452B (en) DPDK frame-based DDS data transmission diagnosis method and system
CN110225071A (en) Vehicle intelligent gateway and automobile
US10673986B2 (en) Operation method of communication node for selective wake-up in vehicle network
CN105893844A (en) Method and device for sending messages of vehicle bus networks
CN112947372A (en) Remote diagnosis method based on active reporting of fault codes
CN109067859A (en) A kind of double-deck cloud framework system and implementation method towards cross-domain cooperation with service
CN103838226B (en) Rail vehicle controls and monitoring system trouble-locating apparatus and method
CN112020034B (en) 4G/5G T-Box Internet of vehicles environmental protection monitoring server, system and method
US10050864B2 (en) Operation mode transition method in network
CN106850318A (en) The visualization of IMS signaling processes represents system, method and server
CN105388858A (en) Operation method of communication node in network
CN113093687B (en) Fault diagnosis system and method based on domain controller
CN106530438B (en) A kind of real-time automobile data recorder collecting method of magnanimity and system
CN105897453A (en) Method for diagnosing network and apparatus for the same
CN104104584A (en) Vehicle information providing system
CN207926649U (en) Vehicle intelligent gateway and automobile
CN106533746A (en) Multi-network convergence method and device
CN109039768B (en) CBTC signal warning method in LTE-M communication network
CN104253727B (en) The diagnostic method and its system of vehicle LIN networks

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