Skip to main content
The Configuration API provides functions for managing BlueBus settings stored in EEPROM.

Configuration addresses

Settings are organized by category:

System information (0x00 - 0x07)

  • CONFIG_SN_ADDRESS_MSB / CONFIG_SN_ADDRESS_LSB - Serial number
  • CONFIG_FIRMWARE_VERSION_MAJOR_ADDRESS - Firmware major version
  • CONFIG_FIRMWARE_VERSION_MINOR_ADDRESS - Firmware minor version
  • CONFIG_FIRMWARE_VERSION_PATCH_ADDRESS - Firmware patch version
  • CONFIG_BUILD_DATE_ADDRESS_WEEK - Build week
  • CONFIG_BUILD_DATE_ADDRESS_YEAR - Build year
  • CONFIG_BOOTLOADER_MODE_ADDRESS - Bootloader mode flag

Vehicle data (0x0F - 0x19)

  • CONFIG_UI_MODE - UI mode (CD53, BMBT, MID, etc.)
  • CONFIG_NAV_TYPE - Navigation system type
  • CONFIG_VEHICLE_TYPE - Vehicle type
  • CONFIG_LM_VARIANT - Light module variant
  • CONFIG_GM_VARIANT - General module variant

UI settings (0x1A - 0x24)

  • CONFIG_SETTING_METADATA_MODE - Metadata display mode
  • CONFIG_SETTING_BMBT_DEFAULT_MENU - Default BMBT menu
  • CONFIG_SETTING_BMBT_TEMP_DISPLAY - Temperature display setting
  • CONFIG_SETTING_LANGUAGE - Language setting
  • CONFIG_SETTING_MONITOR_OFF - Monitor auto-off setting

Audio settings (0x40 - 0x50)

  • CONFIG_SETTING_AUTOPLAY - Auto-play on ignition
  • CONFIG_SETTING_DAC_AUDIO_VOL - DAC audio volume
  • CONFIG_SETTING_DSP_INPUT_SRC - DSP input source
  • CONFIG_SETTING_VOLUME_LOWER_ON_REV - Lower volume in reverse

Telephony settings (0x36 - 0x3F)

  • CONFIG_SETTING_HFP - Hands-free profile enable
  • CONFIG_SETTING_MIC_GAIN - Microphone gain
  • CONFIG_SETTING_MIC_BIAS - Microphone bias
  • CONFIG_SETTING_TEL_VOL - Telephone volume offset
  • CONFIG_SETTING_TEL_MODE - Telephone mode

General functions

ConfigGetByte

uint8_t ConfigGetSetting(uint8_t address);
Reads a single byte from configuration memory.
address
uint8_t
required
EEPROM address to read
Returns
uint8_t
Byte value at the specified address

ConfigSetByte

void ConfigSetByte(uint8_t address, uint8_t value);
Writes a single byte to configuration memory.
address
uint8_t
required
EEPROM address to write
value
uint8_t
required
Byte value to write

ConfigGetBytes

void ConfigGetBytes(uint8_t address, uint8_t *buffer, uint8_t length);
Reads multiple bytes from configuration memory.
address
uint8_t
required
Starting EEPROM address
buffer
uint8_t *
required
Buffer to store read data
length
uint8_t
required
Number of bytes to read

ConfigSetBytes

void ConfigSetBytes(uint8_t address, const uint8_t *data, uint8_t length);
Writes multiple bytes to configuration memory.
address
uint8_t
required
Starting EEPROM address
data
const uint8_t *
required
Data to write
length
uint8_t
required
Number of bytes to write

Firmware information

ConfigGetFirmwareVersionMajor

uint8_t ConfigGetFirmwareVersionMajor();
Gets the major version number of the firmware.
Returns
uint8_t
Major version number

ConfigGetFirmwareVersionMinor

uint8_t ConfigGetFirmwareVersionMinor();
Gets the minor version number of the firmware.
Returns
uint8_t
Minor version number

ConfigGetFirmwareVersionPatch

uint8_t ConfigGetFirmwareVersionPatch();
Gets the patch version number of the firmware.
Returns
uint8_t
Patch version number

ConfigGetFirmwareVersionString

void ConfigGetFirmwareVersionString(char *buffer);
Gets the firmware version as a formatted string.
buffer
char *
required
Buffer to store version string (minimum 12 bytes)

ConfigGetBuildWeek

uint8_t ConfigGetBuildWeek();
Gets the build week.
Returns
uint8_t
Build week (1-52)

ConfigGetBuildYear

uint8_t ConfigGetBuildYear();
Gets the build year.
Returns
uint8_t
Build year (last two digits)

ConfigGetSerialNumber

uint16_t ConfigGetSerialNumber();
Gets the device serial number.
Returns
uint16_t
16-bit serial number

Vehicle configuration

ConfigGetUIMode

uint8_t ConfigGetUIMode();
Gets the configured UI mode.
Returns
uint8_t
UI mode: CONFIG_UI_CD53, CONFIG_UI_BMBT, CONFIG_UI_MID, CONFIG_UI_MID_BMBT, CONFIG_UI_MIR, CONFIG_UI_IRIS

ConfigSetUIMode

void ConfigSetUIMode(uint8_t mode);
Sets the UI mode.
mode
uint8_t
required
UI mode value

ConfigGetNavType

uint8_t ConfigGetNavType();
Gets the navigation system type.
Returns
uint8_t
Navigation type (MKI, MKII, MKIII, MKIV)

ConfigSetNavType

void ConfigSetNavType(uint8_t type);
Sets the navigation system type.
type
uint8_t
required
Navigation type value

ConfigGetVehicleType

