Skip to content

BMW I/K-Bus Protocol

BMW I-Bus (Instrumentation Bus) and K-Bus (Body Bus) are proprietary single-wire, half-duplex communication buses used across BMW models from the late 1980s through the mid-2000s. Both use the same protocol at the data link layer — the difference is which modules are connected to which bus.

Every message on the bus follows this structure:

Byte 0: Source address (which module sent this)
Byte 1: Length (count of remaining bytes: dest + data + checksum)
Byte 2: Destination address (target module, 0xBF = broadcast)
Byte 3: Command type
Byte 4+: Data field(s)
Last: Checksum (XOR of all preceding bytes)
50 04 68 32 11 1F
ByteValueMeaning
00x50Source: MFL (Multi-Function steering wheel)
10x04Length: 4 bytes follow (dest + command + data + checksum)
20x68Destination: RAD (Radio)
30x32Command: volume control
40x11Data: volume up
50x1FChecksum: XOR of all preceding bytes

XOR all bytes from source through the last data byte. The result must equal the final byte of the message.

0x50 ^ 0x04 ^ 0x68 ^ 0x32 ^ 0x11 = 0x1F

The length byte counts the remaining bytes after itself: destination (1) + data (variable) + checksum (1). A minimum valid length is 0x03 (destination + one command byte + checksum). Maximum length is 0x24 (36 data bytes + overhead), giving a maximum raw message size of approximately 40 bytes.

  • Baud rate: 9600
  • Framing: 8E1 (8 data bits, even parity, 1 stop bit)
  • Bit time: 104.17 microseconds
AddressIDModule
0x00GM5Body control module
0x18CDCCD Changer
0x3FDIADiagnostic computer
0x44EWSImmobilizer
0x50MFLSteering wheel controls
0x5BIHKAClimate control
0x68RADRadio
0x6ADSPDigital Sound Processor
0x80IKEInstrument cluster
0xB0SESSpeed-dependent volume
0xBFALLBroadcast (all modules listen)
0xC8TELTelephone
0xD0LCMLight Control Module
0xE7ANZVDisplay (phone status)
0xE8RLSRain/Light Sensor
0xFFLOCLocal (post-reset broadcast)

Address 0xBF is the broadcast address — all modules on the bus process messages sent to this destination. Address 0xFF is used by modules sending their first message after a power-on reset.

BMW I/K-Bus is multi-master. Any module can transmit at any time, which means collisions are possible. The protocol uses a listen-before-talk strategy:

  1. Monitor bus for activity — detect voltage transitions on the bus line (via TH3122 SEN/STA pin, or by monitoring the RX line with an optocoupler)
  2. Wait for 1.5ms of bus silence — no transitions detected for at least 1500 microseconds
  3. Begin transmitting — send the complete message
  4. Maintain 10ms minimum gap between your own consecutive packets
  5. Back off on collision — if bus activity is detected during your transmission, stop and retry after the next idle period

The 1.5ms idle window is long enough to distinguish between inter-byte gaps within a message (which are shorter) and actual end-of-message silence. At 9600 baud, the gap between bytes within a message is typically under 1ms.

Without the TH3122 transceiver IC (which provides a dedicated SEN/STA pin for bus activity), idle detection is done in software:

  • A GPIO interrupt (CHANGE trigger) on the UART RX pin fires on every bus transition
  • An esp_timer periodic callback runs every 250 microseconds
  • The callback compares the current time against the last RX transition timestamp
  • If the difference exceeds 1500 microseconds, the bus is considered idle

Worst-case detection latency is 1750 microseconds (idle timeout + timer period), well within the ~10ms inter-packet budget on a busy bus.

ParameterValue
SignalingSingle-wire, open-collector/drain
Idle stateHIGH (~12V on vehicle bus)
Active stateLOW (module pulling bus toward ground)
Bus accessMulti-master, listen-before-talk
Baud rate9600
Framing8E1 (even parity)
ChecksumXOR of all bytes
Max message~40 bytes (source + length + 36 data + checksum)
Idle detect1.5ms silence before transmitting
Packet gap10ms minimum between own transmissions
ChassisSeriesYearsI-BusK-Bus
E318 Series1989-1999Yes
E387 Series1999-2001YesYes
E395 Series1995-2004YesYes
E463 Series1997-2006Yes
E52Z82000-2003Yes
E53X51999-2006YesYes
E83X32003-2010Yes
E85Z42002-2008Yes
E871 Series2004-2013Yes

Both buses use the same protocol. The difference is which modules are connected:

  • I-Bus connects infotainment modules: radio, CD changer, navigation, telephone, DSP. Found on higher-end models (E38, E39, E53).
  • K-Bus connects body control modules: light control, instrument cluster, climate control, door locks, windows. Found on all listed models.

Some models (E38, E39, E53) have both buses. The GM5 body control module bridges messages between them when needed.

Located in the trunk, driver’s side. Connector designation X18180.

PinWire ColorSignal
White/Red with Yellow dotsK-Bus
BrownGround
Red/Green12V

Located above the fuse box.

PinWire ColorSignal
White/Red with Yellow dotsK-Bus

Use a separate 12V and GND source when connecting at the junction block.

The I/K-Bus has no authentication mechanism. Any properly formatted message with a valid checksum will be accepted and acted upon by the target module. This includes messages that control:

  • Exterior and interior lighting
  • Door locks and windows
  • Wipers
  • Instrument cluster displays

Always sniff bus traffic (RX only) before attempting any TX operations. Test with ignition OFF or key position 1 (accessories only) first. The optocoupler isolation protects the ESP32 from the car’s electrical system and the car from faults on the ESP32 side.