Skip to content

Latest commit

 

History

History
42 lines (34 loc) · 1.4 KB

truckdevil.md

File metadata and controls

42 lines (34 loc) · 1.4 KB

TruckDevil Documentation

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

  1. Clone the repository:
    git clone https://github.com/LittleBlondeDevil/TruckDevil.git
  2. If using M2:
    • Install Arduino Desktop IDE, Macchina M2 Board Configuration, and drivers.
    • Include due_can and can_common libraries in the IDE.
    • Upload m2_sketch.ino to the M2.

Usage

  1. Interactive Mode:

    python truckdevil.py

    Use commands like add_device, list_device, list_modules, and run_module.

  2. 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:
    def main_mod(argv, device)
    There is a template module provided to get started with.

J1939 API

  • Refer to j1939.py for documentation and examples.

For more detailed information, visit the TruckDevil GitHub repository.