[{"data":1,"prerenderedAt":350},["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":76,"_dir":97,"_draft":98,"_partial":98,"_locale":99,"title":77,"description":78,"part":79,"chapterNumber":80,"body":100,"_type":345,"_id":346,"_source":347,"_file":348,"_extension":349},"tools",false,"",{"type":101,"children":102,"toc":340},"root",[103,111,117,124,129,134,159,165,170,175,181,186,188,331],{"type":104,"tag":105,"props":106,"children":108},"element","h1",{"id":107},"can-adapters",[109],{"type":110,"value":77},"text",{"type":104,"tag":112,"props":113,"children":114},"p",{},[115],{"type":110,"value":116},"In this chapter, two USB-to-CAN adapters are discussed. These adapters are used to connect a computer to a CAN bus, and to send and receive CAN messages. Some adapters also support CAN FD.",{"type":104,"tag":118,"props":119,"children":121},"h2",{"id":120},"commaai-red-panda",[122],{"type":110,"value":123},"comma.ai red panda",{"type":104,"tag":112,"props":125,"children":126},{},[127],{"type":110,"value":128},"The comma.ai red panda is a USB-to-CAN adapter. It's mainly designed to work with the comma.ai openpilot project, but can also be used as a generic USB-to-CAN adapter. It is based on the STM32H725 microcontroller and has open source firmware. It supports CAN FD on all three main buses, plus the multiplexed bus.",{"type":104,"tag":112,"props":130,"children":131},{},[132],{"type":110,"value":133},"The panda is mainly intended to be used through comma.ai's Python API, which makes it easy to build custom tools for interacting with a vehicle. The Python API has support for efficiently sending and receiving CAN messages, but also implements high-level protocols such as ISO-TP, UDS, and CCP.",{"type":104,"tag":112,"props":135,"children":136},{},[137,139,148,150,157],{"type":110,"value":138},"The red panda exposes vehicle signals through comma's OBD-C connector. To break this out for bench use, use an ",{"type":104,"tag":140,"props":141,"children":145},"a",{"href":142,"rel":143},"https://comma.ai/shop/obd-c-cable",[144],"nofollow",[146],{"type":110,"value":147},"OBD-C cable",{"type":110,"value":149}," and a ",{"type":104,"tag":140,"props":151,"children":154},{"href":152,"rel":153},"https://shop.icanhack.nl/products/can-bus-throwing-star",[144],[155],{"type":110,"value":156},"CAN Bus Throwing Star",{"type":110,"value":158},".",{"type":104,"tag":118,"props":160,"children":162},{"id":161},"peak-system-pcan",[163],{"type":110,"value":164},"PEAK-System PCAN",{"type":104,"tag":112,"props":166,"children":167},{},[168],{"type":110,"value":169},"PEAK-System makes a range of PCAN adapters. The PCAN-USB FD is a single-channel USB adapter for CAN and CAN FD. It uses a DB-9 connector, supports ISO and non-ISO CAN FD, has galvanic isolation, and is supported by the Linux SocketCAN driver stack. PEAK also provides PCAN-View and the PCAN-Basic API for Windows.",{"type":104,"tag":112,"props":171,"children":172},{},[173],{"type":110,"value":174},"The classic PCAN-USB is also available if CAN FD is not needed.",{"type":104,"tag":118,"props":176,"children":178},{"id":177},"standard-db-9-pinout-for-can",[179],{"type":110,"value":180},"Standard DB-9 Pinout for CAN",{"type":104,"tag":112,"props":182,"children":183},{},[184],{"type":110,"value":185},"Many CAN adapters use a DB-9 connector to expose the CAN bus. The most common pinout is shown below. Usually a separate DB-9 connector is used for each CAN bus, but sometimes two are combined on the same connector.",{"type":110,"value":187},"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",{"type":104,"tag":189,"props":190,"children":191},"table",{},[192,211],{"type":104,"tag":193,"props":194,"children":195},"thead",{},[196],{"type":104,"tag":197,"props":198,"children":199},"tr",{},[200,206],{"type":104,"tag":201,"props":202,"children":203},"th",{},[204],{"type":110,"value":205},"Pin #",{"type":104,"tag":201,"props":207,"children":208},{},[209],{"type":110,"value":210},"Description",{"type":104,"tag":212,"props":213,"children":214},"tbody",{},[215,229,242,255,268,280,292,305,318],{"type":104,"tag":197,"props":216,"children":217},{},[218,224],{"type":104,"tag":219,"props":220,"children":221},"td",{},[222],{"type":110,"value":223},"1",{"type":104,"tag":219,"props":225,"children":226},{},[227],{"type":110,"value":228},"—",{"type":104,"tag":197,"props":230,"children":231},{},[232,237],{"type":104,"tag":219,"props":233,"children":234},{},[235],{"type":110,"value":236},"2",{"type":104,"tag":219,"props":238,"children":239},{},[240],{"type":110,"value":241},"CAN 1 Low",{"type":104,"tag":197,"props":243,"children":244},{},[245,250],{"type":104,"tag":219,"props":246,"children":247},{},[248],{"type":110,"value":249},"3",{"type":104,"tag":219,"props":251,"children":252},{},[253],{"type":110,"value":254},"Ground",{"type":104,"tag":197,"props":256,"children":257},{},[258,263],{"type":104,"tag":219,"props":259,"children":260},{},[261],{"type":110,"value":262},"4",{"type":104,"tag":219,"props":264,"children":265},{},[266],{"type":110,"value":267},"CAN 2 Low (optional)",{"type":104,"tag":197,"props":269,"children":270},{},[271,276],{"type":104,"tag":219,"props":272,"children":273},{},[274],{"type":110,"value":275},"5",{"type":104,"tag":219,"props":277,"children":278},{},[279],{"type":110,"value":254},{"type":104,"tag":197,"props":281,"children":282},{},[283,288],{"type":104,"tag":219,"props":284,"children":285},{},[286],{"type":110,"value":287},"6",{"type":104,"tag":219,"props":289,"children":290},{},[291],{"type":110,"value":254},{"type":104,"tag":197,"props":293,"children":294},{},[295,300],{"type":104,"tag":219,"props":296,"children":297},{},[298],{"type":110,"value":299},"7",{"type":104,"tag":219,"props":301,"children":302},{},[303],{"type":110,"value":304},"CAN 1 High",{"type":104,"tag":197,"props":306,"children":307},{},[308,313],{"type":104,"tag":219,"props":309,"children":310},{},[311],{"type":110,"value":312},"8",{"type":104,"tag":219,"props":314,"children":315},{},[316],{"type":110,"value":317},"CAN 2 High (optional)",{"type":104,"tag":197,"props":319,"children":320},{},[321,326],{"type":104,"tag":219,"props":322,"children":323},{},[324],{"type":110,"value":325},"9",{"type":104,"tag":219,"props":327,"children":328},{},[329],{"type":110,"value":330},"12 V (optional)",{"type":104,"tag":112,"props":332,"children":333},{},[334],{"type":104,"tag":335,"props":336,"children":339},"img",{"alt":337,"src":338},"Male and female DB-9 pin numbering, as seen from the connector side.","/images/knowledge-base/networks/db9.png",[],{"title":99,"searchDepth":14,"depth":14,"links":341},[342,343,344],{"id":120,"depth":14,"text":123},{"id":161,"depth":14,"text":164},{"id":177,"depth":14,"text":180},"markdown","content:7.knowledge-base:3.tools:1.can-adapters.md","content","7.knowledge-base/3.tools/1.can-adapters.md","md",1778093002014]