Directories | |
| elm327 | |
The hardware_io.automotive package contains low-level interfaces for automotive hardware. Code in this package owns device connections and raw device communication; it does not interpret vehicle data or implement application behavior.
elm327 communicates with ELM327-compatible diagnostic devices over a serial connection such as a Bluetooth RFCOMM device at /dev/rfcomm0.
Keeping these layers separate allows another OBD-II transport to reuse the protocol and controller code without depending on ELM327 command syntax.
Automotive and Bluetooth support are optional host features. On a Raspberry Pi 5, install both and configure the ELM327 RFCOMM binding with:
The automotive feature installs pyserial. The Bluetooth feature installs the BlueZ utilities used to establish and persist the RFCOMM connection.
After the raw ELM327 component test succeeds, run the automotive controller test to request and decode live vehicle values:
The controller test uses Elm327ObdAdapter to translate raw, header-enabled ELM327 output through protocols.can.CanFrame and into protocols.obd2.Obd2Response objects. It then uses Obd2Manager to decode supported PIDs and display values such as RPM, speed, temperatures, throttle position, and control-module voltage. Stop it with Ctrl+C.