eculocate

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 0f4b504d992631429ef6e552ee414698d281bdb8
parent 5a0435f5eb977f62960eea662c9f0e3c3748b879
Author: Daniel Barlow <dan@telent.net>
Date:   Sat, 22 Nov 2025 00:31:27 +0000

dump all tables for cbr125r

Diffstat:
Mnotes.md | 21+++++++++++++++++++++
Msrc/ecu.rs | 25+++++++++++--------------
2 files changed, 32 insertions(+), 14 deletions(-)

diff --git a/notes.md b/notes.md @@ -133,6 +133,27 @@ later without having to change clients ... etc +## CBR125R + +there is data in tables 0 0x11 0x20 0x61 0x70 0xd0 0xd1 + +0x0 has values [1, 0, c6, 1, 2, 1, 0 ..... ] +0x11 has values [0 0 6 0 ff a ff a f1 a8 ff ff 7f 0 0 0 80 93 5a 37 +8f] +matches the 0x11 table for cb600f pc41 in +https://gonzos.net/projects/wp-content/uploads/2015/09/Honda-data-tables.pdf + +[ we've only tested battery voltage but the others are not obviously wrong) + +0x20 has values [ff, 80, 0, 0, 0, 0 .....] +0x61 is _not_ a copy of 0x11 as it was in the cb600f + [0 0 1a 0 9c 3e a3 3c 93 64 ff ff 3f 0 0 0 80 0 c2 4b 7d] +0x70 has values [bc, 80, 0 .....] +0xd0 [87, 12*0, ff, 6*0] +0xd1 [2, 0, 0, 0, 4, 1, 0 ...] + +0x20 and 0x70 look similar but not the same + diff --git a/src/ecu.rs b/src/ecu.rs @@ -72,7 +72,7 @@ impl Ecu<'_> { while received < expected { let bytes = uart.read_async(&mut receive[received..]).await.expect("read failed"); received += bytes; - info!("read {bytes} {received} of {}", receive.len()); + // info!("read {bytes} {received} of {}", receive.len()); } &receive[0..expected] } else { @@ -115,21 +115,18 @@ impl Ecu<'_> { &mut buf).await; info!("matches {}", handshake == b"\x02\x04\x00\xfa"); - let table_11 = Self::chat(&mut uart, - &mut [0x72, 0x07, 0x72, 0x11, 0, 0x14, 0xF0], - &mut buf).await; - for b in table_11 { - info!("table {:x?}", b); + for i in (0..0xff) { + let table = Self::chat(&mut uart, + &mut [0x72, 0x07, 0x72, i, 0, 0x14, 0x0], + &mut buf).await; + if table.len() > 6 { + for b in &table[5..] { + info!("table {} {:x?}", i, b); + } + } } - // next steps: - // - use reply length byte to get whole packet - // - implement checksum algo - // - try some other tables - - // checksum is (0x100 - (sum of bytes in message, mod 0x100)) - - + // reply for table 11 query // 2 - dest // 1a - (26) chars in message // 72 - query type