*** Project: Arduino & BMW K/I-Bus Interface ***
** Intro located here ***
Background:
The K-Bus is a standard bus protocol for BMW car electronics. In other words, it is a way for devices within the car to communicate with each other. The K-bus is a serial communications bus in which all connected control units can send as well as receive information over a single wire. Since the K-bus has available only one single line yet it transmits data in both directions, data are transmitted in half-duplex mode – it is possible to only transmit or receive at any one time.
The I/K buses handle information/multimedia peripherals. The I-Bus is known as the “Instrumentation-Bus” and the K-Bus is the “Karosserie-Bus” – Karosserie is German for “Body”. Initially the I-Bus was introduced on the E31 as the information bus. The E31 version of the I-Bus was used for body electronics and driver information systems. With the introduction of the E38, the I-Bus is now referred to as the instrumentation bus. The K-Bus was added to the E38 along with the I-Bus. Models without Navigation or IKE will use the K-Bus only. Both of these bus systems are technically identical, the only difference is their use by model. From this point forward they will be referred to as the I/K-Bus and differences will be pointed out separately.
Most of the information in this article comes directly from the PDF files in the resources & downloads section (Under the “K-Bus Structure” and “Resources” folders). The most informative being the one named “IBUSInsideDRAFTREV5.pdf”.
On the BMW E46, the following control units are on the I/K-Bus:
– GM5, General Body Module
– AHL, Adaptive headlights
– PDC, Parking Distance Controller
– CDC, CD Changer
– EWS, Electronic Immobilizer
– MFL, Multi-function steering wheel
– MM, Mirror memory, 1x Driver and 1x Passenger
– IHKA, Heating and A/C Control module
– RAD, Radio
– SM, Seat Memory, 1x Driver and 1x Passenger
– IKE, Instrument Cluster Electronics
– MRS, Multiple-restraint system (Airbag module)
– LCM, Light Control Module
– LSZ, Light switch cluster
– TPCS, Tire Pressure Control System
– SHD, Sunroof Control Module
– RLS, Rain/Light Sensor
The bus’ physical layer is an open collector setup – pulled high (+12v) by the bus and pulled low by the talker. This means that the normal voltage on the wire while the bus is idle is +12V (the battery voltage, or Vbatt). A bit is transmitted by pulling low or shorting the bus with the ground momentarily. This is the reverse of many digital signals where the normal voltage is 0V and is raised high (Vmax which in this case is Vbatt or +12v) to send a bit.
Serial communications on the bus are 9.6Kbps, 8 data bits, Even parity, and 1 stop bit. (9600, 8E1).
Any device can start sending when the bus is idle, but if it discovers that the line is pulled low without doing it itself, it has to abort. The I/K-Bus is always active when terminal R (Ignition) is switched on. If the bus line is quiet for more than 60 seconds, all of the control modules will go into Sleep Mode.
Control units that provide the I/K-Bus operating voltage (Master controllers) are:
On E38 and E39/E53 High version vehicles:
• The LCM is the Main (master) Controller of the I-Bus. The IKE and MID/BMBT are Stand-by Controllers.
• The GM is the Main (master) Controller of the K-Bus.
• The IKE is the bus “gateway”
On E46, E52 and E39/E53 Base version vehicles:
• The GM is the Master Controller for vehicles equipped with only the K-Bus.
• The LCM/LSZ is the Stand-by Controller.
Each module on the I/K-Bus is informed by a message from the Master Controller as to the ready status of all of the other connected modules. The modules polled are according to the coding of the Master Controller. Every 30 seconds after Terminal R is switched on, each module on the bus line is polled.
I/K-Bus Packet Structure:
The information sent over the bus is configured serially. Each message consists of:
1. Transmitter address (8 bit Source ID)
2. Length of data (number of following message bytes)
3. Receiver address (8 bit Destination ID)
4. Detailed description of message (maximum 32 bytes of data)
5. Summary of transmitted information (check sum)
The XOR checksum byte is used to check the integrity of the message. The receiver will compare that value with its own computation, and if not equal, will reject the packet.
Messages:
I have collected several documents from various sources that contain many examples of I/K-Bus messages – these can all be found on my resources & downloads page (Under the “K-Bus Structure” folder).
Analyzing the bus for specific messages is very easy by using the NavCoder software.
To use NavCoder, you must find a way to connect the I/K-Bus to your laptop. You can either use the Resler’s I-Bus interface (Click Here for integration instructions), or a USB to TTL serial converter along with the TH3122 Arduino interface (Click Here for integration instructions).
Project Continued:
• Intro
• Technical Details
• Schematic Description
• Resources & Downloads
• Programming
• Integration
• Messages