Hi all,
I've been reverse-engineering the CAN bus of my 2026 Yamaha R9 so I can log the bike's own data in RaceChrono without Y-TRAC or an AiM logger. It started from the "PIDs for yamaha" thread here and the T7 / MT-07 projects, so I'm posting back what I found. Everything is public: https://github.com/DeziderMesko/motocan
Yes Claude was heavily used (including for this summary :-)
The short version
- The red 6-pin Euro5 connector under the seat: pin 2 = CAN High, 5 = CAN Low, 3 = ground, 4 = +12 V. 500 kbps.
- None of the ids known from the T7 / MT-07 / MT-09 (
0x20A, 0x216, 0x236 …) are on it. The R9 has three separate CAN pairs, and the diagnostic connector is on one that has only the ECU on it. The ids are different: 0x27C, 0x512 and a block from 0x750 to 0x76E, 23 ids and about 506 frames/s in total.
- In listen-only mode you get almost nothing. I saw 2 ids, one of them retransmitted thousands of times a second, because nothing on that pair acknowledges the ECU's frames. Once my adapter was allowed to ACK (normal mode, but never sending a frame of its own), all 23 ids appeared. This cost me a whole session to figure out, so if your Euro5+ Yamaha looks dead on that connector, try this.
What I have decoded (bytes numbered from 0)
Packet ID: 0x27C (100 Hz)
RPM = bytes 0-1, big-endian, * 100 / 256 -> bytesToUint(raw, 0, 2) * 100.0 / 256
Gear = byte 4 & 0x07 (0 = N, 1-6, 7 = between gears)
-> bytesToUint(raw, 4, 1) & 7
ECU gear = (byte 3 >> 5) & 0x07 (holds the last gear between gears; 0 in N and with the engine off)
TCS level = (byte 3 >> 1) & 0x0F (as on the dash) -> bitsToUintLe(raw, 25, 4)
PWR = (byte 4 >> 6) + 1 (1-4, as on the dash) -> bitsToUintLe(raw, 38, 2) + 1
Rear pulses = byte 2 (pulses in each 10 ms frame, 46 to a wheel revolution)
Start bit = byte 3 & 0x01 (1 for about half a second while the starter turns)
First start = byte 6 >> 7 (0 from key-on to the first start, 1 after it)
Packet ID: 0x383 (10 Hz)
Brake = (byte 4 >> 3) & 0x01 (1 while either brake is on)
Packet ID: 0x512 (1 Hz)
Water temp = byte 0 * 0.625 - 30 [°C] -> bytesToUint(raw, 0, 1) * 0.625 - 30
Air temp = byte 1 * 0.625 - 30 [°C] -> bytesToUint(raw, 1, 1) * 0.625 - 30
Packet ID: 0x751 (100 Hz)
Neutral = byte 6: 0x60 or 0x70 = neutral, 0x00 = in gear (engine off only; use Gear above)
Packet ID: 0x756 (20 Hz)
Rear wheel speed raw = (b3 >> 4) << 12 | (b1 & 0x0F) << 8 | (b0 & 0xF0) | b2 >> 4 km/h = raw / 100
-> (bitsToUintLe(raw, 28, 4) * 4096 + bitsToUintLe(raw, 4, 8) * 16 + bitsToUintLe(raw, 20, 4)) / 360.0
Packet ID: 0x758 (20 Hz)
Throttle grip (APS) raw = (b7 & 0x0F) << 12 | (b6 & 0x0F) << 8 | b5 % = raw / 31672 * 100
-> (bitsToUintLe(raw, 56, 4) * 4096 + bitsToUintLe(raw, 40, 12)) * 100.0 / 31672
Throttle valve (TPS) raw = (b0 >> 4) << 8 | b2 % = raw / 16 / 144.4 * 100
-> (bitsToUintLe(raw, 4, 4) * 256 + bitsToUintLe(raw, 16, 8)) * 100.0 / 2310.4
Packet ID: 0x759 (20 Hz)
Throttle valve, commanded raw = (b0 >> 4) << 4 | (b2 >> 4) % = raw / 144.4 * 100
-> (bitsToUintLe(raw, 4, 4) * 16 + bitsToUintLe(raw, 20, 4)) * 100.0 / 144.4
Packet ID: 0x765 (10 Hz)
Front wheel speed raw = (b0 >> 4) << 12 | (b2 >> 4) << 8 | (b6 >> 4) << 4 | (b3 & 0x0F) km/h = raw / 100
-> (bitsToUintLe(raw,4,4)*4096+bitsToUintLe(raw,20,4)*256+bitsToUintLe(raw,52,4)*16+bitsToUintLe(raw,24,4))/360.0
(on a stand with only the rear turning, it takes the rear's value after some seconds)
Packet ID: 0x76D (2 Hz)
Cruise RES+ = byte 3 & 0x01 (1 while held)
Cruise SET- = (byte 5 >> 4) & 0x01 (1 while held)
Packet ID: 0x76E (2 Hz)
PWR = byte 1 + 1
Display = byte 2: 0x10 = Track, 0x20 = normal -> if(bytesToUint(raw, 2, 1) == 16, 1, 0)
How sure I am: RPM was checked against a recording of the engine’s sound and against a second frame that carries the hundreds separately, up to 3 400 rpm; gear, TCS and water temperature against the dash (12, 10 and 6 readings, all matching); PWR against 5 dash photos of 5 and the values in the dash’s mode menu; the brake on 4 pulls of 4; the cruise buttons on 2 presses each; grip against both mechanical stops. The rear wheel speed was checked against the wheel’s own pulses (46 holes on the sensor ring, counted by hand): at 0.01 km/h it gives a 1.936 m wheel, which is the tyre, and it was seen up to 59 km/h on a stand. The front field follows the front wheel turned by hand, but on a stand with only the rear turning it takes the rear’s value after a few seconds. The valve’s zero is provisional - a warm idle reads about 8 %.
What is not there
Lean angle, the ride mode’s number, the SCS / LIF / quickshifter / launch-control settings, battery voltage and fuel are not on this connector.
What's in the repo
- the table above, and the same as a DBC file (
analysis/r9.dbc);
- six raw captures in candump format, with timestamps of what I did and what the dash showed, so you can check my work or look for things I missed;
- every id described, including the unknown ones;
- the scripts I use for a capture session (CANable + laptop, Linux/WSL);
- Bluecan, the RaceChrono DIY device I’m building on an ESP32-S3 Feather from joeroback’s racechrono-canbus: firmware, documentation and tools. It acknowledges the ECU’s frames without ever sending one of its own, and works with RaceChrono on the bench against replays of the captures. It has not been on the bike yet.
Nothing was captured while riding, and I have not sent any requests to the ECU - this is all broadcast traffic.
If you have an R9, an MT-09 / XSR900 / Tracer 9 from 2024 on, or an R7 with the same electronics, I'd love to know whether your connector behaves the same way and whether the ids match. And if anyone recognises some of the unnamed fields, even better.
Thanks to everyone in the Yamaha PIDs thread - it's what got me started.