KR20190063212A - Device and method for analysising can message using obd-ⅱ query - Google Patents
Device and method for analysising can message using obd-ⅱ query Download PDFInfo
- Publication number
- KR20190063212A KR20190063212A KR1020170162134A KR20170162134A KR20190063212A KR 20190063212 A KR20190063212 A KR 20190063212A KR 1020170162134 A KR1020170162134 A KR 1020170162134A KR 20170162134 A KR20170162134 A KR 20170162134A KR 20190063212 A KR20190063212 A KR 20190063212A
- Authority
- KR
- South Korea
- Prior art keywords
- message
- query
- messages
- data
- response
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07C—TIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
- G07C5/00—Registering or indicating the working of vehicles
- G07C5/008—Registering or indicating the working of vehicles communicating information to a remotely located station
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07C—TIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
- G07C5/00—Registering or indicating the working of vehicles
- G07C5/08—Registering or indicating performance data other than driving, working, idle, or waiting time, with or without registering driving, working, idle or waiting time
-
- 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/40143—Bus networks involving priority mechanisms
- H04L12/40163—Bus networks involving priority mechanisms by assigning priority to messages according to a message field
-
- 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
- H04L2012/40208—Bus networks characterized by the use of a particular bus standard
- H04L2012/40215—Controller Area Network CAN
-
- 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
- H04L2012/40267—Bus for use in transportation systems
- H04L2012/40273—Bus for use in transportation systems the transportation system being a vehicle
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Small-Scale Networks (AREA)
Abstract
Description
본 발명은 차량에 OBD-Ⅱ PID 쿼리를 보낸 뒤 PID 응답 결과와 CAN 데이터를 비교하여 CAN의 특정 ID 또는 필드가 가리키는 데이터를 분석하는 방법에 관한 것이다.The present invention relates to a method for analyzing data indicated by a specific ID or a field of a CAN by comparing an PID response result with a CAN data after sending an OBD-II PID query to the vehicle.
CAN(Controller Area Network)은 차량 내에서 호스트 컴퓨터 없이 마이크로 컨트롤러나 장치들이 서로 통신하기 위해 설계된 표준 통신 규격이다. 차량의 엔진 관리 시스템, 변속 장치 제어, 계기판과 같이 ECU(Electronic Control Unit)들 사이의 안정적이고 효율적인 통신을 위해 CAN이 사용된다.CAN (Controller Area Network) is a standard communication standard designed for communication between microcontrollers or devices without a host computer in the vehicle. CAN is used for stable and efficient communication between ECUs (Electronic Control Units), such as the vehicle's engine management system, transmission control, and instrument cluster.
CAN에서는 노드의 주소에 의해 데이터(메시지)가 교환되는 것이 아니라 메시지의 우선 순위에 따라 CAN ID를 할당하고, 할당된 CAN ID를 이용해 메시지를 구별한다. ECU가 데이터를 보내기 위해 CAN 버스 상에서 메시지를 탑재하면 해당 메시지는 CAN 버스에서 브로드캐스팅되고 다른 모든 노드들은 모든 메시지를 동시에 수신하게 된다. 각 ECU는 브로드캐스팅된 메시지의 CAN ID 필드를 확인하고, 자신이 처리해야 할 CAN ID라면(즉, 메시지의 CAN ID가 자신이 할당받은 CAN ID라면) 해당 메시지를 받아 데이터를 처리한다. 이후 데이터 필드에 기록된 값에 따라 차량이 조작된다.In CAN, data (message) is not exchanged by the address of the node but CAN ID is assigned according to the priority of the message and the message is discriminated by using the assigned CAN ID. When an ECU mounts a message on the CAN bus to send data, the message is broadcast on the CAN bus and all other nodes receive all messages simultaneously. Each ECU checks the CAN ID field of the broadcasted message and, if it is a CAN ID to be processed (ie, the CAN ID of the message is its assigned CAN ID), the ECU receives the message and processes the data. The vehicle is then operated according to the value recorded in the data field.
CAN ID와 데이터 필드가 차량에서 맡는 역할은 차량의 제조사, 모델에 따라 상이하며, 심지어 동일 모델에서도 연식에 따라서 다를 수 있다. CAN 버스에는 차량 구동에 필요한 수많은 데이터가 전송되며 해당 데이터는 분석가가 눈으로 확인 가능한 RPM, 속도 뿐 아니라 여러 센서나 온도, 상태 데이터 등을 포함한다. 차량에 대한 연구를 수행하거나 차량 관련 제품을 개발해야 하는 경우 차량 데이터가 어떤 CAN ID를 통해 전달되어 어떻게 해석되는지 직접 식별하여야 한다.The role of the CAN ID and data field in the vehicle depends on the make and model of the vehicle, and may even vary depending on the model in the same model. The CAN bus contains a large number of data needed to drive a vehicle, and the data includes various sensors, temperature, and status data, as well as RPM, speed, and visibility to the analyst. If you need to conduct a study on a vehicle or develop a vehicle-related product, you should directly identify how the vehicle data is transmitted and interpreted via the CAN ID.
차량 연구를 위해 현대자동차에서 생산된 LF 쏘나타에서 발생되는 CAN 메시지를 덤프하고 이로부터 현재 RPM을 추출하기 위한 예는 다음과 같다. 먼저 도 1과 같이 CAN ID가 0x316인 CAN 메시지를 수집한다. 다음으로, 수학식 1을 이용하면 도 1의 표의 가장 위 데이터 "45 4D 6C 1B 5D 1F 24 76"로부터 1755{=(0x1b*0n256+0x6c/0n4}라는 RPM을 추출할 수 있다.Here is an example of dumping the CAN message generated from the LF Sonata produced by Hyundai Motors and extracting the current RPM from it. First, a CAN message with a CAN ID of 0x316 is collected as shown in FIG. Next, using Equation (1), the RPM of 1755 {= (0x1b * 0n256 + 0x6c / 0n4} can be extracted from the top data "45
그러나, 차량별로 이러한 계산식을 도출하려면, 분석가의 CAN 분석 노하우와 차량에 대한 이해가 충분해야 하며, 분석에도 상당한 시간이 필요하다.However, in order to derive such a formula for each vehicle, the analyst must have sufficient understanding of the CAN analysis knowl- edge and vehicle, and considerable time is also required for analysis.
OBD-Ⅱ(On-Board Diagnostics Ⅱ)는 차량 진단을 위한 표준 및 프로토콜로, 차량의 고장 코드나 현재 차량 상태를 질의하고 응답받는데 사용된다. OBD-Ⅱ에는 사용 가능한 기능들을 모드(Mode)로 분류하며, 사용 가능한 모드 목록은 도 2에 도시되어 있다. 이 중 Mode 1을 사용하면 차량의 현재 상태 정보를 질의할 수 있다. 실제 상용차에서 OBD-Ⅱ 질의를 하려면 CAN ID=0x7DF를 가진 메시지를 차량에 보내면 되고, 이후 CAN ID=0x7E8로 수신된 데이터를 필터링하여 응답을 해석하면 된다. 표준 프로토콜이므로 벤더(vendor)와 무관하게 현재 시판되는 모든 차종에 적용될 수 있다.OBD-II (On-Board Diagnostics II) is a standard and protocol for vehicle diagnostics. It is used to inquire about the fault code of the vehicle or current vehicle condition. OBD-II classifies usable functions into a mode, and a list of usable modes is shown in FIG.
CAN ID 및 DATA 필드가 차량에서 담당하는 역할은 오직 차량 제조사만이 알고 있으며, 제3자가 이를 직접 파악하는 것은 매우 어렵고 오랜 시간이 소요된다. 그러나, 자동차 보안 연구, third-party 장치 개발 등을 위해서는 역공학을 수행하여 이러한 정보를 확보해야 한다.The role that the CAN ID and DATA fields play in the vehicle is only known to the vehicle manufacturer, and it is very difficult and time-consuming for third parties to grasp it directly. However, for automobile security research, third-party device development, etc., reverse engineering is required to obtain such information.
본 발명에서는 OBD-Ⅱ 쿼리로 획득 가능한 차량 정보를 CAN 트래픽과 결합하여 질의와 관련된 데이터가 어느 CAN ID 및 DATA 필드에 저장되는지 손쉽게 확인하는 방법을 제시하고자 한다.In the present invention, a method of easily identifying which CAN ID and DATA field data related to a query is stored by combining vehicle information obtainable with an OBD-II query with CAN traffic is presented.
본 발명이 이루고자 하는 기술적인 과제는 차량에 OBD-Ⅱ 쿼리를 송신하고 이에 대한 응답 결과와 실시간 CAN 메시지를 비교하여 CAN의 특정 ID 또는 필드가 가리키는 데이터를 분석하는 장치 및 방법을 제공하는 것이다.SUMMARY OF THE INVENTION It is an object of the present invention to provide an apparatus and method for analyzing data indicated by a specific ID or field of a CAN by transmitting an OBD-II query to a vehicle and comparing the response result with a real-time CAN message.
본 발명의 실시 예에 따른 CAN 메시지 분석 장치는 미리 정해진 쿼리 메시지를 OBD-Ⅱ(On-board diagnostics-Ⅱ) 단자를 통해 CAN(Controller Area Networks)으로 브로드캐스트하는 쿼리 송신부, 상기 CAN으로부터 복수의 CAN 메시지들을 수신하는 메시지 수신부 및 상기 복수의 CAN 메시지들을 분석하여 상기 쿼리 메시지에 대응하는 CAN ID를 추출하는 비교부를 포함한다.A CAN message analyzing apparatus according to an embodiment of the present invention includes a query transmitter for broadcasting a predetermined query message to Controller Area Networks (CAN) through an on-board diagnostics-II (OBD-II) terminal, And a comparing unit for analyzing the plurality of CAN messages and extracting a CAN ID corresponding to the query message.
또한, 본 발명의 실시 예에 따른 CAN 메시지 분석 방법은 CAN 메시지 분석 장치에서 수행되고, 상기 CAN 메시지 분석 장치에 포함되는 쿼리 송신부가 미리 정해진 쿼리 메시지를 OBD-Ⅱ(On-board diagnostics-Ⅱ) 단자를 통해 CAN(Controller Area Networks)으로 브로드캐스트하는 단계, 상기 CAN 메시지 분석 장치에 포함되는 메시지 수신부가 상기 CAN으로부터 복수의 CAN 메시지들을 수신하는 단계 및 상기 CAN 메시지 분석 장치에 포함되는 비교부가 상기 복수의 CAN 메시지들을 분석하여 상기 쿼리 메시지에 대응하는 CAN ID를 추출하는 단계를 포함한다.The CAN message analyzing method according to the embodiment of the present invention is performed in the CAN message analyzing apparatus, and the query transmitting unit included in the CAN message analyzing apparatus transmits a predetermined query message to an on-board diagnostics-II (OBD-II) To a CAN (Controller Area Networks) through a CAN message analyzer, a message receiver included in the CAN message analyzer receiving a plurality of CAN messages from the CAN, and a comparator included in the CAN message analyzer, Analyzing the CAN messages and extracting a CAN ID corresponding to the query message.
본 발명의 실시 예에 따른 CAN 메시지 분석 장치 및 방법에 의할 경우, 차종과 차량의 연식에 무관하게 매우 빠르게 CAN 데이터를 리버스 엔지니어링할 수 있는 효과가 있다.According to the apparatus and method for analyzing CAN message according to the embodiment of the present invention, it is possible to reverse engineer the CAN data very quickly irrespective of the vehicle type and the model year of the vehicle.
본 발명의 상세한 설명에서 인용되는 도면을 보다 충분히 이해하기 위하여 각 도면의 상세한 설명이 제공된다.
도 1은 동일한 CAN ID를 갖는 CAN 메시지의 실제 데이터의 일부를 도시하는 표이다.
도 2는 OBD-Ⅱ에서 사용 가능한 10가지 모드에 관한 표를 도시한다.
도 3은 본 발명의 일 실시 예에 따른 분석 장치의 기능 블럭도이다.
도 4는 OBD-Ⅱ의 Mode 1(현재 차량 상태 조회)에서 사용 가능한 질의의 예시를 도시한다.
도 5는 도 3에 도시된 비교부의 동작을 설명하기 위한 도면이다.
도 6은 도 3에 도시된 분석 장치에서 수행되는 CAN 메시지 분석 방법을 설명하기 위한 흐름도이다.DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS In order to more fully understand the drawings recited in the detailed description of the present invention, a detailed description of each drawing is provided.
1 is a table showing a part of actual data of a CAN message having the same CAN ID.
Figure 2 shows a table of ten modes available in OBD-II.
3 is a functional block diagram of an analysis apparatus according to an embodiment of the present invention.
4 shows an example of a query available in Mode 1 (current vehicle status inquiry) of OBD-II.
5 is a diagram for explaining the operation of the comparison unit shown in FIG.
FIG. 6 is a flowchart illustrating a method of analyzing a CAN message performed by the analysis apparatus shown in FIG.
본 명세서에 개시되어 있는 본 발명의 개념에 따른 실시 예들에 대해서 특정한 구조적 또는 기능적 설명은 단지 본 발명의 개념에 따른 실시 예들을 설명하기 위한 목적으로 예시된 것으로서, 본 발명의 개념에 따른 실시 예들은 다양한 형태들로 실시될 수 있으며 본 명세서에 설명된 실시 예들에 한정되지 않는다.It is to be understood that the specific structural or functional description of embodiments of the present invention disclosed herein is for illustrative purposes only and is not intended to limit the scope of the inventive concept But may be embodied in many different forms and is not limited to the embodiments set forth herein.
본 발명의 개념에 따른 실시 예들은 다양한 변경들을 가할 수 있고 여러 가지 형태들을 가질 수 있으므로 실시 예들을 도면에 예시하고 본 명세서에서 상세하게 설명하고자 한다. 그러나, 이는 본 발명의 개념에 따른 실시 예들을 특정한 개시 형태들에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물, 또는 대체물을 포함한다.The embodiments according to the concept of the present invention can make various changes and can take various forms, so that the embodiments are illustrated in the drawings and described in detail herein. It should be understood, however, that it is not intended to limit the embodiments according to the concepts of the present invention to the particular forms disclosed, but includes all modifications, equivalents, or alternatives falling within the spirit and scope of the invention.
제1 또는 제2 등의 용어는 다양한 구성 요소들을 설명하는데 사용될 수 있지만, 상기 구성 요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성 요소를 다른 구성 요소로부터 구별하는 목적으로만, 예컨대 본 발명의 개념에 따른 권리 범위로부터 벗어나지 않은 채, 제1 구성 요소는 제2 구성 요소로 명명될 수 있고 유사하게 제2 구성 요소는 제1 구성 요소로도 명명될 수 있다.The terms first, second, etc. may be used to describe various elements, but the elements should not be limited by the terms. The terms may be named for the purpose of distinguishing one element from another, for example, without departing from the scope of the right according to the concept of the present invention, the first element may be referred to as a second element, The component may also be referred to as a first component.
어떤 구성 요소가 다른 구성 요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성 요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성 요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성 요소가 다른 구성 요소에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는 중간에 다른 구성 요소가 존재하지 않는 것으로 이해되어야 할 것이다. 구성 요소들 간의 관계를 설명하는 다른 표현들, 즉 "~사이에"와 "바로 ~사이에" 또는 "~에 이웃하는"과 "~에 직접 이웃하는" 등도 마찬가지로 해석되어야 한다.It is to be understood that when an element is referred to as being "connected" or "connected" to another element, it may be directly connected or connected to the other element, . On the other hand, when an element is referred to as being "directly connected" or "directly connected" to another element, it should be understood that there are no other elements in between. Other expressions that describe the relationship between components, such as "between" and "between" or "neighboring to" and "directly adjacent to" should be interpreted as well.
본 명세서에서 사용한 용어는 단지 특정한 실시 예를 설명하기 위해 사용된 것으로서, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 명세서에서, "포함하다" 또는 "가지다" 등의 용어는 본 명세서에 기재된 특징, 숫자, 단계, 동작, 구성 요소, 부분품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성 요소, 부분품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The singular expressions include plural expressions unless the context clearly dictates otherwise. In this specification, the terms "comprises" or "having" and the like are used to specify that there are features, numbers, steps, operations, elements, parts or combinations thereof described herein, But do not preclude the presence or addition of one or more other features, integers, steps, operations, components, parts, or combinations thereof.
다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가진다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 의미를 갖는 것으로 해석되어야 하며, 본 명세서에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless defined otherwise, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Terms such as those defined in commonly used dictionaries are to be interpreted as having a meaning consistent with the meaning of the context in the relevant art and, unless explicitly defined herein, are to be interpreted as ideal or overly formal Do not.
이하, 본 명세서에 첨부된 도면들을 참조하여 본 발명의 실시 예들을 상세히 설명한다.Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings attached hereto.
도 3은 본 발명의 일 실시 예에 따른 분석 장치의 기능 블럭도이다.3 is a functional block diagram of an analysis apparatus according to an embodiment of the present invention.
도 3을 참조하면, CAN 메시지 분석 장치로도 명명될 수 있는 분석 장치(100)는 쿼리 송신부(110), 메시지 수신부(130) 및 비교부(150)를 포함한다. 실시 예에 따라 분석 장치(100)는 출력부(170)와 저장부(190) 중 적어도 하나를 더 포함할 수도 있다.Referring to FIG. 3, the
쿼리 송신부(110) 미리 정해진 복수의 쿼리(질의)들 중 적어도 하나를 차량의 OBD-Ⅱ 단자를 통하여 상기 차량의 CAN 버스를 통해 전송(또는 브로드캐스트)할 수 있다. 구체적으로, 쿼리 송신부(110)는 OBD-Ⅱ에서 사용 가능한 모드 중 Mode 1을 사용하여 차량의 상태 정보를 질의할 수 있다(도 2 참조). 이때, 쿼리 송신부(110)는 "0x7DF"를 CAN ID로 갖는 CAN 메시지를 브로드캐스트함으로써 상기 차량의 현재 상태에 관한 질의를 수행할 수 있다.The
메시지 수신부(130)는 상기 차량의 OBD-Ⅱ 단자를 통하여 상기 차량의 CAN 내에서 브로드캐스트되는 복수의 CAN 메시지들을 수신할 수 있다. 메시지 수신부(130)에 의해 수신된 메시지들은 저장부(190)에 저장될 수 있다.The
비교부(150)는 메시지 수신부(130)에 의해 수신된 복수의 메시지들 또는 저장부(190)에 저장되어 있는 복수의 메시지들을 이용하여 쿼리 송신부(110)에 의해 송신된 쿼리에 대응하는 CAN ID 및/또는 데이터를 추출할 수 있다. 추출된 쿼리와 CAN ID의 대응 관계(또는 매칭 관계) 및/또는 추출된 쿼리와 CAN 데이터의 대응 관계(또는 매칭 관계)는 저장부(190)에 저장될 수 있다.The
메시지 수신부(130)에 의해 수신된 복수의 CAN 메시지들에는 쿼리 송신부(110)의 질의에 대한 응답이 포함될 수 있다. 이때, "0x7E8을 CAN ID로 갖는 CAN 메시지가 쿼리에 대한 응답(응답 메시지)이므로, 상기 복수의 CAN 메시지들 중에서 응답을 검출하는 것은 용이하다.The plurality of CAN messages received by the
비교부(150)는 쿼리에 대한 응답(응답 메시지)과 상기 복수의 CAN 메시지들 중 응답을 제외한 CAN 메시지들을 비교하여 쿼리에 대응하는 CAN ID 및/또는 데이터를 추출할 수 있다. The
또한, 비교부(150)는 쿼리와 이에 대응되는 CAN ID 및/ 또는 데이터를 출력부(170)를 통하여 디스플레이할 수 있다.Also, the
출력부(170)는 비교부(150)의 비교 결과 등을 출력할 수 있는 디스플레이를 포함할 수 있고, 비교부(150)의 제어 하에 비교부(150)의 비교 결과를 출력할 수 있다.The
저장부(190)에는 상기 미리 정해진 복수의 쿼리들이 저장되어 있을 수 있고, 상기 차량으로부터 수신된 복수의 메시지들이 저장될 수 있다. 또한, 비교부(150)에 의해 추출된 쿼리와 CAN ID의 대응 관계 역시 저장부(190)에 저장될 수 있다.The predetermined number of the queries may be stored in the
도 1에 도시된 분석 장치(100)의 구성들 각각은 기능 및 논리적으로 분리될 수 있음으로 나타내는 것이며, 반드시 각각의 구성이 별도의 물리적 장치로 구분되거나 별도의 코드로 작성됨을 의미하는 것이 아님을 본 발명의 기술분야의 평균적 전문가는 용이하게 추론할 수 있을 것이다.Each of the configurations of the
또한, 본 명세서에서 "~부"라 함은, 본 발명의 기술적 사상을 수행하기 위한 하드웨어 및 상기 하드웨어를 구동하기 위한 소프트웨어의 기능적, 구조적 결합을 의미할 수 있다. 예컨대, 상기 "~부"는 소정의 코드와 상기 소정의 코드가 수행되기 위한 하드웨어 리소스의 논리적인 단위를 의미할 수 있으며, 반드시 물리적으로 연결된 코드를 의미하거나, 한 종류의 하드웨어를 의미하는 것이 아니다.Also, in this specification, "part" may mean a functional and structural combination of hardware for carrying out the technical idea of the present invention and software for driving the hardware. For example, the above-mentioned "part" may mean a logical unit of a predetermined code and a hardware resource for executing the predetermined code, and it does not necessarily mean a physically connected code or a kind of hardware .
도 4는 OBD-Ⅱ의 Mode 1(현재 차량 상태 조회)에서 사용 가능한 질의의 예시를 도시한다.Fig. 4 shows an example of a query usable in Mode 1 (current vehicle status inquiry) of OBD-II.
OBD-Ⅱ 쿼리에 대한 응답은 CAN을 통해 전달되며 이때 응답을 의미하는 CAN ID는 "0x7e8"이다(OBD-Ⅱ 표준에 의함). OBD-Ⅱ 응답값에서 실제 차량 정보를 수집하기 위해 A, B, C, D로 표현되는 데이터를 수집하는데, 이는 실제 CAN ID=0x7e8인 메시지의 DATA[3], DATA[4], DATA[5], DATA[6] 필드와 매칭된다. 데이터 해석 방법의 예는 도 4에 상세히 기재되어 있다.The response to the OBD-II query is transmitted via CAN, and the CAN ID meaning the response is "0x7e8" (according to the OBD-II standard). Data [3], DATA [4], and DATA [5] of messages with actual CAN ID = 0x7e8 are collected to collect actual vehicle information from OBD-II response values. ] And DATA [6] fields, respectively. An example of a data interpretation method is described in detail in FIG.
OBD-Ⅱ에서 사용되는 데이터의 표현 방법과 실제 CAN 메시지 내 데이터의 표현 방법은 거의 일치하므로, OBD-Ⅱ 응답과 CAN 메시지를 비교하면 일부 CAN 메시지에 대한 역할을 손쉽게 확인할 수 있다. OBD-Ⅱ를 이용해 추출 가능한 차량 정보는 최소 135개이며, 정보의 수는 차량마다 차이가 있을 수 있다. 그럼에도 대부분의 차량에서 매우 많은 데이터를 추출할 수 있고, 해당 방법을 적용하면 매우 빠른 시간에 CAN 데이터를 리버스 엔지니어링할 수 있다.The representation of the data used in the OBD-II and the representation of the data in the actual CAN message are almost identical, so that the role of some CAN messages can be easily confirmed by comparing the CAN message with the OBD-II response. There are at least 135 vehicle information available with OBD-II, and the number of information may vary from vehicle to vehicle. Nevertheless, it is possible to extract very large amounts of data from most vehicles and reverse engineer CAN data very quickly by applying this method.
도 5는 도 3에 도시된 비교부의 동작을 설명하기 위한 도면이다. 도 5를 통해 비교부(150)에 의해 RPM과 관련된 쿼리와 응답 메시지를 통해 RPM과 연관된 CAN ID와 데이터를 추출 내지 결정하는 방법을 설명한다.5 is a diagram for explaining the operation of the comparison unit shown in FIG. A method for extracting or determining the CAN ID and data associated with the RPM through the query and the response message related to the RPM by the
도 5에는 특정 구간 동안(예컨대, 쿼리를 보낸 시점 전후의 소정의 구간 동안)에 CAN을 통해 브로드캐스팅된 복수의 CAN 메시지들이 순차적으로 기재되어 있다. 상기 복수의 CAN 메시지들은 메시지 수신부(130)에 의해 수신되어 저장부(190)에 저장될 수 있다.In FIG. 5, a plurality of CAN messages broadcasted via CAN are sequentially described during a specific period (for example, during a predetermined period before and after a query is sent). The plurality of CAN messages may be received by the
또한, 본 예에서 쿼리 송신부(110)에 의해 송신된 쿼리는 "0x7DF"를 CAN ID로 갖고 "0x0c"를 PID로 갖는 CAN 메시지일 수 있다. 즉, 상기 쿼리는 RPM과 관련된 데이터를 요청하는 CAN 메시지일 수 있다.In this example, the query transmitted by the
비교부(150)는 상기 복수의 CAN 메시지들 중 상기 쿼리에 대한 응답(즉, 응답 메시지)를 CAN ID를 통해 구분할 수 있다. 즉, 비교부(150)는 "0x7e8"을 CAN ID로 갖는 CAN 메시지를 응답 메시지로 결정하고, 상기 응답 메시지와 상기 복수의 CAN 메시지들을 비교하여 쿼리에 대응하는 CAN ID 및/또는 쿼리에 대응하는 데이터를 추출할 수 있다.The
구체적으로, 비교부(150)는 비교부(150)는 상기 응답 메시지와 미리 정해진 구간 동안 수신된 CAN 메시지들을 비교할 수 있다. 미리 정해진 구간은 실시 예에 따라 상이할 수 있다. 즉, 쿼리를 송신한 시점을 기준으로 전후 일정 구간 동안 수신된 메시지들, 쿼리를 송신한 시점으로부터 일정 구간 동안 수신된 메시지들, 쿼리를 송신한 시점을 기준으로 전후 일정 개수의 메시지들, 또는 쿼리를 송신한 시점으로부터 일정 개수의 메시지들이 비교 대상 메시지가 될 수 있다.Specifically, the
또한, 비교부(150)는 응답 메시지에 포함된 데이터의 적어도 일부와 동일한 데이터를 포함하는 메시지의 CAN ID를 쿼리에 대응하는 CAN ID로 결정할 수 있다. 또한, 응답 메시지의 포멧은 미리 정해질 수 있기 때문에 엔진 RPM을 계산하기 위해 필요한 데이터(응답 메시지의 5번째 데이터인 "5c"과 4번째 데이터인 "10")는 각각 CAN ID가 "0x315"인 메시지의 3번째 데이터(5c)와 4번째 데이터(10)인 것을 알 수 있다. 이와 같은 방식으로 비교부(150)는 퀄리에 대응하는 CAN ID 및/또는 데이터를 추출할 수 있다.Also, the comparing
도 5의 예에서 CAN ID가 "0x7e8"인 메시지의 데이터와 CAN ID가 "0x316"인 메시지의 데이터의 2바이트에 대한 매치가 이루어졌는데, 바이트가 순서가 반대로 되어 있는 것을 확인할 수 있다. 0x7e8 데이터에서는 데이터가 Big Endian, 0x316 데이터에서는 Little Endian 형태로 데이터가 기록되어 있기 때문이다. 따라서, 데이터 교차 분석 시에는 데이터 순서를 역방향으로 뒤집어서 비교를 수행하여야 한다.In the example of FIG. 5, the data of the message having the CAN ID of "0x7e8" and the data of the message of the message having the CAN ID of "0x316" are matched, and it can be confirmed that the order of the bytes is reversed. This is because data is recorded in Big Endian format in 0x7e8 format and Little Endian format in 0x316 format. Therefore, at the data crosstalk analysis, the data sequence must be inverted in the reverse direction to perform the comparison.
도 6은 도 3에 도시된 분석 장치에서 수행되는 CAN 메시지 분석 방법을 설명하기 위한 흐름도이다. 이하에서는 중복되는 설명에 대한 구체적인 설명은 생략하기로 한다. 또한, 도 6에는 하나의 쿼리를 송신하고 이에 대응하는 CAN ID 및/또는 데이터를 추출하는 과정만이 도시되어 있으나, 본 발명의 권리범위가 이에 제한되는 것은 아니며, 반복 수행을 통해 복수의 쿼리들에 대한 분석을 수행할 수도 있다.FIG. 6 is a flowchart illustrating a method of analyzing a CAN message performed by the analysis apparatus shown in FIG. Hereinafter, a detailed description of the overlapping description will be omitted. 6 shows a process of transmitting a single query and extracting a corresponding CAN ID and / or data. However, the scope of the present invention is not limited thereto, and a plurality of queries May be performed.
우선, 분석 장치(100)의 쿼리 송신부(110)는 쿼리를 OBD-Ⅱ 단자를 통해 브로드캐스트할 수 있다(S100).First, the
분석 장치(100)의 메시지 수신부(130)는 CAN을 통해 브로드캐스트되는 CAN 메시지들을 수신하고, 수신된 메시지들은 저장부(190)에 저장될 수 있다(S200). 메시지 수신부(130)에 의한 수신 동작은 미리 정해진 시간 구간 동안 수행될 수 있다. 단계 S200이 단계 S100에 후속하는 단계인 것으로 이해될 수 있으나, 실시 예에 따라, 단계 S200은 미리 정해진 구간 동안 수행될 수 있고, 경우에 따라서는 단계 S100의 실행 이전부터 수행될 수도 있다.The
이후, 분석 장치(100)의 비교부(150)는 수신된 복수의 CAN 메시지들 중에서 응답 메시지를 추출하고(S300), 추출된 응답 메시지와 CAN 메시지들을 비교할 수 있다(S400).Thereafter, the comparing
마지막으로 비교부(150)는 비교 결과, 즉 쿼리에 대응하는 CAN ID 및/또는 쿼리에 대응하는 데이터(구체적으로는 CAN 메시지의 데이터 필드 중 대응하는 데이터의 순서)를 추출하고(S500), 추출된 결과를 분석 장치(100)의 출력부(170)를 통해 출력할 수 있다.Finally, the
본 발명은 도면에 도시된 실시 예를 참고로 설명되었으나 이는 예시적인 것에 불과하며, 본 기술 분야의 통상의 지식을 가진 자라면 이로부터 다양한 변형 및 균등한 타 실시 예가 가능하다는 점을 이해할 것이다. 따라서, 본 발명의 진정한 기술적 보호 범위는 첨부된 등록청구범위의 기술적 사상에 의해 정해져야 할 것이다.While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it is evident that many alternatives, modifications and variations will be apparent to those skilled in the art. Accordingly, the true scope of the present invention should be determined by the technical idea of the appended claims.
100 : 분석 장치
110 : 쿼리 송신부
130 : 메시지 수신부
150 : 비교부
170 : 출력부
190 : 저장부100: Analyzer
110: Query sender
130: message receiver
150:
170:
190:
Claims (10)
상기 CAN으로부터 복수의 CAN 메시지들을 수신하는 메시지 수신부; 및
상기 복수의 CAN 메시지들을 분석하여 상기 쿼리 메시지에 대응하는 CAN ID를 추출하는 비교부를 포함하는 CAN 메시지 분석 장치.
A query transmitter for broadcasting a predetermined query message to Controller Area Networks (CAN) via an on-board diagnostics-II (OBD-II) terminal;
A message receiver for receiving a plurality of CAN messages from the CAN; And
And a comparator for analyzing the plurality of CAN messages and extracting a CAN ID corresponding to the query message.
상기 비교부는 상기 복수의 CAN 메시지들 중 상기 쿼리 메시지에 대한 응답인 응답 메시지를 추출하고, 상기 응답 메시지와 상기 복수의 CAN 메시지들 각각을 비교하여 상기 CAN ID를 추출하는,
CAN 메시지 분석 장치.
The method according to claim 1,
Wherein the comparison unit extracts a response message that is a response to the query message among the plurality of CAN messages and extracts the CAN ID by comparing the response message and each of the plurality of CAN messages,
CAN message analyzer.
상기 쿼리 메시지는 "0x7DF"를 CAN ID로 갖고, 상기 응답 메시지는 "0x7E8"을 CAN ID로 갖는,
CAN 메시지 분석 장치.
3. The method of claim 2,
Wherein the query message has "0x7DF" as the CAN ID, and the response message has the "0x7E8 &
CAN message analyzer.
상기 비교부는 상기 복수의 CAN 메시지들 중에서 미리 정해진 값을 CAN ID로 갖는 CAN 메시지를 상기 응답 메시지로 추출하는,
CAN 메시지 분석 장치.
3. The method of claim 2,
Wherein the comparison unit extracts, from the plurality of CAN messages, a CAN message having a predetermined value as a CAN ID in the response message,
CAN message analyzer.
상기 비교부는 상기 복수의 CAN 메시지들 중에서 상기 응답 메시지에 포함된 데이터 중 적어도 일부와 동일한 데이터를 갖는 CAN 메시지의 CAN ID를 상기 쿼리 메시지에 대응하는 CAN ID로 추출하는,
CAN 메시지 분석 장치.
5. The method of claim 4,
Wherein the comparison unit extracts a CAN ID of a CAN message having data identical to at least a part of the data included in the response message among the plurality of CAN messages to a CAN ID corresponding to the query message,
CAN message analyzer.
상기 CAN 메시지 분석 장치에 포함되는 쿼리 송신부가 미리 정해진 쿼리 메시지를 OBD-Ⅱ(On-board diagnostics-Ⅱ) 단자를 통해 CAN(Controller Area Networks)으로 브로드캐스트하는 단계;
상기 CAN 메시지 분석 장치에 포함되는 메시지 수신부가 상기 CAN으로부터 복수의 CAN 메시지들을 수신하는 단계; 및
상기 CAN 메시지 분석 장치에 포함되는 비교부가 상기 복수의 CAN 메시지들을 분석하여 상기 쿼리 메시지에 대응하는 CAN ID를 추출하는 단계를 포함하는 CAN 메시지 분석 방법.
A method of analyzing a CAN message performed in a CAN message analyzer,
The query transmitter included in the CAN message analyzing apparatus broadcasts a predetermined query message to Controller Area Networks (CAN) through an on-board diagnostics-II (OBD-II) terminal;
Receiving a plurality of CAN messages from the CAN by a message receiver included in the CAN message analyzer; And
Wherein the comparing unit included in the CAN message analyzing apparatus analyzes the plurality of CAN messages and extracts a CAN ID corresponding to the query message.
상기 CAN ID를 추출하는 단계는, 상기 복수의 CAN 메시지들 중 상기 쿼리 메시지에 대한 응답인 응답 메시지를 추출하고, 상기 응답 메시지와 상기 복수의 CAN 메시지들 각각을 비교하여 상기 CAN ID를 추출하는,
CAN 메시지 분석 방법.
The method according to claim 6,
Wherein the extracting of the CAN ID comprises extracting a response message which is a response to the query message among the plurality of CAN messages and extracting the CAN ID by comparing the response message and each of the plurality of CAN messages,
CAN message analysis method.
상기 쿼리 메시지는 "0x7DF"를 CAN ID로 갖고, 상기 응답 메시지는 "0x7E8"을 CAN ID로 갖는,
CAN 메시지 분석 방법.
8. The method of claim 7,
Wherein the query message has "0x7DF" as the CAN ID, and the response message has the "0x7E8 &
CAN message analysis method.
상기 CAN ID를 추출하는 단계는, 상기 복수의 CAN 메시지들 중에서 미리 정해진 값을 CAN ID로 갖는 CAN 메시지를 상기 응답 메시지로 추출하는,
CAN 메시지 분석 방법.
8. The method of claim 7,
Wherein the step of extracting the CAN ID comprises: extracting, from the plurality of CAN messages, a CAN message having a predetermined value as a CAN ID,
CAN message analysis method.
상기 CAN ID를 추출하는 단계는, 상기 복수의 CAN 메시지들 중에서 상기 응답 메시지에 포함된 데이터 중 적어도 일부와 동일한 데이터를 갖는 CAN 메시지의 CAN ID를 상기 쿼리 메시지에 대응하는 CAN ID로 추출하는,
CAN 메시지 분석 방법.10. The method of claim 9,
Wherein the extracting of the CAN ID comprises extracting a CAN ID of a CAN message having the same data as at least a part of the data included in the response message among the plurality of CAN messages into a CAN ID corresponding to the query message,
CAN message analysis method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020170162134A KR102028653B1 (en) | 2017-11-29 | 2017-11-29 | Device and method for analysing can message using obd-ⅱ query |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020170162134A KR102028653B1 (en) | 2017-11-29 | 2017-11-29 | Device and method for analysing can message using obd-ⅱ query |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20190063212A true KR20190063212A (en) | 2019-06-07 |
KR102028653B1 KR102028653B1 (en) | 2019-10-04 |
Family
ID=66850067
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020170162134A KR102028653B1 (en) | 2017-11-29 | 2017-11-29 | Device and method for analysing can message using obd-ⅱ query |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR102028653B1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116401146A (en) * | 2023-01-16 | 2023-07-07 | 宁德时代(上海)智能科技有限公司 | Data interaction method and device, storage medium, server and vehicle |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20160071980A (en) | 2014-12-13 | 2016-06-22 | 조성규 | Injector diagnosis method and system for OBD2 |
US9703955B2 (en) | 2014-07-17 | 2017-07-11 | VisualThreat Inc. | System and method for detecting OBD-II CAN BUS message attacks |
KR101789734B1 (en) | 2016-04-27 | 2017-10-25 | 코드시스템주식회사 | Operating method for switching a plurality of display pages in the vehicle information display apparatus |
-
2017
- 2017-11-29 KR KR1020170162134A patent/KR102028653B1/en active IP Right Grant
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9703955B2 (en) | 2014-07-17 | 2017-07-11 | VisualThreat Inc. | System and method for detecting OBD-II CAN BUS message attacks |
KR20160071980A (en) | 2014-12-13 | 2016-06-22 | 조성규 | Injector diagnosis method and system for OBD2 |
KR101789734B1 (en) | 2016-04-27 | 2017-10-25 | 코드시스템주식회사 | Operating method for switching a plurality of display pages in the vehicle information display apparatus |
Non-Patent Citations (1)
Title |
---|
유창현, OBD-II 시스템을 활용한 자동차 고장진단 프로그램 개발과 CAN 데이터 분석, 수원대학교대학원 박사학위논문, 2015.2월* * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116401146A (en) * | 2023-01-16 | 2023-07-07 | 宁德时代(上海)智能科技有限公司 | Data interaction method and device, storage medium, server and vehicle |
CN116401146B (en) * | 2023-01-16 | 2023-12-22 | 宁德时代(上海)智能科技有限公司 | Data interaction method and device, storage medium, server and vehicle |
Also Published As
Publication number | Publication date |
---|---|
KR102028653B1 (en) | 2019-10-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110162009B (en) | Fault diagnosis method, information determination method, corresponding device and equipment | |
JP4416649B2 (en) | Method and apparatus for telematic services for vehicles | |
CN110463142A (en) | Vehicle abnormality detection service device, vehicle abnormality detection system and vehicle abnormality detection method | |
CN110162008B (en) | CAN bus analysis method for new energy vehicle | |
US20080167772A1 (en) | Method and system for processing and transmitting automotive emission data | |
CN112286171A (en) | Remote diagnosis method, device, vehicle and storage medium | |
US20140297099A1 (en) | System and method for sending and receiving messages between an electronic control unit of a vehicle and an external device | |
CN108829825B (en) | Automatic adaptation method and device for vehicle data acquisition | |
WO2018196655A1 (en) | Public network communication method for on-board electronic processing unit system | |
CN105227642A (en) | For transmitting device and the data transmission method thereof of vehicle data | |
KR101439018B1 (en) | System for providing vehicle information | |
US11380146B2 (en) | Method and system to determine vehicle type identification through diagnostic port | |
Frassinelli et al. | I know where you parked last summer: Automated reverse engineering and privacy analysis of modern cars | |
CN112003784B (en) | Vehicle data transmission method, device, storage medium and device | |
WO2018179536A1 (en) | Information processing device, information processing method, program, and recording medium on which said program is stored | |
CN112927392A (en) | Communication method, vehicle communication interface device and readable storage medium | |
JP5370341B2 (en) | Communication apparatus and data communication system | |
CN109660436B (en) | Dual-CAN channel data processing method, gateway equipment and system | |
KR20190063212A (en) | Device and method for analysising can message using obd-ⅱ query | |
CN111061237B (en) | Vehicle identification code flashing method and vehicle identification code flashing system | |
CN102710479B (en) | Automobile gateway system for inverse resolution of communication protocols | |
CN112015163A (en) | Method and device for quickly identifying diagnostic subject on CAN bus | |
Iqbal et al. | Diagnostic tool and remote online diagnostic system for Euro standard vehicles | |
KR20240017005A (en) | Remote vehicle communication filtering | |
CN213244054U (en) | Remote monitoring module for issuing vehicle test standard and vehicle |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
E902 | Notification of reason for refusal | ||
E701 | Decision to grant or registration of patent right |