[{"data":1,"prerenderedAt":645},["Reactive",2],{"kb-nav":3,"kb-doc":96},[4,10,15,20,25,30,35,40,45,50,55,60,65,70,75,81,86,91],{"_path":5,"title":6,"description":7,"part":8,"chapterNumber":9},"/knowledge-base/networks/introduction","Introduction","Overview of the communication networks used in modern vehicles, from LIN to Automotive Ethernet.","Vehicle Networks & Protocols",1,{"_path":11,"title":12,"description":13,"part":8,"chapterNumber":14},"/knowledge-base/networks/vehicle-documentation","Vehicle Documentation","Where to find manufacturer wiring diagrams, J2534 passthrough devices, and the different types of diagrams that are useful when researching a vehicle.",2,{"_path":16,"title":17,"description":18,"part":8,"chapterNumber":19},"/knowledge-base/networks/lin-bus","Local Interconnect Network (LIN)","Local Interconnect Network — a single-wire low-speed bus used as a low-cost alternative to CAN for non-critical body electronics.",3,{"_path":21,"title":22,"description":23,"part":8,"chapterNumber":24},"/knowledge-base/networks/controller-area-network","Controller Area Network (CAN)","ISO 11898 — the differential bus that became the backbone of automotive networking. Frames, bit timing, errors, CAN FD, message contents, and practical attacks.",4,{"_path":26,"title":27,"description":28,"part":8,"chapterNumber":29},"/knowledge-base/networks/flexray","FlexRay","Time-triggered, deterministic automotive bus standardized as ISO 17458, designed for higher speeds and drive-by-wire systems.",5,{"_path":31,"title":32,"description":33,"part":8,"chapterNumber":34},"/knowledge-base/networks/automotive-ethernet","Automotive Ethernet","Automotive variants of Ethernet — 100BASE-T1, 1000BASE-T1, and 10BASE-T1S — built around single twisted-pair cabling and strict EMC requirements.",6,{"_path":36,"title":37,"description":38,"part":8,"chapterNumber":39},"/knowledge-base/networks/secure-onboard-communication","Secure Onboard Communication (SecOC)","AUTOSAR's standard for cryptographic message authentication on in-vehicle networks — freshness values, MAC computation and key management.",7,{"_path":41,"title":6,"description":42,"part":43,"chapterNumber":44},"/knowledge-base/diagnostics/introduction","Overview of automotive diagnostic protocols — ISO-TP, OBD-II, UDS, CCP and XCP — and how they layer on top of CAN.","Diagnostic Protocols",8,{"_path":46,"title":47,"description":48,"part":43,"chapterNumber":49},"/knowledge-base/diagnostics/iso-tp","ISO 15765-2 (ISO-TP)","ISO 15765-2 transport layer for sending diagnostic payloads larger than 8 bytes over CAN — single, first, consecutive and flow-control frames.",9,{"_path":51,"title":52,"description":53,"part":43,"chapterNumber":54},"/knowledge-base/diagnostics/vw-tp20","VW Transport Protocol 2.0 (TP 2.0)","Volkswagen's pre-ISO-TP transport layer for KWP2000 over CAN — channel setup, parameter negotiation, and the data exchange counter scheme.",10,{"_path":56,"title":57,"description":58,"part":43,"chapterNumber":59},"/knowledge-base/diagnostics/obd-ii","On-board diagnostics (OBD-II)","On-Board Diagnostics II — the J1962 connector, signal protocols, service IDs, parameter IDs, and DTC encoding.",11,{"_path":61,"title":62,"description":63,"part":43,"chapterNumber":64},"/knowledge-base/diagnostics/uds","Unified Diagnostic Services (UDS)","ISO 14229-1 — the modern diagnostic protocol for sessions, Read/Write DID, Security Access, Routine Control and firmware Request Download / Upload.",12,{"_path":66,"title":67,"description":68,"part":43,"chapterNumber":69},"/knowledge-base/diagnostics/ccp","CAN Calibration Protocol (CCP)","A low-level debug/calibration protocol over CAN — Command Receive Object, Data Transfer Object, and the commands used to read and write ECU memory.",13,{"_path":71,"title":72,"description":73,"part":43,"chapterNumber":74},"/knowledge-base/diagnostics/xcp","Universal Measurement and Calibration Protocol (XCP)","ASAM XCP — successor to CCP supporting CAN, CAN FD, FlexRay, and Ethernet, with synchronous data acquisition, stimulation, and calibration.",14,{"_path":76,"title":77,"description":78,"part":79,"chapterNumber":80},"/knowledge-base/tools/can-adapters","CAN Adapters","USB-to-CAN adapters — comma.ai red panda and PEAK-System PCAN — and the standard DB-9 pinout for CAN.","Tools",15,{"_path":82,"title":83,"description":84,"part":79,"chapterNumber":85},"/knowledge-base/tools/can-analysis","CAN Analysis","Tools for analysing and reverse-engineering CAN traffic — comma.ai cabana, SavyCAN, VehicleSpy, and Wireshark.",16,{"_path":87,"title":88,"description":89,"part":79,"chapterNumber":90},"/knowledge-base/tools/scripting","Scripting","Python libraries and CLI tools for talking to a CAN bus — comma.ai panda, SocketCAN can-utils, python-can, and Scapy with ISO-TP and UDS examples.",17,{"_path":92,"title":93,"description":94,"part":79,"chapterNumber":95},"/knowledge-base/tools/dbc-files","DBC Files","The DBC file format used to describe the contents of CAN messages — nodes, messages, signals, comments, and value tables.",18,{"_path":92,"_dir":97,"_draft":98,"_partial":98,"_locale":99,"title":93,"description":94,"part":79,"chapterNumber":95,"body":100,"_type":640,"_id":641,"_source":642,"_file":643,"_extension":644},"tools",false,"",{"type":101,"children":102,"toc":627},"root",[103,111,125,130,146,158,167,180,192,200,266,279,323,347,352,357,365,444,457,469,477,520,533,538,546,599,605,610,618],{"type":104,"tag":105,"props":106,"children":108},"element","h1",{"id":107},"dbc-files",[109],{"type":110,"value":93},"text",{"type":104,"tag":112,"props":113,"children":114},"p",{},[115,117,123],{"type":110,"value":116},"A DBC file is a common method to describe the contents of a message transmitted over a CAN bus, but it can of course be used for other networks as well. It is a text-based keyword file introduced by ",{"type":104,"tag":118,"props":119,"children":120},"em",{},[121],{"type":110,"value":122},"Vector Informatik GmbH",{"type":110,"value":124},".",{"type":104,"tag":112,"props":126,"children":127},{},[128],{"type":110,"value":129},"The different parts of the DBC file are described in the following sections.",{"type":104,"tag":131,"props":132,"children":134},"h2",{"id":133},"nodes-in-the-network-bu_",[135,137,144],{"type":110,"value":136},"Nodes in the Network (",{"type":104,"tag":138,"props":139,"children":141},"code",{"className":140},[],[142],{"type":110,"value":143},"BU_",{"type":110,"value":145},")",{"type":104,"tag":112,"props":147,"children":148},{},[149,151,156],{"type":110,"value":150},"A DBC file starts with the definition of the nodes in the network. The list of nodes is defined by a ",{"type":104,"tag":138,"props":152,"children":154},{"className":153},[],[155],{"type":110,"value":143},{"type":110,"value":157}," keyword followed by the names of the nodes separated by a space. The name of the node is used to refer to it in the rest of the file. Example:",{"type":104,"tag":159,"props":160,"children":162},"pre",{"code":161},"BU_: Airbag_MQB BMS_MQB Datenlogger_MQB Gateway_MQB Getriebe\n",[163],{"type":104,"tag":138,"props":164,"children":165},{"__ignoreMap":99},[166],{"type":110,"value":161},{"type":104,"tag":131,"props":168,"children":170},{"id":169},"messages-bo_",[171,173,179],{"type":110,"value":172},"Messages (",{"type":104,"tag":138,"props":174,"children":176},{"className":175},[],[177],{"type":110,"value":178},"BO_",{"type":110,"value":145},{"type":104,"tag":112,"props":181,"children":182},{},[183,185,190],{"type":110,"value":184},"After the list of nodes the messages are defined. Each message starts with a ",{"type":104,"tag":138,"props":186,"children":188},{"className":187},[],[189],{"type":110,"value":178},{"type":110,"value":191}," keyword followed by the message identifier, the name of the message, the length of the message in bytes, and the name of the transmitting node. Example:",{"type":104,"tag":159,"props":193,"children":195},{"code":194},"BO_ 134 LWI_01: 8 Gateway_MQB\n",[196],{"type":104,"tag":138,"props":197,"children":198},{"__ignoreMap":99},[199],{"type":110,"value":194},{"type":104,"tag":201,"props":202,"children":203},"ul",{},[204,222,233,244,255],{"type":104,"tag":205,"props":206,"children":207},"li",{},[208,213,215,220],{"type":104,"tag":138,"props":209,"children":211},{"className":210},[],[212],{"type":110,"value":178},{"type":110,"value":214}," — Indicates that this is a message. (Likely derived from the German word ",{"type":104,"tag":118,"props":216,"children":217},{},[218],{"type":110,"value":219},"Botschaft",{"type":110,"value":221},", \"message\".)",{"type":104,"tag":205,"props":223,"children":224},{},[225,231],{"type":104,"tag":138,"props":226,"children":228},{"className":227},[],[229],{"type":110,"value":230},"134",{"type":110,"value":232}," — The message identifier (the arbitration ID in decimal notation).",{"type":104,"tag":205,"props":234,"children":235},{},[236,242],{"type":104,"tag":138,"props":237,"children":239},{"className":238},[],[240],{"type":110,"value":241},"LWI_01",{"type":110,"value":243}," — The name of the message.",{"type":104,"tag":205,"props":245,"children":246},{},[247,253],{"type":104,"tag":138,"props":248,"children":250},{"className":249},[],[251],{"type":110,"value":252},"8",{"type":110,"value":254}," — The length of the message in bytes.",{"type":104,"tag":205,"props":256,"children":257},{},[258,264],{"type":104,"tag":138,"props":259,"children":261},{"className":260},[],[262],{"type":110,"value":263},"Gateway_MQB",{"type":110,"value":265}," — The name of the transmitting node.",{"type":104,"tag":131,"props":267,"children":269},{"id":268},"signals-sg_",[270,272,278],{"type":110,"value":271},"Signals (",{"type":104,"tag":138,"props":273,"children":275},{"className":274},[],[276],{"type":110,"value":277},"SG_",{"type":110,"value":145},{"type":104,"tag":112,"props":280,"children":281},{},[282,284,289,291,297,299,305,307,313,315,321],{"type":110,"value":283},"Each message contains a number of signals. A signal is described by a ",{"type":104,"tag":138,"props":285,"children":287},{"className":286},[],[288],{"type":110,"value":277},{"type":110,"value":290}," keyword followed by the name of the signal, the start bit, the length in bits, the byte order (",{"type":104,"tag":138,"props":292,"children":294},{"className":293},[],[295],{"type":110,"value":296},"0",{"type":110,"value":298}," for big endian, ",{"type":104,"tag":138,"props":300,"children":302},{"className":301},[],[303],{"type":110,"value":304},"1",{"type":110,"value":306}," for little endian), signed (",{"type":104,"tag":138,"props":308,"children":310},{"className":309},[],[311],{"type":110,"value":312},"-",{"type":110,"value":314},") or unsigned (",{"type":104,"tag":138,"props":316,"children":318},{"className":317},[],[319],{"type":110,"value":320},"+",{"type":110,"value":322},"), the factor, the offset, the minimum and maximum value, the unit, and the receiving nodes.",{"type":104,"tag":112,"props":324,"children":325},{},[326,328,333,335,339,341,345],{"type":110,"value":327},"For little endian signals the start bit is the least significant bit, while for big endian signals the start bit is the most significant bit. Bits are counted in a sawtooth manner from right to left, where the right-most bit of byte ",{"type":104,"tag":118,"props":329,"children":330},{},[331],{"type":110,"value":332},"n",{"type":110,"value":334}," is bit number ",{"type":104,"tag":118,"props":336,"children":337},{},[338],{"type":110,"value":332},{"type":110,"value":340}," × 8 starting with ",{"type":104,"tag":118,"props":342,"children":343},{},[344],{"type":110,"value":332},{"type":110,"value":346}," = 0.",{"type":104,"tag":112,"props":348,"children":349},{},[350],{"type":110,"value":351},"For example, byte 0 is numbered from bit 7 on the left to bit 0 on the right, and byte 1 is numbered from bit 15 on the left to bit 8 on the right.",{"type":104,"tag":112,"props":353,"children":354},{},[355],{"type":110,"value":356},"For example:",{"type":104,"tag":159,"props":358,"children":360},{"code":359},"SG_ LWI_Lenkradwinkel : 16|13@1+ (0.1,0) [0|800] \"Deg\" Airbag_MQB\n",[361],{"type":104,"tag":138,"props":362,"children":363},{"__ignoreMap":99},[364],{"type":110,"value":359},{"type":104,"tag":201,"props":366,"children":367},{},[368,378,389,400,411,422,433],{"type":104,"tag":205,"props":369,"children":370},{},[371,376],{"type":104,"tag":138,"props":372,"children":374},{"className":373},[],[375],{"type":110,"value":277},{"type":110,"value":377}," — Indicates that this is a signal.",{"type":104,"tag":205,"props":379,"children":380},{},[381,387],{"type":104,"tag":138,"props":382,"children":384},{"className":383},[],[385],{"type":110,"value":386},"LWI_Lenkradwinkel",{"type":110,"value":388}," — The name of the signal.",{"type":104,"tag":205,"props":390,"children":391},{},[392,398],{"type":104,"tag":138,"props":393,"children":395},{"className":394},[],[396],{"type":110,"value":397},"16|13@1+",{"type":110,"value":399}," — A signal that starts at bit 16, is 13 bits long, is little endian, and is unsigned.",{"type":104,"tag":205,"props":401,"children":402},{},[403,409],{"type":104,"tag":138,"props":404,"children":406},{"className":405},[],[407],{"type":110,"value":408},"(0.1,0)",{"type":110,"value":410}," — The factor and offset to convert the raw value to the actual value. In this case the actual value is calculated by multiplying the raw value by 0.1 and adding 0.",{"type":104,"tag":205,"props":412,"children":413},{},[414,420],{"type":104,"tag":138,"props":415,"children":417},{"className":416},[],[418],{"type":110,"value":419},"[0|800]",{"type":110,"value":421}," — The minimum and maximum value of the signal after applying the factor and offset.",{"type":104,"tag":205,"props":423,"children":424},{},[425,431],{"type":104,"tag":138,"props":426,"children":428},{"className":427},[],[429],{"type":110,"value":430},"\"Deg\"",{"type":110,"value":432}," — The unit of the signal.",{"type":104,"tag":205,"props":434,"children":435},{},[436,442],{"type":104,"tag":138,"props":437,"children":439},{"className":438},[],[440],{"type":110,"value":441},"Airbag_MQB",{"type":110,"value":443}," — The name(s) of the receiving node(s).",{"type":104,"tag":131,"props":445,"children":447},{"id":446},"comments-cm_",[448,450,456],{"type":110,"value":449},"Comments (",{"type":104,"tag":138,"props":451,"children":453},{"className":452},[],[454],{"type":110,"value":455},"CM_",{"type":110,"value":145},{"type":104,"tag":112,"props":458,"children":459},{},[460,462,467],{"type":110,"value":461},"Comments can be added to the DBC file using the ",{"type":104,"tag":138,"props":463,"children":465},{"className":464},[],[466],{"type":110,"value":455},{"type":110,"value":468}," keyword. The comment can be added to a message, signal, or node. Example:",{"type":104,"tag":159,"props":470,"children":472},{"code":471},"CM_ SG_ 134 LWI_Lenkradwinkel \"Variable ratio effect included\";\n",[473],{"type":104,"tag":138,"props":474,"children":475},{"__ignoreMap":99},[476],{"type":110,"value":471},{"type":104,"tag":201,"props":478,"children":479},{},[480,490,500,510],{"type":104,"tag":205,"props":481,"children":482},{},[483,488],{"type":104,"tag":138,"props":484,"children":486},{"className":485},[],[487],{"type":110,"value":455},{"type":110,"value":489}," — Indicates that this is a comment.",{"type":104,"tag":205,"props":491,"children":492},{},[493,498],{"type":104,"tag":138,"props":494,"children":496},{"className":495},[],[497],{"type":110,"value":277},{"type":110,"value":499}," — The type of object the comment is for. In this case a signal.",{"type":104,"tag":205,"props":501,"children":502},{},[503,508],{"type":104,"tag":138,"props":504,"children":506},{"className":505},[],[507],{"type":110,"value":230},{"type":110,"value":509}," — The message identifier in decimal.",{"type":104,"tag":205,"props":511,"children":512},{},[513,518],{"type":104,"tag":138,"props":514,"children":516},{"className":515},[],[517],{"type":110,"value":386},{"type":110,"value":519}," — The name of the signal the comment applies to.",{"type":104,"tag":131,"props":521,"children":523},{"id":522},"values-val_",[524,526,532],{"type":110,"value":525},"Values (",{"type":104,"tag":138,"props":527,"children":529},{"className":528},[],[530],{"type":110,"value":531},"VAL_",{"type":110,"value":145},{"type":104,"tag":112,"props":534,"children":535},{},[536],{"type":110,"value":537},"Values, also called state-encoded signals or enums, are used when a signal value is used to indicate some state. For example:",{"type":104,"tag":159,"props":539,"children":541},{"code":540},"VAL_ 159 EPS_HCA_Status 0 \"disabled\" 1 \"initializing\" 2 \"fault\" ;\n",[542],{"type":104,"tag":138,"props":543,"children":544},{"__ignoreMap":99},[545],{"type":110,"value":540},{"type":104,"tag":201,"props":547,"children":548},{},[549,559,569,580],{"type":104,"tag":205,"props":550,"children":551},{},[552,557],{"type":104,"tag":138,"props":553,"children":555},{"className":554},[],[556],{"type":110,"value":531},{"type":110,"value":558}," — Indicates that this is a value.",{"type":104,"tag":205,"props":560,"children":561},{},[562,568],{"type":104,"tag":138,"props":563,"children":565},{"className":564},[],[566],{"type":110,"value":567},"159",{"type":110,"value":509},{"type":104,"tag":205,"props":570,"children":571},{},[572,578],{"type":104,"tag":138,"props":573,"children":575},{"className":574},[],[576],{"type":110,"value":577},"EPS_HCA_Status",{"type":110,"value":579}," — The name of the signal the values apply to.",{"type":104,"tag":205,"props":581,"children":582},{},[583,589,591,597],{"type":104,"tag":138,"props":584,"children":586},{"className":585},[],[587],{"type":110,"value":588},"0 \"disabled\"",{"type":110,"value":590}," — The raw value 0 decodes to ",{"type":104,"tag":138,"props":592,"children":594},{"className":593},[],[595],{"type":110,"value":596},"disabled",{"type":110,"value":598},". Similar for the values that follow.",{"type":104,"tag":131,"props":600,"children":602},{"id":601},"example",[603],{"type":110,"value":604},"Example",{"type":104,"tag":112,"props":606,"children":607},{},[608],{"type":110,"value":609},"Using software such as cabana, it's possible to visualize and decode messages from a DBC file:",{"type":104,"tag":159,"props":611,"children":613},{"code":612},"BO_ 170 WHEEL_SPEEDS: 8 XXX\n SG_ WHEEL_SPEED_FR : 7|16@0+ (0.01,-67.67) [0|250] \"km/h\" XXX\n SG_ WHEEL_SPEED_FL : 23|16@0+ (0.01,-67.67) [0|250] \"km/h\" XXX\n SG_ WHEEL_SPEED_RR : 39|16@0+ (0.01,-67.67) [0|250] \"km/h\" XXX\n SG_ WHEEL_SPEED_RL : 55|16@0+ (0.01,-67.67) [0|250] \"km/h\" XXX\n",[614],{"type":104,"tag":138,"props":615,"children":616},{"__ignoreMap":99},[617],{"type":110,"value":612},{"type":104,"tag":112,"props":619,"children":620},{},[621],{"type":104,"tag":622,"props":623,"children":626},"img",{"alt":624,"src":625},"Visualization of the wheel speed message from a Toyota Rav4 in cabana. The byte number is displayed on the left. The byte value is shown as a binary in the middle, and in hexadecimal on the right. The signals are shown in the bottom half.","/images/knowledge-base/networks/cabana_wheel_speed.png",[],{"title":99,"searchDepth":14,"depth":14,"links":628},[629,631,633,635,637,639],{"id":133,"depth":14,"text":630},"Nodes in the Network (BU_)",{"id":169,"depth":14,"text":632},"Messages (BO_)",{"id":268,"depth":14,"text":634},"Signals (SG_)",{"id":446,"depth":14,"text":636},"Comments (CM_)",{"id":522,"depth":14,"text":638},"Values (VAL_)",{"id":601,"depth":14,"text":604},"markdown","content:7.knowledge-base:3.tools:4.dbc-files.md","content","7.knowledge-base/3.tools/4.dbc-files.md","md",1778093002020]