Skip to content

Commit

Permalink
Merge branch 'develop' into refactor/telephone
Browse files Browse the repository at this point in the history
  • Loading branch information
Piers Holt committed Jul 30, 2020
2 parents 351d9a1 + e05b160 commit 8183894
Show file tree
Hide file tree
Showing 23 changed files with 662 additions and 46 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ Command|Description
`0x02`|[Pong & Announce](02.md)
`0x10`|[Ignition Request](ike/10.md)
`0x11`|[Ignition](ike/11.md)
`0x12`|Sensors Request
`0x13`|Sensors
`0x12`|[Sensors Request](ike/12.md)
`0x13`|[Sensors](ike/13.md)
`0x14`|[Language & Region Request](ike/14.md)
`0x15`|[Language & Region](ike/15.md)
`0x16`|Mileage Request
Expand All @@ -211,14 +211,14 @@ Command|Description
`0x31`|Menu Button
`0x32`|[BMBT Volume](bmbt/32.md) & [MFL Volume](mfl/32.md)
`0x34`|DSP Control
`0x36`|Radio EQ.
`0x37`|Radio Tone/Select
`0x36`|[Radio EQ](radio/36.md)
`0x37`|[Radio Tone/Select](radio/37.md)
`0x38`|CDC Status Request
`0x39`|CDC Status
`0x3b`|[MFL Buttons](mfl/3b.md)
`0x40`|[OBC Input](gt/40.md)
`0x41`|[OBC Control](gt/41.md)
`0x42`|[Remote Control](ike/42.md)
`0x42`|[OBC Remote Control](ike/42.md)
`0x45`|Radio UI Request
`0x46`|Radio UI
`0x47`|[BMBT "Soft" Buttons](bmbt/47.md)
Expand Down
12 changes: 10 additions & 2 deletions ike/10.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# `0x10` Ignition Request

A device can request ignition status.
Request the ignition status from the cluster.

### Related

- `0x11` [Ignition](11.md)

### Examples

Expand All @@ -9,4 +13,8 @@ A device can request ignition status.
3B 03 80 10 A8 # GT
AC 03 80 10 3F # EHC
ED 03 80 10 7E # TV
F0 03 80 10 63 # BMBT
F0 03 80 10 63 # BMBT

## Parameters

None!
32 changes: 21 additions & 11 deletions ike/11.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,41 @@
# `0x11` Ignition

The cluster (IKE or KOMBI) will broadcast the ignition status:
Cluster `0x80` → Broadcast `0xbf`

The cluster will broadcast the ignition status:

- when the ignition switch position changes
- periodically while at KL-R (position 1) or greater
- periodically at KL-30 (position 0) while bus remains active
- in response to a module announcement (`0x02`)
- when ignition status is requested (`0x10`: Ignition Request)
- in response to a module announcement `0x02`
- in reply to a ignition request `0x10`

A number of modules will not activate unless the required ignition status is broadcast by the cluster. For example, while the navigation computer has a KL-R supply circuit, it will not wake until the cluster broadcasts a KL-R ignition status.

#### Check your fuses!
##### Check your fuses!

It's not the ignition switch position itself that drives the ignition status, but the associated supply circuit to the cluster that the switch closes. Thus, if the applicable supply is not closed due to a blown fuse, the cluster will not broadcast the applicable igntition status.

## Ignition `0b0000_0111`

The command has a single byte bit field, of which the least significant 3 bits are represent ignition state.
### Related

KL_30 = 0b0000_0000 # Position 0
KL_R = 0b0000_0001 # Position 1
KL_15 = 0b0000_0011 # Position 2
KL_50 = 0b0000_0111 # Position 3
- `0x10` [Ignition Request](10.md)

### Examples

80 04 BF 11 00 2A # KL-30
80 04 BF 11 01 2B # KL-R
80 04 BF 11 03 29 # KL-15
80 04 BF 11 07 2D # KL-50

## Parameters

1-byte bit field. Fixed length.

IGNITION = 0b0000_0111

### Ignition `0b0000_0111`

IGNITION_KL_30 = 0b0000_0000 # Key Position 0
IGNITION_KL_R = 0b0000_0001 # Key Position 1
IGNITION_KL_15 = 0b0000_0011 # Key Position 2
IGNITION_KL_50 = 0b0000_0111 # Key Position 3
42 changes: 42 additions & 0 deletions ike/12.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# `0x12` Sensors Request

Request sensor status `0x13` from cluster.

### Related

`0x13` [Sensors](13.md)

### Examples

30 03 80 12 A1 # CCM
5B 03 80 12 CA # IHKA
60 03 80 12 F1 # PDC
AC 03 80 12 3D # EHC
ED 03 80 12 7C # TV

## Parameters

None!

## Use Cases

### Check Control

...?

### EHC

...?

### IHKA

