[{"data":1,"prerenderedAt":396},["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":16,"_dir":97,"_draft":98,"_partial":98,"_locale":99,"title":17,"description":18,"part":8,"chapterNumber":19,"body":100,"_type":391,"_id":392,"_source":393,"_file":394,"_extension":395},"networks",false,"",{"type":101,"children":102,"toc":384},"root",[103,111,117,124,129,215,221,226,231,237,242,251,301,306,329,336,341],{"type":104,"tag":105,"props":106,"children":108},"element","h1",{"id":107},"local-interconnect-network-lin",[109],{"type":110,"value":17},"text",{"type":104,"tag":112,"props":113,"children":114},"p",{},[115],{"type":110,"value":116},"The LIN bus is a single-wire bus used for low-speed communication between ECUs. It was developed in 1999 as a low-cost alternative to CAN. It's used for non-critical systems such as door locks, mirrors, wipers, and climate control.",{"type":104,"tag":118,"props":119,"children":121},"h2",{"id":120},"history",[122],{"type":110,"value":123},"History",{"type":104,"tag":112,"props":125,"children":126},{},[127],{"type":110,"value":128},"A brief history of LIN:",{"type":104,"tag":130,"props":131,"children":132},"ul",{},[133,145,155,165,175,185,195,205],{"type":104,"tag":134,"props":135,"children":136},"li",{},[137,143],{"type":104,"tag":138,"props":139,"children":140},"strong",{},[141],{"type":110,"value":142},"1999",{"type":110,"value":144}," — LIN 1.0 is released by the LIN consortium (BMW, Volkswagen, Audi, Volvo, Mercedes-Benz, Volcano Automotive and Motorola).",{"type":104,"tag":134,"props":146,"children":147},{},[148,153],{"type":104,"tag":138,"props":149,"children":150},{},[151],{"type":110,"value":152},"2000",{"type":110,"value":154}," — LIN 1.1 and LIN 1.2 are released.",{"type":104,"tag":134,"props":156,"children":157},{},[158,163],{"type":104,"tag":138,"props":159,"children":160},{},[161],{"type":110,"value":162},"2002",{"type":110,"value":164}," — LIN 1.3 is released with some revisions to the physical layer, improving compatibility between nodes.",{"type":104,"tag":134,"props":166,"children":167},{},[168,173],{"type":104,"tag":138,"props":169,"children":170},{},[171],{"type":110,"value":172},"2003",{"type":110,"value":174}," — LIN 2.0 is released with an improved checksum, support for sporadic and event-triggered frames, and reading diagnostic information from nodes.",{"type":104,"tag":134,"props":176,"children":177},{},[178,183],{"type":104,"tag":138,"props":179,"children":180},{},[181],{"type":110,"value":182},"2006",{"type":110,"value":184}," — LIN 2.1 is released with improved diagnostics and configuration.",{"type":104,"tag":134,"props":186,"children":187},{},[188,193],{"type":104,"tag":138,"props":189,"children":190},{},[191],{"type":110,"value":192},"2010",{"type":110,"value":194}," — LIN 2.2A released, correcting some minor errors and changing rules for bit sampling.",{"type":104,"tag":134,"props":196,"children":197},{},[198,203],{"type":104,"tag":138,"props":199,"children":200},{},[201],{"type":110,"value":202},"2016",{"type":110,"value":204}," — LIN standardized as ISO 17987.",{"type":104,"tag":134,"props":206,"children":207},{},[208,213],{"type":104,"tag":138,"props":209,"children":210},{},[211],{"type":110,"value":212},"2025",{"type":110,"value":214}," — The ISO 17987 series was updated. This chapter follows the current ISO terminology: commander and responder.",{"type":104,"tag":118,"props":216,"children":218},{"id":217},"physical-layer",[219],{"type":110,"value":220},"Physical Layer",{"type":104,"tag":112,"props":222,"children":223},{},[224],{"type":110,"value":225},"A LIN bus consists of one commander and up to 16 responder nodes. The commander node is responsible for scheduling the communication on the bus. Responders can only send data when requested by the commander. The bus can be up to 40 m long and run at a maximum speed of 19.2 kbit/s (20 kbit/s for LIN 2.0). It supports up to 8 bytes of data per frame.",{"type":104,"tag":112,"props":227,"children":228},{},[229],{"type":110,"value":230},"The physical specification is based on ISO 9141 (K-Line) and only requires a single wire. The bus is pulled high to 12 V by a pull-up resistor. A dominant bit is sent by pulling the bus low. A recessive bit is sent by releasing the bus. The bus is idle when it's pulled high.",{"type":104,"tag":118,"props":232,"children":234},{"id":233},"lin-frame",[235],{"type":110,"value":236},"LIN Frame",{"type":104,"tag":112,"props":238,"children":239},{},[240],{"type":110,"value":241},"A LIN transaction starts with a frame header from the commander node with the following content.",{"type":104,"tag":112,"props":243,"children":244},{},[245],{"type":104,"tag":246,"props":247,"children":250},"img",{"alt":248,"src":249},"LIN frame showing the header from the commander and the response from the addressed responder.","/images/knowledge-base/networks/lin_frame.svg",[],{"type":104,"tag":130,"props":252,"children":253},{},[254,272,291],{"type":104,"tag":134,"props":255,"children":256},{},[257,262,264,270],{"type":104,"tag":138,"props":258,"children":259},{},[260],{"type":110,"value":261},"SBF (Start Bit Field)",{"type":110,"value":263}," — Used to indicate the start of a frame. It contains 13 (or more) dominant bits, followed by one recessive bit, the ",{"type":104,"tag":265,"props":266,"children":267},"em",{},[268],{"type":110,"value":269},"Sync delimiter",{"type":110,"value":271},".",{"type":104,"tag":134,"props":273,"children":274},{},[275,280,282,289],{"type":104,"tag":138,"props":276,"children":277},{},[278],{"type":110,"value":279},"Sync",{"type":110,"value":281}," — The Sync Field is used to synchronize the clock between the commander and the other nodes. It consists of a single byte with the value ",{"type":104,"tag":283,"props":284,"children":286},"code",{"className":285},[],[287],{"type":110,"value":288},"0x55",{"type":110,"value":290},", containing alternating dominant and recessive bits.",{"type":104,"tag":134,"props":292,"children":293},{},[294,299],{"type":104,"tag":138,"props":295,"children":296},{},[297],{"type":110,"value":298},"PID (Protected Identifier)",{"type":110,"value":300}," — Contains the 6-bit frame identifier and two parity bits (computed over the ID). The frame identifier is used by the responder to determine if it should respond to the frame.",{"type":104,"tag":112,"props":302,"children":303},{},[304],{"type":110,"value":305},"The responder then transmits the response. It is also possible for the commander to reply to its own header to send data to one or more responders.",{"type":104,"tag":130,"props":307,"children":308},{},[309,319],{"type":104,"tag":134,"props":310,"children":311},{},[312,317],{"type":104,"tag":138,"props":313,"children":314},{},[315],{"type":110,"value":316},"Data",{"type":110,"value":318}," — The data field contains the actual payload of the frame. It can be 2, 4 or 8 bytes long.",{"type":104,"tag":134,"props":320,"children":321},{},[322,327],{"type":104,"tag":138,"props":323,"children":324},{},[325],{"type":110,"value":326},"Checksum",{"type":110,"value":328}," — Contains an 8-bit checksum. For LIN 1.x this was computed over the data bytes only, while for LIN 2.x the identifier is also included in the checksum.",{"type":104,"tag":330,"props":331,"children":333},"h3",{"id":332},"types-of-frames",[334],{"type":110,"value":335},"Types of Frames",{"type":104,"tag":112,"props":337,"children":338},{},[339],{"type":110,"value":340},"The following types of frames can be distinguished:",{"type":104,"tag":130,"props":342,"children":343},{},[344,354,364,374],{"type":104,"tag":134,"props":345,"children":346},{},[347,352],{"type":104,"tag":138,"props":348,"children":349},{},[350],{"type":110,"value":351},"Unconditional Frame",{"type":110,"value":353}," — The most common type of frame, where the commander requests data from a responder. The commander initiates the transaction and a single responder replies with the data.",{"type":104,"tag":134,"props":355,"children":356},{},[357,362],{"type":104,"tag":138,"props":358,"children":359},{},[360],{"type":110,"value":361},"Event Triggered Frame",{"type":110,"value":363}," — Used to receive data that does not change very often. Using event-triggered frames saves bandwidth by not needing to poll each responder individually. The commander asks all responders if they have new data to send. Then all responders may respond simultaneously with the data, but most of the time this will be only one node. When multiple nodes respond at the same time, the commander detects a collision and interrogates each node individually using unconditional frames.",{"type":104,"tag":134,"props":365,"children":366},{},[367,372],{"type":104,"tag":138,"props":368,"children":369},{},[370],{"type":110,"value":371},"Sporadic Frame",{"type":110,"value":373}," — Sometimes the commander needs to send data to responders. In this case the commander starts the transaction, but then replies to its own header with the data.",{"type":104,"tag":134,"props":375,"children":376},{},[377,382],{"type":104,"tag":138,"props":378,"children":379},{},[380],{"type":110,"value":381},"Diagnostic Frame",{"type":110,"value":383}," — The LIN 2.2A specification reserves ID 60 and 61 for diagnostic and configuration purposes, such as dynamically assigning a node address or issuing sleep commands.",{"title":99,"searchDepth":14,"depth":14,"links":385},[386,387,388],{"id":120,"depth":14,"text":123},{"id":217,"depth":14,"text":220},{"id":233,"depth":14,"text":236,"children":389},[390],{"id":332,"depth":19,"text":335},"markdown","content:7.knowledge-base:1.networks:3.lin-bus.md","content","7.knowledge-base/1.networks/3.lin-bus.md","md",1778093001989]