Car Scan OBDIII
Car-Scan is a specialized diagnostic utility designed for automotive enthusiasts and mechanics. It functions as a central command hub that combines direct vehicle communication with a quick-launch dashboard for professional third-party diagnostic tools.
Core Functionality: How It Works
1. Vehicle Communication (The Terminal)
The heart of the app is a custom OBD (On-Board Diagnostics) Terminal.
• Hardware Interface: It connects to standard Bluetooth OBD-II/ELM327 adapters plugged into a car's data port.
• Bluetooth SPP: It uses the Serial Port Profile (SPP) to create a transparent data tunnel between the phone and the car.
• Direct ECU Interaction: Users can type raw hexadecimal OBD commands (like 010C for Engine RPM). The app handles the low-level formatting (adding \r carriage returns) and displays the car's raw responses in a scrollable console.
2. The Diagnostic Hub
Instead of switching between multiple apps, Car-Scan acts as a "Launchpad." It detects and provides one-tap access to industry-standard ecosystems:
• OBDeleven: For advanced VAG-group coding.
• Launch CRP123X: For professional-grade system scans.
• OBD Auto Doctor: For general consumer diagnostics.
3. Security & Cross-Platform Architecture
The app is built using Kotlin Multiplatform (KMP), meaning its core logic is shared between Android and iOS:
• Secured Identity: It features a custom-built Keychain system.
◦ On Android, it uses EncryptedSharedPreferences (AES-256) to store sensitive keys
◦ On iOS, it interfaces directly with the native Apple Keychain Services framework.
• Modern Permissions: The app dynamically manages complex Bluetooth permissions, ensuring compatibility with Android 12+ (Scan/Connect) while maintaining support for older versions.
How To Use App
1. Connectivity (Bluetooth SPP)
The app communicates with the car using a Bluetooth OBDII adapter (like an ELM327).
• Discovery: It scans paired Bluetooth devices for names containing "OBD" or "ELM".
• Protocol: It establishes a connection using the Serial Port Profile (SPP) via a standard UUID (00001101-...).
• Handshake: Once connected, it opens input/output streams to send and receive raw data strings.
2. Custom OBD Terminal
Users can interact directly with the vehicle's ECU (Engine Control Unit) by sending raw hex commands:
• Command Input: Users enter standard OBD-II PIDs (e.g., 010C for Engine RPM or 0105 for Coolant Temperature).
• Processing: The app appends a carriage return (\r) to the command (as required by ELM327 adapters) and transmits it over Bluetooth.
• Feedback: A real-time terminal window displays the raw response from the car, allowing for low-level debugging and custom diagnostics.
3. App Integration Hub
The app acts as a dashboard for professional mechanics by providing quick-launch buttons for established diagnostic ecosystems:
• OBDeleven
• Launch CRP123X
• OBD Auto Doctor
4. Cross-Platform Secure Logic (KMP)
The project uses Kotlin Multiplatform to share critical logic between Android and iOS:
• Security: Uses a custom-built Keychain system. On iOS, it leverages the native Keychain Services API (C-interop), and on Android, it uses EncryptedSharedPreferences to securely store sensitive data like adapter tokens or user settings.
• Permissions: Handles complex modern Android Bluetooth permissions (BLUETOOTH_SCAN, BLUETOOTH_CONNECT) dynamically based on the OS version.
Summary of Tech Stack
• Language: Kotlin (Multiplatform)
• UI: Android XML (ViewBinding) / iOS (Framework ready)
• Communication: Bluetooth SPP (Socket-based)
• Security: iOS Security Framework / Android Security-Crypto Library
How To Test OBD3 Tool:
1. Pair your Adapter: Go to your phone's Bluetooth settings and pair with your OBDII/OBD3 adapter (usually PIN 1234 or 0000).
2. Open Car-Scan: Launch your app and tap "Connect OBD Adapter".
3. Send a Command:
◦ Type ATZ and hit Send (this resets the adapter).
◦ Type 010C and hit Send (this requests Engine RPM).
◦ Type 0105 and hit Send (this requests Engine Coolant Temperature).
• App Launchers: Remember that OBDeleven, Launch CRP, and OBD Auto Doctor
CAR SCAN Released v1
·
Target and Compile SDK Adjusted
·
Prevents package parsing failures
·
Eliminates Verify Error Def-Found Error crashes on Android 7 to Android 14 runtimes
·
Review Keychain (Android)
Update 2
· Added Dark/Night Mode Green Text for Terminal Output






No comments:
Post a Comment