Emulates Electronic Control Units, typically found in automotive vehicles.
ECUmulator is an invaluable tool for anyone who is developing diagnostics software.
ECUmulator can emulate a number of ECUs with basic support for OBD2, UDS, and KWP. ECUs are configured via a JSON file, which contains the basic features of the ECU, such as
This package comes with two products:
There are three ways to use ECUmulator, interactively, attached to a real CAN bus, and ELM327 compatible.
Spin an interactive command-line and communicate directly by "injecting" CAN messages.
$ ./ECUmulator -i powertrain:./Resources/ptc-obd2.json ECUmulator online.
The format to send a CAN message is
<id>#<message>. Here, we send the OBD2 PID
0100 to the ECU with the arbitration id
> 7e0#020100 7E8  06 41 00 BF 9F A8 93 AA
Listen and respond via a CANbus interface:
$ ./ECUmulator -a can0@500000 powertrain:./Resources/ptc-obd2.json
When developing diagnostic software, you might not have a CAN bus around. In that case, it would be handy, if the emulation could also provide a simulated OBD2-to-RS232-adapter. Congratulations, we got you covered: Hop over to ELMpersonator, which provides a serial OBD2 interface adapter emulator (think ELM327, STN11xx, STN22xx, etc.) and allows you to attach ECUmulator ECUs to the simulated bus.
I have developed this software in order to implement ECU reprogramming apps. Without this, I could have never completed the task and would have probably bricked hundreds of ECUs.
The diagnostic session implementation is courtesy Swift-UDS which handles most of OBD2, KWP, and UDS.
I consider this being a beta, but don't use this in production yet, it may change a lot before 1.0.
Feel free to use as you see fit under the terms of the MIT. If this is helpful to you, please drop me a note. I always welcome contributions in any form!