- Connect to an ELM327 device over TCP/IP.
- Send and interpret basic OBD commands.
- Display the status and Diagnostic Trouble Codes (DTCs).
- Asynchronous implementation using Tokio.
- Extensible command interpretation framework.
- Ensure your ELM327 device is accessible at the address specified in the code (192.168.0.10:35000 by default).
- Run the main Rust application.
Sample output:
Successfully connected to ELM327 device!
ELM327 Version: [version]
Command Name: [command_name], Result: [command_result]
On errors, appropriate error messages will be displayed.
- elm327: Contains the Elm327Connection struct which is responsible for establishing a connection to the ELM327 device, sending commands, and reading responses.
- command: Defines the OBDCommand struct and associated commands and decoding functions. This module contains the logic for encoding OBD-II commands, sending them to the ELM327 device, and decoding the received data.
For a comprehensive list of OBD-II commands (PIDs), you can refer to the Wikipedia page on OBD-II PIDs.