- Request aux. heating/ventilation activation status.

### PDC

- Request gear if PDC coded to activate on reverse.

### TV

- Request ignition status (disable while in motion?)
- Request handbrake status (enable when handbrake?)
144 changes: 144 additions & 0 deletions ike/13.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
# `0x13` Sensors

Cluster `0x80` → Broadcast `0xbf`

This command changed during production. Specifically, four bytes were appended to the bitfield, taking it's size from three bytes to seven bytes.

The earliest example I've seen of the increased size was an IKI (Oct 01), which might suggest the change occured with introduction of IKI (Sep 97), or with the 1998 production break (PU98), which marked the transition from M52 (MS41), to M52TU (MS42) etc.

The examples I've seen appear to be backwards compatible.

### Related

`0x12` [Sensors Request](12.md)

### Examples

# High Cluster (IKE)
80 06 BF 13 03 00 00 29
80 06 BF 13 03 B0 00 99
80 06 BF 13 01 71 00 5A
80 06 BF 13 E0 B1 00 7B

# High Cluster (IKI)
80 0A BF 13 00 00 00 00 00 00 47 61
80 0A BF 13 02 B0 00 00 00 00 47 D3
80 0A BF 13 03 B0 00 02 00 00 47 D0
80 0A BF 13 00 B0 00 00 00 00 47 D1
80 0A BF 13 01 11 00 00 00 00 46 70


## Parameters

**The longer variant of the command is not covered!**

Fixed length. 3 byte bit field.

HANDBRAKE = 0b0000_0001 << 16
OIL_PRESSURE = 0b0000_0010 << 16
BRAKE_PADS = 0b0000_0100 << 16
TRANSMISSION = 0b0001_0000 << 16

IGNITION = 0b0000_0001 << 8
DOOR = 0b0000_0010 << 8
GEAR = 0b1111_0000 << 8

AUX_VENT = 0b0000_1000

# Aux. Heat direct?

# IKI (E39-KMBI_E38.C12)
# Fuel tank lid open warning?
# Seat belt warning?

---

### Handbrake `0b0000_0001 << 16`

Microswitch located on the handbrake mechanism.

HANDBRAKE_OFF = 0
HANDBRAKE_ON = 1

### Oil Pressure `0b0000_0010 << 16`

This mirrors the cluster's oil pressure warning lamp behaviour. As such, a fault will be indicated at KL-15 until ignition, at which point oil pressure (should) be obtained.

OIL_PRESSURE_OK = 0
OIL_PRESSURE_FAULT = 1

### Brake Pads `0b0000_0100 << 16`

Brake pad wear sensors.

In the case of the E39, there are two sensors. Front left brake pad sensor [B16], rear right brake pad sensor [B17].

BRAKE_PADS_OK = 0
BRAKE_PADS_FAULT = 1

### Transmission `0b0000_0100 << 16`

*Transmission Emergency Program*.

TRANSMISSION_OK = 0
TRANSMISSION_FAULT = 1

---

### Ignition `0b0000_0001 << 8`

Denotes that the engine is running.

IGNITION_OFF = 0
IGNITION_ON = 1 # Engine running

### Door `0b0000_0010 << 8`

Replicates the driver's door open field of `0x7a`.

DOOR_CLOSED = 0
DOOR_OPEN = 1 # Driver's door open

### Gear `0b1111_0000 << 8`

Only at KL-15 and above. Presumably doesn't apply to manual transmissions, but may apply to SMG.

GEAR_NONE = 0b0000_0000 # KL-30/KL-R
GEAR_PARK = 0b1011_0000
GEAR_REVERSE = 0b0001_0000
GEAR_NEUTRAL = 0b0111_0000
GEAR_DRIVE = 0b1000_0000
GEAR_FIRST = 0b0010_0000
GEAR_SECOND = 0b0110_0000
GEAR_THIRD = 0b1101_0000
GEAR_FOURTH = 0b1100_0000
GEAR_FIFTH = 0b1110_0000
GEAR_SIXTH = 0b1111_0000 # Only a guess!

---

### Aux. Ventilation `0b0000_1000`

Activation of aux. ventilation.

AUX_VENT_OFF = 0
AUX_VENT_ON = 1

## Use Cases

### Check Control

> The check control receives information from the IKE for the following messages.
>
> - Transmission emergency program
> - Release parking brake> - Check brake pad> - Stop! Engine oil pressure
The driver's door warning is activated by the door status reported with `0x7a`.

### PDC

In the case of automatic vehicles, PDC activation is dependent on gear. For example, rear PDC will activate when reverse gear is selected.

### Aux. Heating/Ventilation

The cluster is responsible for control of aux. ventilation and heating. Both modes of activation- timer and direct, are accomplished with this command.
Expand Down
Loading

0 comments on commit 8183894

Please sign in to comment.