uint8_t ConfigGetVehicleType();
Gets the vehicle type.
Returns
uint8_t
Vehicle type (E38/E39/E52/E53, E46, E8X, R50)

ConfigSetVehicleType

void ConfigSetVehicleType(uint8_t type);
Sets the vehicle type.
type
uint8_t
required
Vehicle type value

Audio settings

ConfigGetSetting

uint8_t ConfigGetSetting(uint8_t address);
Gets a configuration setting value.
address
uint8_t
required
Configuration setting address
Returns
uint8_t
Setting value

ConfigSetSetting

void ConfigSetSetting(uint8_t address, uint8_t value);
Sets a configuration setting value.
address
uint8_t
required
Configuration setting address
value
uint8_t
required
Setting value to write

Temperature and display settings

ConfigGetTempDisplay

uint8_t ConfigGetTempDisplay();
Gets the temperature display setting.
Returns
uint8_t
Temperature type: CONFIG_SETTING_TEMP_COOLANT, CONFIG_SETTING_TEMP_AMBIENT, CONFIG_SETTING_TEMP_OIL

ConfigSetTempDisplay

void ConfigSetTempDisplay(uint8_t temp);
Sets the temperature display setting.
temp
uint8_t
required
Temperature type to display

ConfigGetTempUnit

uint8_t ConfigGetTempUnit();
Gets the temperature unit setting.
Returns
uint8_t
Unit: CONFIG_SETTING_TEMP_CELSIUS or CONFIG_SETTING_TEMP_FAHRENHEIT

ConfigGetDistUnit

uint8_t ConfigGetDistUnit();
Gets the distance unit setting.
Returns
uint8_t
Distance unit (0 = km, 1 = miles)

ConfigSetDistUnit

void ConfigSetDistUnit(uint8_t unit);
Sets the distance unit.
unit
uint8_t
required
0 for kilometers, 1 for miles

Time settings

ConfigGetTimeSource

uint8_t ConfigGetTimeSource();
Gets the automatic time source settings.
Returns
uint8_t
Bitfield: CONFIG_SETTING_AUTO_TIME_PHONE, CONFIG_SETTING_AUTO_TIME_GPS, CONFIG_SETTING_AUTO_TIME_DST

ConfigSetTimeSource

void ConfigSetTimeSource(uint8_t source);
Sets the automatic time source.
source
uint8_t
required
Time source bitfield

ConfigGetTimeDST

uint8_t ConfigGetTimeDST();
Gets the daylight saving time enable flag.
Returns
uint8_t
1 if DST enabled, 0 if disabled

ConfigSetTimeDST

void ConfigSetTimeDST(uint8_t dst);
Sets the daylight saving time flag.
dst
uint8_t
required
1 to enable DST, 0 to disable

ConfigGetTimeOffset

int16_t ConfigGetTimeOffset();
Gets the timezone offset in minutes.
Returns
int16_t
Timezone offset in minutes from UTC

ConfigSetTimeOffset

void ConfigSetTimeOffset(int16_t offset);
Sets the timezone offset.
offset
int16_t
required
Timezone offset in minutes from UTC

Comfort settings

ConfigGetComfortLock

uint8_t ConfigGetComfortLock();
Gets the comfort locking speed threshold.
Returns
uint8_t
Lock setting: CONFIG_SETTING_OFF, CONFIG_SETTING_COMFORT_LOCK_10KM, CONFIG_SETTING_COMFORT_LOCK_20KM

ConfigSetComfortLock

void ConfigSetComfortLock(uint8_t setting);
Sets the comfort locking speed threshold.
setting
uint8_t
required
Lock setting value

ConfigGetComfortUnlock

uint8_t ConfigGetComfortUnlock();
Gets the comfort unlocking setting.
Returns
uint8_t
Unlock setting: CONFIG_SETTING_OFF, CONFIG_SETTING_COMFORT_UNLOCK_POS_0, CONFIG_SETTING_COMFORT_UNLOCK_POS_1

ConfigSetComfortUnlock

void ConfigSetComfortUnlock(uint8_t setting);
Sets the comfort unlocking setting.
setting
uint8_t
required
Unlock setting value

Logging

ConfigGetLog

uint8_t ConfigGetLog(uint8_t device);
Gets the logging level for a specific subsystem.
device
uint8_t
required
Device: CONFIG_DEVICE_LOG_BT, CONFIG_DEVICE_LOG_IBUS, CONFIG_DEVICE_LOG_SYSTEM, CONFIG_DEVICE_LOG_UI
Returns
uint8_t
Log level (0 = off, higher values = more verbose)

ConfigSetLog

void ConfigSetLog(uint8_t device, uint8_t level);
Sets the logging level for a specific subsystem.
device
uint8_t
required
Device subsystem identifier
level
uint8_t
required
Log level to set

Trap counters

ConfigGetTrapCount

uint8_t ConfigGetTrapCount(uint8_t trapType);
Gets the count for a specific trap/error type.
trapType
uint8_t
required
Trap type: CONFIG_TRAP_OSC, CONFIG_TRAP_ADDR, CONFIG_TRAP_STACK, CONFIG_TRAP_MATH, etc.
Returns
uint8_t
Number of times this trap has occurred

ConfigSetTrapCount

void ConfigSetTrapCount(uint8_t trapType, uint8_t count);
Sets the trap counter.
trapType
uint8_t
required
Trap type identifier
count
uint8_t
required
Count value to set

ConfigGetTrapLast

uint8_t ConfigGetTrapLast();
Gets the last trap error code.
Returns
uint8_t
Last trap error code

Build docs developers (and LLMs) love