eculocate

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

commit 996abe6efb4e97ba0f9f26d51fad54466110a1bd
parent 6439bdb3df95a382896716e0de2cf35d631e8327
Author: Daniel Barlow <dan@telent.net>
Date:   Sun, 16 Nov 2025 21:18:16 +0000

some notes

Diffstat:
AREADME.md | 4++++
Anotes.md | 178+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 182 insertions(+), 0 deletions(-)

diff --git a/README.md b/README.md @@ -0,0 +1,4 @@ +# ECU-logical + +Read data from the K-line of a Honda motorbike ECU and publish it +using Bluetooth LE diff --git a/notes.md b/notes.md @@ -0,0 +1,178 @@ +# Resources + +https://github.com/aeaphichart/HondaECU-1 + + - interface with optocouplers + - table of "keihin codes" (38770-foo model numbers) + - "If you make a bench harness to work with your ECU you will need a 2.5 amp power supply." + - fork https://github.com/Roxxas21/HondaEcuTest/tree/Roxxas21-patch-1 + +https://github.com/sophienyaa/Honda-Motorcycle-ECU-Tools/blob/master/scan.ino + + - for CRF250, scan all tables + - scanning the code it looks like it's mostly 11 and D1 + +https://gonzos.net/projects/ctx-obd/ + + - Honda CTX-700 + - explains checksum algo + +https://github.com/aster94/Keyword-Protocol-2000 + + - Suzuki and Kawasaki, untested on Hondas + - circuit diagram for L9637 + - needs 510R resistor, 100n capacitor + +https://github.com/martinhol221/ISO14230-4-KWP + + - Russian + - citroen c3 + - https://github-com.translate.goog/martinhol221/ISO14230-4-KWP/blob/master/README.md?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-US&_x_tr_pto=wapp + +https://rust-classes.com/chapter_embedded_stmf401 + + - Rust for embedded STM32F401CCU6 boards + +https://sigrok.org/wiki/Main_Page + + - software for usb signal analyser + +https://netcult.ch/elmue/HUD%20ECU%20Hacker/ + + - more ecu hacking software, charityware + - describes honda init sequence + +https://www.liwebikes.com/pgm_fi-90.html + - cbr125rw ecm pinout + - this may be an earlier year + +https://www.manualslib.com/manual/1244336/Honda-Cbr125r.html?page=99#manual + +https://themotorbikeforum.co.uk/uploads/monthly_2018_05/7.jpg.e9632588ec1d17c0f74223b06cb81b0f.jpg +https://themotorbikeforum.co.uk/topic/30235-cbr125-electrical-fault/ + + - photo of wiring diagram for CBR125R 2012, looks + to be the same ecu connection to DLC as whatever year is the + carlsalter.com source + +https://www.carlsalter.com/mcpdf/Honda%20-%20cbr125rw-service-manual.pdf + - wirig diagram, yay. !Caution: this is 2007 model! + pin 1 Bl/W IGP "ignition power" (also seen on DLC) + pin 15 SCS + pin 30 k-line + pin 9 and 10 ground, so maybe that helps us find which way the pins + are numbered + +service manual p 17-6 has a diagram of the ecu harness connector +(female side) showing blue/yellow and white/yellow wires in the right +hand side (CKP sensor) (pins 12, 23). this implies that pin 1 is top right +when looking at the female side => top left looking at the ecu itself + +additionally, p5-66 labels pin 1 at top right of "wire side/female +connector". It says pins 2, 9, 10 sohuld be ground + +as a side note, there is no permanent power to the ecu, only ignition +power + + +https://publicism.info/engineering/penetration/8.html + + - build an ecu test bench + +https://github.com/AutotronicCommunity/Honda_Keihin_KLine_Protocol + + - has a different init sequence which supposedly sends a response to + the first byte sequence + + > Wake Up with send to ECU code = FE 04 72 8C + > ECU Response with code = 0E 04 72 7C + + vs gonzo.net which says + > Send “Wakeup” message: FE 04 FF FF. No response is expected + + (The second req/resp is the same) + + + +# Data available + +What BLE shall we publish? + +From https://gonzos.net/projects/wp-content/uploads/2015/09/Honda-data-tables.pdf + +Not all attributes are present for all bikes. + +RPM +TPS volt/% +ECT volt/deg C +IAT volt/deg C +MAP volt/kPa +Batt volt +Speed +Fuel inj (?) +Engine on/off +[Neutral/clutch, in gear, kickstand] + +Should we have one service for all the things, or separate services +for each? I assume that separate services make it easier to add more +later without having to change clients + + ++ rpm ++ tps + - voltage + - percentage ++ ect + - voltage + - degrees + +... etc + + + + +We could independently source bank angle and acceleration/deceleration +if we use a board with an IMU, so consider adding them to the profile +(or have two profiles). + +there don't appear to be services for this kind of thing +some characteristics that exist: + - uuid: 0x2C09 + name: Rotational Speed + id: org.bluetooth.characteristic.rotational_speed + (32 bits, signed => -2^31 < rpm < 2^31) + - uuid: 0x2A6E + name: Temperature + id: org.bluetooth.characteristic.temperature + (16 bits, 2dp => 0 <= t < 655.36) + - uuid: 0x2B18 + name: Voltage + id: org.bluetooth.characteristic.voltage + (16 bits, V/64 => 0 < v < 1022 + - uuid: 0x2A6D + name: Pressure + id: org.bluetooth.characteristic.pressure + - id: org.bluetooth.characteristic.percentage_8 + (8 bits, 0.5% resolution) + - id: org.bluetooth.characteristic.boolean + 0 = false, 1 = true + +is there any characteristic here that + + +specs of each characteristic are at +https://bitbucket.org/bluetooth-SIG/public/src/main/gss/ + +A common practice is to choose a base UUID for the custom service and then increment the 3rd and 4th Most Significant Bytes (MSB) within the UUID of each included characteristic + + + +# System architecture + +So far there is none. This is my first Rust program + +We'd like shared "scoreboard" of all the values which is mutated by +the ecu-polling code and read by the BLE publishing code. + +It would be good to know whether the data was stale (have we lost ECU +connection? some other problem?)