Overview TruckDevil is a framework designed for interacting with and assessing ECUs that use J1939 for communication on the CANBUS.
Requirements
- Hardware: Recommended CAN transceiver is Macchina M2. Alternatives include devices supported by python-can (e.g., SocketCAN).
- Software: Requires Python 3. Additional software for flashing M2 firmware.
Installation
- Clone the repository:
git clone https://github.com/LittleBlondeDevil/TruckDevil.git
- If using M2:
- Install Arduino Desktop IDE, Macchina M2 Board Configuration, and drivers.
- Include
due_can
andcan_common
libraries in the IDE. - Upload
m2_sketch.ino
to the M2.
Usage
-
Interactive Mode:
python truckdevil.py
Use commands like
add_device
,list_device
,list_modules
, andrun_module
. -
Command Line:
python .\truckdevil.py add_device m2 can0 250000 COM5 run_module read_messages set num_messages 5 print_messages
Creating Custom Modules
- Add Python files in the
modules
folder with the function:There is a template module provided to get started with.def main_mod(argv, device)
J1939 API
- Refer to
j1939.py
for documentation and examples.
For more detailed information, visit the TruckDevil GitHub repository.