CAN messages
How the CAN message catalogues are written: bytes counted from 0, hex throughout, byte order per signal and an evidence level on everything. Where the data lives and how to add a message.
Each bus has a catalogue page that lists the messages seen on it: the identifier, the length, who sends and receives it where that is known, example frames, and what each byte is thought to mean. The pages are built from one hand-written data file, so the same data can later feed other tools, such as a DBC file for SavvyCAN or cantools, or an app.
The catalogues
Section titled “The catalogues”| Bus | Page | Status |
|---|---|---|
| Infotainment CAN | Infotainment CAN messages | 26 IDs from one A4 B6 (2016 capture by janssuuh), not checked on the owner’s car |
| Convenience CAN | Convenience CAN messages | Empty: no captures yet |
| Drivetrain CAN | Drivetrain CAN messages | Empty: no captures yet |
| Ring and keep-alive messages | Network management | What the infotainment capture shows of how modules announce themselves |
Text on the cluster display has its own pages: Writing text to the cluster display and FIS character set.
How a message is written down
Section titled “How a message is written down”- Identifier. The 11-bit CAN ID in hex, written
0xand three upper-case digits:0x351,0x6C0. The heading of each message has an anchor made from it, in lower case:/protocols/can-messages/infotainment/#id-0x351. - Bytes are counted from 0, in the order they are sent, as candump and SavvyCAN show them. An 8-byte frame has bytes 0 to 7. The infotainment source counts the same way (“00 01 02 03 04 05 06 07”).
- Hex everywhere. Frame data is written as two upper-case hex digits per byte with single spaces:
00 6E 10 AE 09 76 75 05. Values in a signal’s value list are hex too (0x08). Decimal numbers say so, or carry a unit. - DLC is the number of data bytes, 0 to 8.
- Byte order is given for every signal that spans more than one byte. Little-endian means the first byte sent is the least significant: the speed in
0x351is bytes 1 and 2,6E 10, read as0x106E. Big-endian means the first byte is the most significant. Where the order is not known, the catalogue says unknown. - Bits inside a byte are numbered 0 (least significant) to 7. A signal that is not whole bytes gives its start bit and length. In the catalogue, “byte 0, bits 4–7” is the high hex digit of byte 0.
- Sender and receivers are given only where a capture or document establishes them; otherwise they show as unknown, and a sender read from a description (“KI looks for RNS-E”) is in the message’s notes. Module codes such as J285 link to the component page.
- Generations. Each message lists the generation it was seen on. A message seen on a B6 is not assumed to exist on a B7.
Evidence levels
Section titled “Evidence levels”Evidence levels are defined in the Protocols overview: observed, interpreted, verified or documented. Each message carries two: one for its frames (was this ID, with this length and data, seen on the bus?) and one for its meaning (what the message is for, as its name and notes say). Each signal carries its own as well. The catalogue shows the meaning badge beside the message name, and the frames badge in the line below. A frame can be observed while what it means is only interpreted.
On the infotainment page, the frames are observed (copied from a capture) and every meaning is interpreted. 0x6C0 and 0x6C1 have no frame in the source, so their frames are interpreted too. Rows the original post prints in red carry a note. Nothing is verified yet.
The data file
Section titled “The data file”The catalogues are rendered from site/src/data/protocols/can-messages.json. It is written by hand; no tool generates it. The fields are described in docs/data-model.md (section CAN messages and the FIS character set), and npm test in site/ checks the file: an ID written wrongly, a byte outside the frame or an example of the wrong length fails the tests and says where.
There is one entry per bus and ID. An ID seen with several payloads, such as the RNS-E buttons on 0x461, is one entry with several example frames, and the byte that changes becomes a signal with a list of values.
Adding a message
Section titled “Adding a message”- Capture the bus as described in Contributing a capture: the car, the bus and where it was tapped, the tool, the ignition state, the raw frames, and what was done in the car at the time.
- Add an entry to
can-messages.jsonwith the bus, ID, DLC, the frames you saw asexamples, andevidence: "observed".meaningEvidence(what the message is for) isinterpretedunless you set it. Add the capture or document tosourcesand pointsourceat it. - Add signals only for bytes you can say something about. A meaning you worked out from the data is
interpreted. It becomesverifiedonly after a check on the owner’s car, withverifiedOngiving the date and the method. - Run
npm testinsite/, then look at the bus page innpm run dev.
Related
Section titled “Related”Sources
- Known CANID's (janssuuh, 18 March 2016) — janssuuhThe first messages in the catalogue: infotainment CAN of one A4 B6. Read from a screenshot of an English machine translation of the Dutch post; the original could not be retrieved to check against it.