Log parser utility
The log parser (log_parser.pl) is a Perl script that translates raw BlueBus debug logs into human-readable format, making it easier to diagnose issues.
Features
- Decodes I-Bus messages - Translates hex packets into meaningful commands and data
- Parses Bluetooth events - Interprets BM83 and BC127 Bluetooth module messages
- Adds timestamps - Correlates events with vehicle time (when GPS data available)
- Filters noise - Optionally ignores high-frequency status messages
- Statistics mode - Provides command frequency and device activity analysis
Installation
The log parser requires Perl with these modules:Basic usage
Command-line parameters
Time display options
Display real-time timestamps based on vehicle clock (from IKE module)
Disable real-time timestamp display (show only millisecond counter)
Raw data options
Include original unparsed log line before each parsed message
Hide original log lines (default behavior)
Payload display
Always show raw hex payload, even for parsed commands
Show payload only for unparsed commands (default)
Filtering options
Include lines that can’t be parsed (debug messages, warnings)
Hide unparsed lines (shows only I-Bus and Bluetooth messages)
Generate statistics report at end of log parsing
Ignore specified commands by name or hex ID (comma-separated)
-i with no arguments):
RAD_TMC_REQUEST/RAD_TMC_RESPONSE- Radio traffic dataTEL_TELEMATICS_LOCATION/TEL_TELEMATICS_COORDINATES- GPS dataRAD_BMW_ASSIST_DATA/TEL_BMW_ASSIST_DATA- TelematicsGM_RLS_STATUS/LCM_RLS_STATUS- Rain/light sensorIKE_BROADCAST_SPEED_RPM_UPDATE- Speed/RPM (very frequent)IKE_BROADCAST_TEMP_UPDATE- Temperature updatesLCM_BROADCAST_INSTRUMENT_BACKLIGHTING- Lighting statusLCM_BROADCAST_INDICATORS_RESP- Turn signalsGM_BROADCAST_DOORS_STATUS_RESP- Door statusIKE_BROADCAST_SENSOR_RESP- Sensor dataRAD_BROADCAST_STATUS_RESP- Radio statusBC127_AVRCP_MEDIA_RESPONSE- Media metadata
Ignore messages from specific I-Bus devices (comma-separated)
Advanced examples
Live log monitoring
Live log monitoring
You can parse logs in real-time as they’re generated:
The
- argument tells the parser to read from stdin (pipe input)Finding specific device communications
Finding specific device communications
Analyzing connection issues
Analyzing connection issues
Error analysis
Error analysis
Understanding parsed output
Output format
timestamp- Milliseconds since startuplocal_time- Real time from vehicle clock (if available)S- Self marker (*= message sent by BlueBus,= received)B- Broadcast marker (B= broadcast message,= direct)SRC- Source device (e.g., IKE, RAD, GT, BBUS)DST- Destination deviceCMD_HEX- Command ID in hexCOMMAND_NAME- Human-readable command nameparsed_data- Decoded parameters and values
Example output
Statistics mode
When using--stats, the parser generates a report at the end:
-
Command frequency
- Count of each command type
- Average payload size
- Identifies noisy commands
-
Device activity
- Messages sent by each I-Bus device
- Helps identify chatty modules
Decoded I-Bus devices
The log parser recognizes these I-Bus device addresses:| Address | Device | Description |
|---|---|---|
00 | GM | Body module |
18 | CDC | CD Changer |
3B | GT | Graphics driver (navigation) |
44 | EWS | Immobilizer |
46 | CID | Central information display |
50 | MFL | Multi-function steering wheel |
5B | IHKA | HVAC |
68 | RAD | Radio |
6A | DSP | Digital Sound Processor |
80 | IKE | Instrument cluster |
C0 | MID | Multi-info display |
C8 | TEL | Telephone |
D0 | LCM | Light control module |
E8 | RLS | Rain/light sensor |
F0 | BMBT | On-board monitor |
FF | LOC | Local (BlueBus) |
BF | GLO | Global broadcast |
Bluetooth message types
The parser decodes two Bluetooth module types:BC127 (older modules)
Command format:BC127_LIST- List paired devicesBC127_STATUS- Request connection statusBC127_MUSIC- Media control (play/pause/next/prev)BC127_AVRCP- Request track metadata
BM83 (newer modules)
Packet format:BM83_CMD_Music_Control- Playback controlBM83_CMD_MMI_Action- Phone actions (accept/reject call)BM83_CMD_Profiles_Link_Back- Reconnect last deviceBM83_CMD_AVC_Vendor_Dependent_Cmd- AVRCP metadata requests
BM83_EVT_BTM_Status- Connection status changesBM83_EVT_Call_Status- Phone call stateBM83_EVT_AVC_Specific_Rsp- Metadata responsesBM83_EVT_Read_Linked_Device_Information_Reply- Device details
Firmware update tools
BlueBus includes Python-based firmware update utilities.Console firmware tool
Location:utility/console_firmware_tool.py
Usage:
--port- Serial port (e.g.,/dev/ttyUSB0,COM3)--file- Firmware hex file to flash--bt-mode- Enter Bluetooth module update mode--read-sn- Read device serial number--read-build- Read firmware build date
- Automatic platform detection
- Flash erase and verification
- Progress indication
- Error recovery
GUI firmware tool
Location:utility/gui_firmware_tool.py
Features:
- Graphical interface for firmware updates
- Automatic serial port detection
- Progress bar with status updates
- Platform compatibility verification
- BLUEBUS_BOOTLOADER_1_3 through 2_3
- Automatic version detection
Update process
-
Enter bootloader mode
- Connect BlueBus via USB
- Power on with ignition
- Device should identify as bootloader
-
Platform detection
- Tool sends
PROTOCOL_CMD_PLATFORM_REQUEST - Bootloader responds with version
- Compatibility verified
- Tool sends
-
Flash erase
- Application memory erased (0x1800 to 0xAA800)
- Bootloader memory protected
- Takes ~10 seconds
-
Write firmware
- Firmware written in 246-byte chunks
- Each packet acknowledged
- Checksum verified
-
Start application
- Bootloader jumps to application code
- BlueBus boots normally
The bootloader always remains functional, allowing recovery from failed firmware updates.
Serial debugging
You can connect directly to BlueBus for live debugging.Connection settings
- Baud rate: 115200
- Data bits: 8
- Parity: None (or Odd for bootloader)
- Stop bits: 1
- Flow control: None
Terminal software
Debug log levels
BlueBus outputs these log levels:DEBUG- Detailed I-Bus and Bluetooth packet tracesINFO- Status messages and state changesWARNING- Non-critical issues (retryable errors)ERROR- Critical failures requiring attention
Enabling debug logging
Log verbosity is controlled via EEPROM settings:Common log patterns
Normal operation
Bluetooth connection
Profile error recovery
I-Bus error
Generating diagnostic reports
When reporting issues, include:-
Hardware information
- BlueBus hardware version
- Bluetooth module type (BC127/BM83)
- Vehicle make/model/year
- Display type (BMBT/MID/CD53)
-
Firmware version
- Application version
- Bootloader version
- Build date
-
Parsed logs
-
Configuration settings
- Audio settings (DAC gain, DSP mode)
- Bluetooth settings
- UI preferences
-
Problem description
- When issue occurs (startup, during operation, specific trigger)
- Frequency (always, intermittent, once)
- Steps to reproduce
Sanitize logs before sharing publicly - they may contain paired device MAC addresses and phone numbers from caller ID.