Ibusinside BMW
Ibusinside BMW
2002, December.
Version DRAFT. REV 5.
I-BUS INSIDE 2
Messages to CD Player (18H)................................................... .........25
I-BUS INSIDE 3
Introduction and warning
A part of this information is based on research done by Thomas L. Wood, who has connected a Linux
embedded PC in his E39 (without NAV) to play MP3 . After exchanges with Thomas, I built my own interface
to start I-Bus analysis with the objective to interface a MP3 pic based player fully integrated with the board
monitor.
Note that all this document is based on analysis done in a E39 (July 2000) with a MK II navigation system.
I can't ensure if informations and/or device behaviours are identical for others models.
DISCLAIMER :
I'm not related in any way with BMW AG or any of its subsidiaries. All trademarks are property of their
respective owners. Any copyrighted information in this document belonging to third parties is presented for
non-commercial purposes only and purely for sake of education, scholarly analysis or criticism under the Fair
Useage terms of copyright law.
This document is unofficial and informations it contains can cause some problems to your car if you don't know
what your are doing, and I suppose, could cancel the Guarantee. USE THIS AT YOUR OWN RISK. I disclaim
anything.
This document is free ; you can redistribute it and/or modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any
later version.
This document is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License along with this document; if not, write to
the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
I-BUS INSIDE 4
Bus in automotive applications
It's a collection of wires through which data is transmitted from one part of a computer to another. You can think
of a bus as a highway on which data travels within a computer.
In your computer, you can find e.g. a PCI bus to establish communication between extension cards and the
CPU, the memory bus, the AGP bus for video, the Universal Serial Bus for high speed serial devices …
In your BMW, a bus is used to establish communication between security equipments, for engine control, or
for entertainement devices (the famous IBus).
In automotive application, 2 mains bus architecture are used (others are often derivated from) :
The CAN Bus was developed by Robert Bosch, GmbH. It combines extensive error checking with a high data
throughput to create an extremely powerful platform for local communication. CAN has an event driven, priority
based protocol which means that any device may attempt to communicate on the bus, but priority is given to
the node with a greater priority “message identifier”.
Physically the CAN system is based around a single twisted pair of conductors, but can be realised on a
number of mediums, including single wire and fibre optic. This configuration is quite robust and allows for 1 wire
to be broken, shorted to ground or shorted to power (with reduced signal to noise).
Currently CAN is very popular in Germany (it’s country of origin) and in Europe, but has not penetrated many
other markets effectively. However, it is predicted that by the year 2002 US car manufacturers will be using
CAN in volume.
LIN is a relatively new bus. It was developed through the collaboration of several companies, namely; Audi,
BMW, Daimler-Chrysler, Motorola GmbH, Volcano Communications Technologies, Volvo and Volkswagen.
LIN is based on the ISO 9141 specification. The network layout of the system uses a single wire 12V bus, one
master and several slave nodes. The slave nodes have no knowledge of the other nodes on the network
except the master node, and the master node controls communication on the bus. LIN is optimal for
applications such as doors, steering wheels, seats, climate regulation, lighting, rain sensors, or alternators.
The LIN protocol was not designed to be a competitor to the controller area network (CAN) protocol or other
high level system. It aims at applications that don’t require the flexibility and data rate of CAN. Thus it is
possible for the two systems to be implemented in the one vehicle, and even for the LIN and CAN networks to
share data through a gateway. LIN is designed for use in applications that will provide enhanced features in the
automobile, but where the cost of using CAN implementations is prohibitive. See diagram below.
I-BUS INSIDE 5
(credit to http://www.lin-subbus.org)
The LIN Consortium has grown beyond just the seven members of the steering circle to include over 20
companies worldwide, including most major automotive OEMs. LIN is already being implemented on cars in
Europe. According to the LIN Consortium, the number of LIN nodes is expected to rapidly grow over the next
decade to an average of twenty per vehicle, or a worldwide volume of approximately 1.2 billion LIN nodes per
year.
I-BUS INSIDE 6
I-Bus General Architecture
The I-BUS, as you can see on the figure , handle "multimedia" on-board peripherics. It is absolutely not linked to
some security equipments, like airbags, ASP, AGS (so hacking will not hurt you…).
BMW's I-Bus is based on ISO 9141 and K-Bus, a bus largely used in automotive application. It is basically a
second K-Bus in the car for handling interfacing between the radio, CD, navigation, and telephone systems, or
any other system. In particular, the steering wheel controls for the radio utilize the I-Bus.
The I-Bus is a single wire bus. That means it uses only one wire to send and receive data.
In the car you can find the I-BUS wire at the CD changer connector in the rear, the Navigation system CD-ROM
unit connector, the phone connector in the center console, etc.
It's a white/red/yellow wire (see picture below)
You can see the RJ connector (telephone type with 4 pins) I have soldered to the Ibus for a clean and chip connection.
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 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 9600 bps, 8 data bits, Even parity, 1 stop bit.
I-BUS INSIDE 7
I-Bus Messages
Id Device name
00 Broadcast
18 CDW - CDC CD-Player
30 ?????
3B NAV Navigation/Videomodule
3F ?????
43 MenuScreen
44 ?????
50 MFL Multi Functional Steering Wheel Buttons
60 PDC Park Distance Control
68 RAD Radio
6A DSP Digital Sound Processor
7F ?????
80 IKE Instrument Kombi Electronics
A8 ?????
BB TV Module
BF LCM Light Control Module
C0 MID Multi-Information Display Buttons
C8 TEL Telephone
D0 Navigation Location
E7 OBC TextBar
E8 ?????
ED Lights, Wipers, Seat Memory
F0 BMB Board Monitor Buttons
FF Broadcast
I-BUS INSIDE 8
I-Bus Packet Structure
- Source Device ID
The device which needs to send a message to another device
- Length
The length of the packet whithout Source ID and length it-self.
- Destination Device ID
The device which must receive the message
- Data
The message to send to Destination ID
- XOR CheckSum
This 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.
Length
The Xor checksum is a XOR byte per byte for all bytes contained in the packet.
The Xor checksum must be set to 00H before the computation.
I-BUS INSIDE 9
Hardware to read/write I-BUS
Basic Interface
Do not detect contention but the most basic circuit you can
find.
I-BUS INSIDE 10
Contention Detection Interface
Thomas L. Wood has built a specific circuit, with a contention detection system, mainly based on a RS latch, and
a MAX232A.
The MAX232A CI from Maxim converts RS232 levels (-12V, +12V) from a PC to TTL levels (0V, +5V).
The rest of the circuit is built with classical logical gates (74HC27, 74HC08, 74HC04).
Note that 74LS type are also working even if they are slower.
To use this circuit, the software must first assert the RTS line, and wait to get the CTS line before sending a
message. If you loose CTS right after sending your message, there was a contention.
If your message has been sent, check it in the receive buffer. You must get the echo.
Just for delay : at 9600 Bauds, send one byte take about 1 ms.
You can find the PDF file for the shematic here :
http://autos.groups.yahoo.com/group/HackTheIBus/files/IBUS%20Interfaces/232TOOC_REV1.pdf
The contention is detected by the chip itselft. If the CTS is low, then there is some traffic on the BUS.
I-BUS INSIDE 11
I-BUS Analyser software
The I-Bus software analyser allows you to display I-BUS messages in clear text for everybody understanding.You have the
choice to scan in real time the COM PORT and I-BUS conversations, to load a binary (.bin), an hexa file, or copy and paste to
the hexa area some hexa bytes from a dump window in another software. A big part of my analysis of Ibus messages was
done with that software.
Menu "FILE"
Open : Open a binary file or an hexa bytes file. Note that the binary file must be a ".bin" type to be interpreted as
is. Hexa bytes can be text files or RTF with colors.
Save : Save the hexa text box to a file. This allows you to save a log from COM port as a text file.
"RTS/rts" button
This button enables or disable RTS. If RTS is enable, the button caption is "RTS" in uppercase letters, else it's
"rts". If the text "(1)" appears after the rts/RTS text, that means you hold CTS : you can transmit because it's
Clear To Send.
I-BUS INSIDE 12
"Reset COM" button
This will reset (close and reopen) the current COM port. If you have some trouble to communicate with I-BUS, it
can help.
If you let your PC running IBA, the log can grow dramatically. The scan mode reduce it self the size to 10%
every 30 000 bytes to avoid memory (and windows) crash.
"Find" button
This will hightligth some hexa string you want to search in the hexa windows.
"Analyse" button
This will start the message analysis. The analyser will display clear text message description in the right part of
the main window. You can copy and paste results to another software like a text editor.
Analyser options
Filtering packets:
You can use "Filter Source Device", and/or destination device fields. You can enter many devices ID, separated
by a comma. e.g. "68,3B" or only one.
e.g. : If you want to see only packet sent by the radio, enter 68 in the "Src id" field then click on "Analyse".
The "FROM/TO" check box allows you to filter only message from and to a specific device.
e.g. If you want to see every packet FROM/TO the CD Player, enter "18" in the "Filter Source Device" field,
check "FROM/TO" checkbox then click on the "Analyse" button. This will show you a diagram like the following :
<---Full Packet - - - - - - - - -
<---68 03 18 01 72
<--------------------------------
I-BUS INSIDE 13
Unknow devices ID
As we didn't guess (not yet !) what are all devices ID, by checking this option , the analyser will assume that
every bytes from 00 to FFH can be a valid device ID. This will avoid sometimes a great numbers or errors when
decoding.
Note : The error counter is the number of byte the analyser couldn't decode as belonging to a valid message.
Live Mode :
The live mode is not a really "live" analyser. It's just activating a 1 seconde timer trigging the "Analyse" button.
Only the the last 1000 bytes of the log are tkaen in consideration. The useful point, is that it will synchronize the
"virtual" navigation screen (see below).
"Send" button
The Send text box is used to send message you enter directly in hexadecimal value in the input box on the left
side of the button. The message must be a valid IBUS message, but the checksum is computed automatically :
DO NOT ADD THE CHECKSUM BYTE. IBA will add it ! !
The len of the message is also automatically computed. Simply enter 00 just to let room for the right len in the
message whren sending.
You can also send TEXT by using quotes. Only one text string can be sent.
e.g.
-> 68 00 18 01
Will poll the CD player
The log is updated each time you send something in the hexa dump window.
Preview
The preview check box is used to see the message before sending it
(e.g. get the checksum and len).
Fire Out
If you want to send a message every second, without having to click each time on the "Send" button, just use
"Fire Out". It's usefull for testing circuits, POLL Messages, or to stress a device for simulating bus traffic.
I-BUS INSIDE 14
Button Board Emulator.
To get the BMB emulator, click on the BMW logo (you wil get also the NAV Screen emulator).
You can use buttons exactly as you use BMB in your car. The release event is simulated.
If you check the "As Radio" box, this will simulate order sent by the radio to the CD player instead of
sending BMB events. e.g. If you click on the "1" button, that will send "Play CD#1", and not "BMB
Button 1".
I-BUS INSIDE 15
Nav Video Messages Sender and Emulator
To get the NAV emulator screen, click on the BMW logo (you will get also the BMB emulator).
(TO BE CONTINUED….)
I-BUS INSIDE 16
Steering Wheel Messages
DEVICE ID = 50H
The crui se contro l buttons messages are not seen on the I - Bus.
Only audio and telephone buttons send messages.
32 10
32 11
3B 01 Push 3B 21 Release
3B 08 Push 3B 28 Release
3B 80 Push 3B A0 Release
Button "R/T"
3B 40
I-BUS INSIDE 17
Instrument Kombi Messages (IKE)
DEVICE ID = 80H
1A 35 00 <Text>
30 19 80 1A 37 18 20 20 20 20 48 45 55 52 45 20 31 39 3A 35 39 20 20 20 20 20
Send 3 bips
30 19 80 1A 37 10
DONG sound
30 19 80 1A 37 01 'TEST'
Display ‘TEST’ between 2 red arrows.
30 19 80 1A 37 03 'TEST'
Display ‘TEST’ between 2 blinking arrows
30 19 80 1A 37 04 'TEST'
DING sound with arrows
05 : instead of 04 : without arrows
30 19 80 1A 37 08 'TEST'
15 DING
24 nn 00 <Text>
I-BUS INSIDE 18
04 Consumption 1 "9.4 L/100"
05 Consumption 2 "9.4 L/100"
06 Range "541 KM "
07 Distance "- 405 KM"
08 "--:-- "
09 Limit "170 KM/H"
0A Average Speed "50.7 KM/H"
0E Timer 1 " 0.0 SEC"
0F Aux.Heating Timer 1 "--:-- "
10 Aux.Heating Timer 2 "--:-- "
1A Timer 2 " 0.0 SEC"
Backward signal. Used for retrovisors auto moving and probably for PDC.
80 0A BF 13 00 13 00 00 00 00 20
Speed Signal
I have tried to fire the previous message every seconds running in my car, and the TV was
working 1 second then I get the message 1 second, then again TV…and so on. (Use the FIRE
option of the IBA software)
I-BUS INSIDE 19
Board Monitor Buttons (Nav system)
DEVICE ID = F0H
Button Push Push More 1 Release Button Push Push More 1 Release
Label Message Second Message Label Message Second Message
48 14 48 54 48 94 48 24 48 64 48 A4
<> ^
(Reverse Tape) (Eject Tape)
1 48 11 48 51 48 91 2 48 01 48 41 48 81
3 48 12 48 52 48 92 4 48 02 48 42 48 82
5 48 13 48 53 48 93 6 48 03 48 43 48 83
TP 48 32 48 72 48 B2 RDS 48 22 48 62 48 A2
FM 48 31 48 71 48 B1 AM 48 21 48 61 48 A1
(Dolby) 48 33 48 73 48 B3 MODE 48 23 48 63 48 A3
TONE 48 04 48 44 48 84 SELECT 48 20 48 60 48 A0
< 48 10 48 50 48 90 > 48 00 48 40 48 80
(Previous Track) ( Next Track)
(radio menu) 48 30 48 70 48 B0
Radio turnknob
n is between 1,9. It is the step related with the rotation speed (message optimization)
I-BUS INSIDE 20
Messages to Navigation / Video (3BH)
Nav turnknob
n is between 1,9. It is the step related with the rotation speed (message optimization)
48 1A
48 1B
48 1C
48 1D
48 1E
48 0C
48 0D
48 0 E
48 0F
49 21
49 23
49 A1
49 A3
49 E1
49 E3
49 61
49 63
Button '(phone)'
48 07 Push
Button 'MENU'
I-BUS INSIDE 21
RADIO Messages
Area
Area 55
77 characters
characters max
max I ndex 0 I ndex 5
Area
Area 6-7
6-7 I ndex 1 I ndex 6
20
20 characters
characters max
max
I ndex 2 I ndex 7
II ndex
ndex 0-
0-99
14
14 characters
characters max
max I ndex 3 I ndex 8
I ndex 4 I ndex 9
Index Area
DEVICE ID = F0H
30 Normal
FF Blinking
Note : the area is not erased before displaying text. It is to the sender to pad the text with spaces.
Write to Area n
A5 62 01 nn <text>
Note : Areas are not erased before displaying text. It is to the sender to pad the text with spaces.
I-BUS INSIDE 22
Radio to Nav
46 0C
Field
Tag
05 Previous Field ??
06 Next Field
7 Next +1 field ??
8 Next +2 field ??
0 @ 5 E
1 A CD1 6 F CD4
2 B CD2 7 G CD5
3 C CD3 8 H CD6
4 D 9 I
21 60 00 nn <text>
Index nn Index nn
0 40 5 45
1 41 6 46
2 42 7 47
3 43 8 48
4 44 9 49
68 06 3B A5 60 01 00
A5 60 01 00
I-BUS INSIDE 23
NAV TO RADIO
3B 06 68
31 60 00 nn
where nn is
Note that index 1,2,3 and 6,7,8 do the radio asking a CD change.
Après
I-BUS INSIDE 24
Messages to Instrument Kombi Electronics – IKE (80H)
Poll CD Player
01
38 00 00
Stop Playing
38 01 00
Start Playing
38 03 00
Fast Scan
38 04 nn
Where nn is :
00 Forward
01 Backward
Change CD
38 06 nn
38 07 nn
Where nn is :
01 Scan mode ON
00 Scan mode OFF
I-BUS INSIDE 25
Random Mode
38 08 nn
Where nn is :
01 Random mode ON
00 Random mode OFF
Change Track
38 0A nn
Where nn is :
00 Next track
01 Previous track
I-BUS INSIDE 26
CD PLAYER Messages
DEVICE ID = 18H
CD Player behaviour
When the I - Bus wakes up, the CD player star t s to announce i t - sel f ("02 01" msg).
It ' s seems the CD announce i s not mandatory .
The CD must send immediat l y a pol l response ("02 00" ) when pol led by the radio every 10
secondes.
I f the CD doesn ' t respond to 2/3 pol l s , the radio cons ider s that there i s no CD Player (or
not anymore).
Poll Response
02 00
Announce
02 01
39 00 02 00 3F 00 dd tt
39 00 09 00 3F 00 dd tt
39 02 09 00 3F 00 dd tt
39 03 09 00 3F 00 dd tt
39 04 09 00 3F 00 dd tt
39 07 09 00 3F 00 dd tt
CD Seeking
39 08 09 00 3F 00 dd tt
I-BUS INSIDE 27
Navigation / Vidéo module Messages
DEVICE ID = 3BH
41 nn cc <Text>
01 Get Value
10 Reset Value
3B 04 F0 4F 00 : Switch off
I-BUS INSIDE 28
Source Device : IKE
Destination Device : Light Ctrl
Data - - - - - - - - - - - -
15 06 04 80 4A
. . . . J
Full Packet - - - - - - - - -
80 07 BF 15 06 04 80 4A E5
-----------------------------
00 German
01,02,05 TIME GB
03 ORA Esp ?
04 HORA IT ?
06 FR HEURE
Telephone Messages
DEVICE ID = C8H
TEL
Source device ID is 7F, but this message (called SPTI) was sent by
navigation system.
00 00 00 - constant
11 00 - current time in BCD format, (hh:mm, 24h format)
00 00 - constant
0B - XOR checksum
I-BUS INSIDE 29
7F 14 C8
A2 00 00
47 55 48 00
00 02 07 37 81
00 00 00
09 43
00
A2
3B LL BB 4F 01 00 XX (switch to TV mode)
3B LL BB 4F 00 00 XX (switch back)
Thanks a lot for your fast answer - you were right, I have checked everything
yesterday in the car. Here is the message:
80 0A BF 17 0D 5E 00 20 CC 72 CC 23
It seems the total kilometers are coded into the data bytes 5-7
(0D 5E 00); the total kilometer count can be calculated as followed:
km = Byte7 * 65536 + Byte6 * 256 + Byte 5
In my case total kilometers were 24077 yesterday, which result
in 00 * 65536 + 5E * 256 + 0D = 24077.
I-BUS INSIDE 30