Skip to main content

ELM327-emulator

PyPI Python Versions PyPI download month GitHub license

A Python emulator of the ELM327 OBD-II adapter connected to a vehicle supporting multi-ECU simulation.

ELM327-emulator connects client applications to multiple emulated ECUs via OBD-II interface through different networking systems, including serial communication (where pseudo-terminals are used if supported by the operating systems), or direct interaction with communication devices, or TCP/IP, or Bluetooth. Besides emulating the ELM327 adapter, it can also emulate the diagnostic bus itself, exposing a CAN interface running the SLCAN (Lawicel) firmware or a K-Line ECU (ISO 9141-2 / ISO 14230), so that applications driving a CANable or a VAG KKL adapter can talk to the emulated ECUs. The software simulates an ELM327 adapter connected to a vehicle, includes a command-line interface for extensive monitoring and offers a documented Python development framework to implement ECU emulation objects.

ELM327-emulator is able to support basic ELM327 commands and OBD service requests through stateless request/response method via OBD-II, but can also handle stateful UDS communication with ISO-TP Flow Control and Keyword Protocol 2000, concurrently emulating multiple ECUs. It is designed to be extended via a plugin architecture to allow easy development of specific tasks implementing workflows, including the possibility to simulate anomalies for testing purposes. Many AT commands are supported, as well as some OBDLink AT/ST commands. Diagnostic Trouble Codes (modes 03, 07 and 0A) can be simulated, a mode 01 request can carry multiple PIDs, and requests sent to the functional address (7DF or 18DB33F1) are answered by the emulated ECUs.

ELM327-emulator supports different operating systems including Windows, macOS and UNIX/Linux; it is agnostic of the client application and has been tested with python-OBD as well as with many applications on Windows, Linux and on smartphone devices.

An internal dictionary (named ObdMessage) allows configuring the emulation, which is currently set to reproduce the message flow generated by more ECUs, including the basic communication of a Toyota Auris Hybrid car (through the scenario car option) and can be easily extended to simulate communication produced by other vehicles or ECUs. In case of more complex interactions (e.g., entering privileged diagnostic sessions and performing reset or flash upload operations), the dictionary can instance tasks, which are implemented through plugins, very simple to be developed by users extending the software. Some example of plugins is already included.

ELM327-emulator also offers a feature that compares the emulation with the direct connection of an OBD-II adapter to allow extending the dictionary by reporting unmatched requests. In addition, it provides an auxiliary scanning tool (obd_dictionary) that builds the ObdMessage dictionary of a specific vehicle by automatically querying all standard OBD service requests one by one (as well as querying additional custom PIDs specified by the user via CSV file); the dictionary can then be used to emulate stateless request/responses of a specific car or ECU.

Full information and usage details at the ELM327-emulator GitHub repository.

Metadata

Release files for ELM327-emulator 4.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ELM327-emulator 4.0.0
File Size Uploaded
elm327_emulator-4.0.0.tar.gz 139.9 kB Details

Release files / elm327_emulator-4.0.0.tar.gz

Download URL elm327_emulator-4.0.0.tar.gz
Size 139.9 kB
Tags Source
SHA-256 checksum
How to use checksums
8da16f79ac0137d5a6dc73f164062868978c4774fefe0a2410f4512866e90123
BLAKE2b-256 checksum
How to use checksums
18509d28f56cf3f26a836838c27b753d959acf0032fae2993a9ad9b5f107ed69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page