Skip to main content
BlueBus provides convenience features that enhance your BMW’s functionality by monitoring vehicle state and sending commands to various I-Bus modules. These features integrate seamlessly with your vehicle’s existing systems.

Auto-lock

Automatic door locking at a configurable speed threshold improves security and convenience.

Speed-based locking

Doors automatically lock when vehicle speed exceeds a threshold: Lock speed options:
  • CONFIG_SETTING_COMFORT_LOCK_10KM (0x01) - Lock at 10 km/h
  • CONFIG_SETTING_COMFORT_LOCK_20KM (0x02) - Lock at 20 km/h
The system monitors speed from IKE speed/RPM updates (IBUS_EVENT_IKE_SPEED_RPM_UPDATE) and sends lock commands to the General Module (ZKE) when the threshold is exceeded.

Lock commands by ZKE variant

BlueBus supports multiple ZKE (Zentralverriegelung und Komfortelektronik) variants with different lock command protocols:
ZKE3 variants:
  • ZKE3_GM1 - E38 early (diagnostic index 0x20-0x22)
    • Lock: IBUS_CMD_ZKE3_GM1_JOB_LOCK_ALL (0x88)
  • ZKE3_GM4 - E38 mid (diagnostic index 0x80-0x81)
    • Lock: IBUS_CMD_ZKE3_GM1_JOB_LOCK_ALL (0x88)
  • ZKE3_GM5 - E39 (diagnostic index 0x25)
    • Lock: IBUS_CMD_ZKE3_GM5_JOB_LOCK_ALL (0x90)
    • Lock high: IBUS_CMD_ZKE3_GM5_JOB_LOCK_HIGH (0x40)
    • Lock low: IBUS_CMD_ZKE3_GM5_JOB_LOCK_LOW (0x41)
  • ZKE3_GM6 - E46 early (diagnostic index 0x85)
    • Lock: IBUS_CMD_ZKE3_GM1_JOB_LOCK_ALL (0x88)
ZKE4 variant:
  • E38/E39 late (diagnostic index < 0x20)
  • Uses ZKE3 GM1 commands
ZKE5 variants:
  • ZKE5 - E46/E53 (diagnostic index 0x40-0x42, 0x50-0x52)
    • Lock: IBUS_CMD_ZKE5_JOB_LOCK_ALL (0x34)
  • ZKE5_S12 - E83/E85/E86 (diagnostic index 0x45-0x46, 0x55-0x56)
    • Lock: IBUS_CMD_ZKE5_JOB_LOCK_ALL (0x34)
ZKE BC1 variants:
  • ZKEBC1 - R50/R52/R53 (diagnostic index 0xA0)
  • ZKEBC1RD - MINI roadster (diagnostic index 0xA3)
ZKE variant detection: firmware/application/lib/ibus.c:222-273

Configuration

Auto-lock settings are stored in EEPROM:
  • Setting address: CONFIG_SETTING_COMFORT_LOCKS_ADDRESS (0x26)
  • Get: ConfigGetComfortLock()
  • Set: ConfigSetComfortLock(uint8_t)
Set CONFIG_SETTING_OFF (0x00) to disable auto-lock functionality.

Auto-unlock

Automatic door unlocking when the ignition is turned off or at key position 1.

Unlock modes

Position 1 unlock (CONFIG_SETTING_COMFORT_UNLOCK_POS_1, 0x01):
  • Unlocks doors when ignition changes to KL-R (radio position)
  • Triggered by: IBUS_IGNITION_KLR (0x01)
Position 0 unlock (CONFIG_SETTING_COMFORT_UNLOCK_POS_0, 0x02):
  • Unlocks doors when ignition is fully off
  • Triggered by: IBUS_IGNITION_OFF (0x00)

Unlock commands

Commands vary by ZKE variant: ZKE3_GM5:
  • Unlock high: IBUS_CMD_ZKE3_GM5_JOB_UNLOCK_HIGH (0x42)
  • Unlock low: IBUS_CMD_ZKE3_GM5_JOB_UNLOCK_LOW (0x43)
ZKE5:
  • Unlock low: IBUS_CMD_ZKE5_JOB_UNLOCK_LOW (0x37)
  • Unlock all: IBUS_CMD_ZKE5_JOB_UNLOCK_ALL (0x45)

Configuration

  • Setting address: CONFIG_SETTING_COMFORT_LOCKS_ADDRESS (0x26)
  • Get: ConfigGetComfortUnlock()
  • Set: ConfigSetComfortUnlock(uint8_t)
  • Disable: CONFIG_SETTING_OFF (0x00)

Comfort turn signals

Tap-to-signal functionality for convenient lane changes without holding the turn signal stalk.

How it works

BlueBus monitors the Light Control Module for turn signal activation and can extend brief signal taps into multiple blinks:
  1. Detects turn signal activation from LCM status messages
  2. Counts duration of signal activation
  3. If tap is detected (brief activation), sends additional blink commands
  4. Configurable number of blinks per tap

LCM message monitoring

BlueBus monitors different status messages based on LCM variant: LCM light status (IBUS_LCM_LIGHT_STATUS_RESP, 0x5B):
  • Left signal bit: IBUS_LM_LEFT_SIG_BIT (5)
  • Right signal bit: IBUS_LM_RIGHT_SIG_BIT (6)
  • Blink state bit: IBUS_LM_BLINK_SIG_BIT (2)
