Skip to content
/ jcan Public

open-source cross-platform can bus diagnostic tool

License

Notifications You must be signed in to change notification settings

ImArjunJ/jcan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jcan

can bus diagnostic tool for linux. reverse-engineered usb protocol for vector hardware, socketcan, slcan serial adapters, dbc decoding, logging, transmit scheduling. written in c++23 with dear imgui.

c++23 imgui license

what is this

a can bus tool i built because the existing options on linux are either ancient, proprietary, or both. or they simply dont exist. supports multiple adapters simultaneously, decodes dbc files in real time, and includes what is (to my knowledge) the first open-source linux driver for vector can hardware.

image1 image2

supported hardware

adapter interface notes
vector vn1640a usb (libusb) n/a
kvaser leaf usb (libusb) cross-platform, ported from linuxcan gpl source
kvaser mhydra (memorator pro, etc) usb (libusb) hydra protocol, cross-platform, 30 device PIDs
kvaser (any socketcan-supported) socketcan auto-configures bitrate and link state, sudo elevation
canadapter / cantact / candlelight slcan (serial) ascii protocol over usb-serial
any socketcan device socketcan can0, vcan0, etc.

adapter discovery scans serial ports (vid/pid matching for 8 known adapters), socketcan interfaces via netlink, and usb sysfs for vector/peak/kvaser devices. unbound usb devices get helpful hints.

build

requires cmake 3.25+ and a c++23 compiler (gcc 13+ or clang 17+).

cmake -B build
cmake --build build -j$(nproc)
  • JCAN_ENABLE_SOCKETCAN - auto-enabled on linux
  • JCAN_ENABLE_VECTOR - auto-enabled if libusb is found

for windows

if you are on windows, you must still install drivers:

todo

  • make precompiled binaries for all platforms
  • ensure compilation on all platforms
  • debug sending messages on vector
  • add sdk / scripting lang to be able to send messages
  • add custom views (to prevent single-use scripts)

About

open-source cross-platform can bus diagnostic tool

Topics

Resources

License

Stars

Watchers

Forks