Skip to content

rusEFI Calibration Via CAN

YouTube: It works

image

Summary

With all the electromagnetic interference around gasoline engines due to high-voltage ignition, a CAN physical layer provides a level of reliability above RS232 and USB physical layers.

rusEFI acts as a translator between either Linux SocketCAN or Windows PCAN and TunerStudio since as of March 2024 TunerStudio does not integrate with any CAN bus dongle natively.

ISO 15765-2, or ISO-TP (Transport Layer), helps us exchange up to 4096 packets into which we wrap TS protocol. See the Wikipedia article.

https://github.com/rusefi/rusefi/tree/master/java_console/io/src/main/java/com/rusefi/io/can folder has a java implementation of ISO-TP packet encoding/decoding.

There is no standard way of communicating with CAN bus on Windows. At the moment rusEFI is focusing on PCAN by Peak System and ELM327 options of the Windows side of CAN.

PCAN

It works! https://www.youtube.com/watch?v=Mwgq26M5-JY

Between three major professional CAN frontend vendors, we like PCAN by https://www.peak-system.com/ due to the combination of the following:

  1. Documented Windows DLL drivers with official Java wrappers called PCAN-Basic API

  2. https://github.com/moonglow/pcan_cantact open source firmware for cheeeeeeap third party devices

The rusEFI bridge between PCAN and ISO-TP is located at https://github.com/rusefi/rusefi/tree/master/java_console/io/src/main/java/com/rusefi/io/can/isotp

ELM327

ELM327 should have worked, but it does not.

With more than a dozen magic commands, it's possible to switch ELM327 device into binary transition with serial communication between calibration software and ELM327 acting as a bridge. At the moment we have a very odd bug making the overall solution not working.

See https://canhacker.com/ch-obd-m02/ for a great pinout image. Yes, both GND are needed for reliable ELM327 operation.

IsoTp ISO 15765-2 in rusEFI - Forum