Show HN: OBDium – Car Diagnostics Redefined

4 months ago 104

A Rust-based vehicle diagnostics tool designed to connect with ELM327 adapters, offering live OBD-II data, fault code analysis, and offline VIN decoding.

last-commit repo-top-language repo-language-count

AppImage

OBDium ( pronounced Oh-Bid-ium ), is a fast, modern and extensible Rust-based diagnostic tool for interfacing with OBD-II systems via ELM327 serial adapters fully offline. It provides live access to vehicle sensor data, in-depth diagnostics, and accurate VIN decoding without relying on external crates for critical parsing logic.

Our goal with OBDium is to fill a gap in the ecosystem, providing the best free, open-source, and easy-to-use vehicle diagnostics tool.

  • ⚠️ View Troube Codes: Read diagnostic trouble codes, including Powertrain, Body, Chassis, and Network alongside a description
  • 🧠 Live Vehicle Metrics: Reads and decodes various OBD-II PIDs (engine, fuel, air, exhaust, diagnostics, etc.) with plans for manufacturer specific PIDs soon
  • 🔎 Advanced VIN Decoding: In-depth VIN decoding using a custom parser and SQLite-backed lookups based off of the NHTSA's VPIC MSSQL database
  • 🔌 Serial Communication: Connects to ELM327 OBD-II adapters via serial port
  • 📱 Modern GUI: No more ugly and outdated native applications. Developed with modern web development technologies using Tauri with JS/HTML/CSS
  • 🖥️ Cross-platform: Available on any operating system include both Linux and Windows

This project required extensive research into concepts like ELM327, the OBD-II protocol, and response decoding. Below is a brief explanation of the implementation and logic behind OBDium.

  1. All real-time vehicle communication is done through the OBD struct. To initiate communication, OBDium establishes a serial port connection to the ELM327 adapter. Vehicle data is requested using PIDs (Parameter IDs) and service numbers. An example request to get the Engine Coolant Temperature would look as such: 0105. A full list of standard OBD-II PIDs can be found here.

  2. Responses from the vehicle are returned as hexadecimal-encoded strings. In general, responses contain particular bytes: 'A' refers to the byte at index 0, which spans to 'E' at byte index 4. Finally, a specific equation is used alongside these special bytes (A, B, C, D, E) to calculate the expected result. See the implementation of the response logic at 'src/response.rs'. For Engine Coolant Temperature it would be A - 40.

  3. For the VIN parsing implementation, I spent several hours reverse engineering the National Highway Traffic Safety Administration’s Product Information Catalog Vehicle Listing (vPIC) MSSQL implementation to work with SQLite and Rust. Now, from just a simple VIN, the exact, make, model and year of that vehicle can be decoded, providing specific details like airbag locations, the number of engine cylinders, or if the vehicle comes equipped with traction control.

For any questions about the implementation or logic behind OBDium, feel free to create a Discussion or open an Issue!

  1. Head to the GitHub releases page here
  2. Download the latest release for your operating system
  3. Extract and run the installer.
  1. Install Rust
    Download and install from rust-lang.org.

  2. Install Tauri

    cargo install tauri-cli --version 1.6.5
  3. Clone the repository

    git clone https://github.com/provrb/obdium.git cd obdium
  4. Download SQLite Databases with Git LFS

  5. Build the project

  6. Find the application:

    • The file built will be located in: backend/target/release
    • MSI and NSIS installers will be located in: backend/target/release/bundle
  1. Run the application
  2. Connect your ELM327 adapter to your vehicles OBD-II port and device.
  3. Navigate to the Connection panel:
    • Select the OBD-II protocol, serial port, and baud rate to use.
    • If not serial ports appear, you can click the refresh button to reload serial ports.
  4. Click 'Connect'
  • OBD data will be recorded in the OBD Dashboard
  • View diagnostic trouble codes in the DTC panel.
  • View graphs for live data in the Graphs panel.
  • Decode a VIN to receive model-specific information in the VIN Decoding panel.
  • To stop tracking a metric, click on the card it's being displayed in, in the OBD Dashboard
    • Resume tracking by clicking on it again at the very bottom of the dashboard.
  • Modify preferences like units, privacy, or startup settings in the Settings panel.
  • View an index of all PIDs in the PID List panel.

Contributions are welcome! Please open issues or submit pull requests for bug fixes, new features, or improvements.
To contribute:

  • Fork the repository
  • Create a new branch for your feature or fix
  • Make your changes and add tests as appropriate
  • Submit a pull request describing your changes

This code has minimal restrictions, such that any distributions are made free-of-cost. See LICENSE for details.

  1. Finish VIN parsing functionality.
  2. Fully functional user-interface with live graph view and the ability to send requests manually to the vehicle.
  3. Support for Bluetooth and Wi-fi ELM connection

Read Entire Article