Home

Awesome

Travis Build Status

J1939-Framework

Framework to work with J1939 protocol.

J1939 protocol is a standard used in different systems compliant with CAN 2.0B specification.

The framework has been developed in C++ in a Linux distribution and compiled using the GNU toolchain. No dependencies are required for the compilation of any of the projects except from SocketCan compiled in the Linux Kernel.

What can you do with J1939-Framework

And of course, develop!!:

Installing and compiling

Installation:

Ubuntu 18.10 or higher


sudo apt-get install libgtest-dev protobuf-compiler libprotobuf-dev libncurses-dev libwebsockets cmake
cd /usr/src/gtest
sudo env "PATH=$PATH" cmake CMakeLists.txt
sudo make
sudo cp *.a /usr/lib
git clone https://github.com/open-source-parsers/jsoncpp.git

 
cd jsoncpp
git checkout 863aa36165acfdbaf22447f4934f5adc327692a0
cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON 
sudo make install
cd ~
git clone https://github.com/famez/J1939-Framework.git
cd J1939-Framework
cmake . 
cmake --build .
sudo make install

Usage with SocketCan:

To make SocketCan available in your system, you should execute the following commands:

sudo apt-get install can-utils

To enable the drivers if they not enabled by default:

sudo modprobe can
sudo modprobe vcan

To generate a virtual interface for test purposes.

sudo ip link add name vcan0 type vcan

To test over vcan0.

./Scripts/gear_level.sh vcan0 | j1939Sender --silent --file Scripts/define_frames.j1939
candump vcan0

TRCPlayer

alt text

Wireshark dissector

alt text

J1939GUI

alt text

alt text