BMW_E8x_EPS/files/bmw_e8x_ptcan.dbc
Luca c32c4645b5 Reverse-engineer BMW E8x EPS for standalone operation
Tooling and findings for running an E8x/E9x electric power steering unit
outside its donor car, e.g. in an EV conversion.

Headline result: the EPS needs only two CAN messages plus a 12V enable
wire, not the 69-message set the car puts on the bus:
  0x130 CAS terminal status (100ms) brings the unit up
  0x1A0 DSC road speed (20ms) sets the assist level
Total required rate is 60 frames/s. Protocol write-up, including what is
proven vs. inferred and the open questions, is in eps-comms/.

Contents:
  adapters/   CANdapter (its SLCAN dialect differs) and generic SLCAN
  gateway/    car<->EPS relay, replay, message bench, EPS controller,
              4-tab Streamlit UI
  decoder/    PT-CAN frame decoding and live/replay sources
  can-io/     XIAO ESP32-S3 firmware: CAN IO board + USB-CAN bridge with
              a CAN-independent digital IO channel
  tools/      capture, bitrate scan, startup-order and session analysis,
              checksum solver
  captures/   reference working session + the replay set eps_control reads
2026-08-29 19:34:43 +02:00

146 lines
5.6 KiB
Text

VERSION "BMW E8x PT-CAN - reverse engineered from capture_Start-Stop.csv"
NS_ :
NS_DESC_
CM_
BA_DEF_
BA_
VAL_
CAT_DEF_
CAT_
FILTER
BA_DEF_DEF_
EV_DATA_
ENVVAR_DATA_
SGTYPE_
SGTYPE_VAL_
BA_DEF_SGTYPE_
BA_SGTYPE_
SIG_TYPE_REF_
VAL_TABLE_
SIG_GROUP_
SIG_VALTYPE_
SIGTYPE_VALTYPE_
BO_TX_BU_
BA_DEF_REL_
BA_REL_
BA_DEF_DEF_REL_
BU_SG_REL_
BU_EV_REL_
BU_BO_REL_
BS_:
BU_: DME DSC SZL CAS KOMBI EPS UNKNOWN
BO_ 168 DME_Torque: 8 DME
SG_ Checksum : 0|8@1+ (1,0) [0|255] "" EPS
SG_ AliveCounter : 8|4@1+ (1,0) [0|14] "" EPS
SG_ TorqueSigned : 16|8@1- (1,0) [-128|127] "" EPS
SG_ Field_b3hi : 28|4@1+ (1,0) [0|15] "" EPS
SG_ CalConstant : 40|16@1+ (1,0) [0|65535] "" EPS
SG_ StatusFlags : 56|8@1+ (1,0) [0|255] "" EPS
BO_ 169 DME_Voltage: 8 DME
SG_ Checksum : 0|8@1+ (1,0) [0|255] "" EPS
SG_ AliveCounter : 8|4@1+ (1,0) [0|14] "" EPS
SG_ SystemVoltage : 28|12@1+ (0.0555,0) [0|227] "V" EPS
SG_ Unknown_b5 : 40|8@1+ (1,0) [0|255] "" EPS
SG_ Unknown_b6 : 48|8@1+ (1,0) [0|255] "" EPS
BO_ 170 DME_EngineSpeed: 8 DME
SG_ Checksum : 0|8@1+ (1,0) [0|255] "" EPS
SG_ AliveCounter : 8|4@1+ (1,0) [0|14] "" EPS
SG_ EngineSpeed : 32|16@1+ (0.15625,0) [0|10000] "rpm" EPS
SG_ EngineStateFlags : 48|8@1+ (1,0) [0|255] "" EPS
SG_ LoadEstimate : 56|8@1+ (1,0) [0|255] "" EPS
BO_ 182 DSC_B6: 5 DSC
SG_ Checksum : 0|8@1+ (1,0) [0|255] "" EPS
SG_ AliveCounter : 8|8@1+ (1,0) [0|14] "" EPS
SG_ Payload : 16|24@1+ (1,0) [0|16777215] "" EPS
BO_ 196 SZL_SteeringAngle: 7 SZL
SG_ SteeringAngle : 0|16@1- (0.04395,0) [-1440|1440] "deg" EPS
SG_ SteeringRate : 24|16@1- (0.04395,0) [-2000|2000] "deg/s" EPS
BO_ 200 SZL_SteeringAngleSlow: 6 SZL
SG_ SteeringAngle : 0|16@1- (0.04395,0) [-1440|1440] "deg" EPS
SG_ SteeringRate : 24|16@1- (0.04395,0) [-2000|2000] "deg/s" EPS
SG_ AliveCounter : 44|4@1+ (1,0) [0|14] "" EPS
BO_ 206 DSC_WheelSpeeds: 8 DSC
SG_ WheelSpeed_FL : 0|16@1+ (1,0) [0|65535] "" EPS
SG_ WheelSpeed_FR : 16|16@1+ (1,0) [0|65535] "" EPS
SG_ WheelSpeed_RL : 32|16@1+ (1,0) [0|65535] "" EPS
SG_ WheelSpeed_RR : 48|16@1+ (1,0) [0|65535] "" EPS
BO_ 304 CAS_TerminalStatus: 5 CAS
SG_ TerminalStatus : 0|8@1+ (1,0) [0|255] "" EPS
SG_ TerminalStatus2 : 8|8@1+ (1,0) [0|255] "" EPS
SG_ Unknown_b2 : 16|8@1+ (1,0) [0|255] "" EPS
SG_ Unknown_b3 : 24|8@1+ (1,0) [0|255] "" EPS
SG_ AliveCounter : 32|4@1+ (1,0) [0|14] "" EPS
SG_ CheckNibble : 36|4@1+ (1,0) [0|15] "" EPS
BO_ 414 DSC_Status: 8 DSC
SG_ EngineRunFlag : 8|8@1+ (1,0) [0|255] "" EPS
SG_ SlowCounter : 20|4@1+ (1,0) [0|15] "" EPS
SG_ StateFlags : 40|8@1+ (1,0) [0|255] "" EPS
SG_ Checksum : 56|8@1+ (1,0) [0|255] "" EPS
BO_ 416 DSC_RoadSpeed: 8 DSC
SG_ VehicleSpeed : 0|12@1+ (0.1,0) [0|400] "km/h" EPS
SG_ SpeedFlags : 12|4@1+ (1,0) [0|15] "" EPS
SG_ AliveCounter : 28|4@1+ (1,0) [0|14] "" EPS
SG_ Checksum : 56|8@1+ (1,0) [0|255] "" EPS
BO_ 422 DSC_Accumulator: 8 DSC
SG_ SlowCounter : 0|8@1+ (1,0) [0|255] "" EPS
SG_ FastCounter : 52|8@1+ (1,0) [0|255] "" EPS
BO_ 436 KOMBI_Status: 8 KOMBI
SG_ VehicleSpeed : 0|12@1+ (0.1,0) [0|400] "km/h" EPS
SG_ SpeedFlags : 12|4@1+ (1,0) [0|15] "" EPS
SG_ AliveCounter : 24|4@1+ (1,0) [0|14] "" EPS
SG_ WarningLamps : 32|16@1+ (1,0) [0|65535] "" EPS
SG_ Checksum : 56|8@1+ (1,0) [0|255] "" EPS
BO_ 464 DME_TempsAndFuel: 8 DME
SG_ Temp1 : 0|8@1+ (1,-48) [-48|207] "degC" EPS
SG_ Temp2 : 8|8@1+ (1,-48) [-48|207] "degC" EPS
SG_ Unknown_b2 : 16|8@1+ (1,0) [0|255] "" EPS
SG_ FuelAccumulator : 32|16@1+ (1,0) [0|65535] "" EPS
SG_ Checksum : 56|8@1+ (1,0) [0|255] "" EPS
BO_ 470 SZL_MFLButtons: 2 SZL
SG_ ButtonBits : 0|16@1+ (1,0) [0|65535] "" EPS
BO_ 896 VIN_LastSeven: 7 CAS
SG_ VinChar1 : 0|8@1+ (1,0) [0|255] "" EPS
SG_ VinChar2 : 8|8@1+ (1,0) [0|255] "" EPS
SG_ VinChar3 : 16|8@1+ (1,0) [0|255] "" EPS
SG_ VinChar4 : 24|8@1+ (1,0) [0|255] "" EPS
SG_ VinChar5 : 32|8@1+ (1,0) [0|255] "" EPS
SG_ VinChar6 : 40|8@1+ (1,0) [0|255] "" EPS
SG_ VinChar7 : 48|8@1+ (1,0) [0|255] "" EPS
CM_ BO_ 170 "Engine speed. Raw is always a multiple of 4, so the real field is 14 bits with a 0.625 rpm LSB. Factor 0.15625 = 1/6.4 gives idle 705 rpm and cranking 220 rpm.";
CM_ SG_ 170 EngineSpeed "rpm = raw / 6.4. Some references use raw / 4 instead - verify against the tachometer.";
CM_ SG_ 170 LoadEstimate "Unconfirmed. 253 right after start, decays to ~172 at idle, 0 with engine off.";
CM_ BO_ 196 "Steering angle from the SZL, 10 ms. Differentiating SteeringAngle reproduces SteeringRate with ratio 1.010 and correlation 0.996.";
CM_ SG_ 196 SteeringAngle "Scale 0.04395 deg/bit is the BMW convention but is NOT proven by the source log. Calibrate with one full turn of the wheel.";
CM_ BO_ 200 "Same angle and rate as 0x0C4 at 5 Hz. Correlation against 0x0C4 is 1.0000.";
CM_ SG_ 169 SystemVoltage "Shape is certain (sags flat through cranking, jumps when the alternator picks up). Scale needs a multimeter; 0.0555 puts running at 14.1 V.";
CM_ SG_ 304 TerminalStatus "0x00 off, 0x40 terminal R, 0x41 terminal 15, 0x45 running, 0x55 cranking, 0x80 wake-up.";
CM_ SG_ 464 FuelAccumulator "Monotonic while running, freezes when rpm hits 0, resets when the DME power-cycles. 987 counts/s at idle. Unit not calibrated.";
CM_ SG_ 414 SlowCounter "Increments about every 11 frames (~4.5 Hz), not once per frame - it is not the usual alive counter.";
CM_ SG_ 464 Temp1 "Reads 21 degC here on a warm engine, so more likely intake air than coolant. Log a cold start to confirm the -48 offset.";
CM_ SG_ 436 WarningLamps "Steps with the start sequence: 0x3004 running, 0x3000 off, 0x3002 ignition, 0x3012 cranking, 0x7556 lamps lit.";
CM_ BO_ 896 "Last seven characters of the VIN as ASCII.";
VAL_ 304 TerminalStatus 0 "Off" 64 "TerminalR" 65 "Terminal15" 69 "EngineRunning" 85 "Cranking" 128 "WakeUp" ;