Macchina-J2534
Macchina-J2534 copied to clipboard
J2534 drivers for various Macchina hardware
Macchina-J2534
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
Demo videos
Feature matrix
:x: - 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
:heavy_minus_sign: - 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 | :heavy_check_mark: | :heavy_check_mark: |
Read programming voltage | :x: | :x: |
ISO-TP | :heavy_check_mark: | :heavy_check_mark: |
CAN | :heavy_minus_sign: | :heavy_minus_sign: |
ISO9141 | WIP | :x: |
ISO14230-4 | WIP | :x: |
J1850PWM | TODO | :x: |
J1850VPW | TODO | :x: |
SCI | :x: | :x: |
How to install
The process is generally the same for all supported hardware.
Requirments
- Rust installed on your system See here on how to
- Arduino IDE Installed See here on how to
Important information for windows users
You will need to install the i686-pc-windows-msvc toolchain!
$ rustup run stable-i686-pc-windows-msvc
Linux users
You need to install libudev-dev
prior to building!
Installing the driver on Windows
- 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
Installing the driver on Linux and OSX
- 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.
Installing the adapter firmware
- 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!