LCM variants have different blinker byte positions:
LME38 (Byte 0):
  • IBUS_LME38_BLINKER_OFF (0x00)
  • IBUS_LME38_BLINKER_LEFT (0x01)
  • IBUS_LME38_BLINKER_RIGHT (0x02)
LCM/LCM_A (Byte 1):
  • IBUS_LCM_BLINKER_OFF (0x00)
  • IBUS_LCM_BLINKER_LEFT (0x01)
  • IBUS_LCM_BLINKER_RIGHT (0x02)
LCM_II/III/IV (Byte 2):
  • IBUS_LCM_II_BLINKER_OFF (0x00)
  • IBUS_LCM_II_BLINKER_LEFT (0x80)
  • IBUS_LCM_II_BLINKER_RIGHT (0x40)
LSZ/LSZ_2:
  • Left: IBUS_LSZ_BLINKER_LEFT (0x50) in Byte 2
  • Right: IBUS_LSZ_BLINKER_RIGHT (0x80) in Byte 3
  • Off: IBUS_LSZ_BLINKER_OFF (0xFF)
References: firmware/application/lib/ibus.h:283-333

Blinker control commands

For diagnostic/testing purposes, BlueBus can activate turn signals:
IBusCommandLMActivateBulbs(ibus, IBUS_LM_BLINKER_LEFT, bulbState)
IBusCommandLMActivateBulbs(ibus, IBUS_LM_BLINKER_RIGHT, bulbState)
IBusCommandLMActivateBulbs(ibus, IBUS_LM_BLINKER_OFF, bulbState)

Configuration

  • Setting address: CONFIG_SETTING_COMFORT_BLINKERS_ADDRESS (0x25)
  • Stores: Number of blinks per tap (typically 3-5)
  • Disable: CONFIG_SETTING_OFF (0x00)

Lighting control

BlueBus provides several lighting-related comfort features.

Welcome lights

Activate exterior lights when unlocking the vehicle:
  • CONFIG_SETTING_COMFORT_WELCOME_LIGHTS_ADDRESS (0x28)
  • Illuminates parking lamps, low beams, or other configured lights
  • Duration configurable
  • Triggered by unlock command

Home lights

Keep exterior lights on after exiting the vehicle:
  • CONFIG_SETTING_COMFORT_HOME_LIGHTS_ADDRESS (0x29)
  • “Follow-me-home” lighting
  • Configurable duration
  • Activated when ignition turns off

Parking lamp control

Independent parking lamp control:
  • CONFIG_SETTING_COMFORT_PARKING_LAMPS_ADDRESS (0x2A)
  • Allows parking lamps to be controlled separately
  • Useful for one-sided parking lamps (European regulation)
Lighting features availability depends on your vehicle’s LCM variant and coding. Not all features work on all vehicles.

Monitor control

For vehicles with BMBT (Board Monitor), BlueBus can control when the screen turns off:

Monitor off modes

  • CONFIG_SETTING_MONITOR_OFF_ADDRESS (0x22)
  • Automatically turn off display after ignition off
  • Saves display lifetime
  • Prevents screen burn-in
Monitor control commands:
  • IBUS_GT_MONITOR_OFF (0x00) - Turn off display
  • IBUS_GT_MONITOR_AT_KL_R (0x10) - Display active at KL-R
Implemented via: IBusCommandGTBMBTControl(ibus, mode)

Mirror control

Automatic mirror positioning on vehicle unlock:
  • CONFIG_SETTING_COMFORT_MIRRORS_ADDRESS (0x27)
  • Auto-fold/unfold mirrors
  • Position memory recall
  • Triggered by lock/unlock events
Mirror control requires compatible mirror control module and appropriate vehicle coding. Feature availability varies by vehicle model.

Feature availability checking

Some comfort features require specific modules to be present:
// Check if lighting features are available
ConfigGetLightingFeaturesActive()

// Requires:
// - Light Control Module detected (ibus.moduleStatus.LCM)
// - LCM variant identified
// - Not explicitly disabled
Module detection is automatic via I-Bus traffic monitoring (firmware/application/lib/ibus.c:77-128).

Configuration storage

All comfort settings are stored in EEPROM for persistence:
  • Start address: CONFIG_SETTING_START_ADDRESS (0x0F)
  • Comfort range: 0x25 - 0x35
  • Access via: ConfigGetSetting() / ConfigSetSetting()
  • Changes take effect immediately
You can configure all comfort features through the vehicle’s display menus without needing a computer. Settings are automatically saved to EEPROM.

Ignition status monitoring

Many comfort features depend on ignition status monitoring: Ignition states:
  • IBUS_IGNITION_OFF (0x00) - Key removed
  • IBUS_IGNITION_KLR (0x01) - Radio position
  • IBUS_IGNITION_KL15 (0x03) - Ignition on
  • IBUS_IGNITION_KL50 (0x07) - Starter engaged
  • IBUS_IGNITION_KL99 (0x08) - Special internal state
Ignition status is received from IKE via IBUS_CMD_IKE_IGN_STATUS_RESP and triggers comfort feature activation/deactivation.

Door/flap status monitoring

For advanced comfort features, BlueBus monitors door and flap positions:
  • Event: IBUS_EVENT_DOORS_FLAPS_STATUS_RESPONSE
  • Command: IBUS_CMD_GM_DOORS_FLAPS_STATUS_RESP (0x7A)
  • Source: General Module (GM/ZKE)
This allows features like:
  • Conditional auto-lock (only if doors closed)
  • Mirror auto-fold (when driver door opens)
  • Welcome lights (when door handle pulled)

Build docs developers (and LLMs) love