J2534 drivers for various Macchina hardware
This is a experimental driver which is built in Rust, and is unofficially ported to Linux and OSX as well as Windows.
The Linux and OSX port can be utilized by OpenVehicleDiag
❌ - Feature is not supported by the adapter
TODO - Feature is supported by the adapter, but work is needed on the driver side in order to utilize it
➖ - Feature works, however some parts of the full implementation are missing, so some bugs might exist
✔️ - Feature works fully according to the J2534 specification
J2534 feature | M2 UTD | A0 |
---|---|---|
Read battery voltage | ✔️ | ✔️ |
Read programming voltage | ❌ | ❌ |
ISO-TP | ✔️ | ✔️ |
CAN | ➖ | ➖ |
ISO9141 | WIP | ❌ |
ISO14230-4 | WIP | ❌ |
J1850PWM | TODO | ❌ |
J1850VPW | TODO | ❌ |
SCI | ❌ | ❌ |
The process is generally the same for all supported hardware.
- Rust installed on your system See here on how to
- Arduino IDE Installed See here on how to
You will need to install the i686-pc-windows-msvc toolchain!
$ rustup run stable-i686-pc-windows-msvc
You need to install libudev-dev
prior to building!
- Create the directory
C:\Program Files (x86)\macchina\passthru\
- Give the created
passthru
directory write permissions for your user account - From the repositories driver folder, run
build.bat
. This will compile and install the drive - Open
WIN_DRIVER.reg
and modify the COM-PORT attributes in the reg file to match that of your adapter as listed in device manager - Merge the
WIN_DRIVER.reg
file with the Windows registry
- Create the directory
~/.passthru/
- From the repositories driver folder, run
build.sh
- In your
~/.passthru/
folder, you will find 2 JSON files. One for the M2 (macchina_m2.json
) and one for the A0 (macchina_a0.json
). Change theCOM-PORT
attribute in the JSON to match that of your TTY port your adapter uses.
- Install FlexLED and esp32_can libraries (instructions are on the repo links)
- be sure you have read the setting up docs for your relivent adapter on Macchina's website here for the A0 or here for the M2.
- Open the firmware folder in Arduino IDE
- Modify
MACCHINA_CONFIG.h
, such that the file looks like the following depending on your target device:
For A0
//#define CFG_MACCHINA_M2
#define CFG_MACCHINA_A0
//#define CFG_MACCHINA_ESP32_TEST
For M2
#define CFG_MACCHINA_M2
//#define CFG_MACCHINA_A0
//#define CFG_MACCHINA_ESP32_TEST
- Upload the sketch to your target board and enjoy! On both the A0 and M2, a red LED will be activated upon successful upload. This means the adapter is ready to be used!