Skip to content

A professional CAN Bus Analyzer & J1939 Decoder built with Python. Features real-time PGN parsing and a built-in traffic simulator.

Notifications You must be signed in to change notification settings

PhilYeh1212/Python-CAN-Bus-J1939-Sniffer-GUI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 

Repository files navigation

๐Ÿ”ฅ BLACK FRIDAY SALE: Get 15% OFF all source codes with code BLACKFRIDAY. Click here to apply discount automatically

๐Ÿš› Python CAN Bus & J1939 Sniffer (GUI Source Code)

Python Library Protocol

Stop struggling with raw Hex dumps. A production-ready CAN Bus Sniffer that automatically decodes J1939 PGNs (e.g., Engine Speed, Oil Temp) into human-readable text. Built with Python & Tkinter.

[J1939 Sniffer Demo]่žขๅน•ๆ“ทๅ–็•ซ้ข 2025-11-19 161241


๐Ÿš€ Why this tool?

Professional tools like Vector CANalyzer are expensive. Simple Python scripts often lack a GUI.

This project bridges the gap. It provides a Clean GUI that connects to your hardware (Vector, PCAN, Kvaser, SocketCAN) and translates 29-bit J1939 IDs instantly.

Perfect for:

  • ๐Ÿš› Automotive Engineers: Debugging Truck/Bus ECUs.
  • ๐Ÿค– Robotics Developers: Monitoring CAN-based actuators.
  • ๐ŸŽ“ Students/Researchers: Learning the J1939 protocol structure.

โœจ Features

  • ๐Ÿš› Native J1939 Parsing: Automatically parses Priority, PGN, and Source Address.
    • Example: 18F00400 โ†’ EEC1 - Engine Speed (RPM)
  • ๐ŸŽฎ Built-in Simulation: No hardware? No problem. The "Demo Mode" generates realistic traffic so you can test the UI logic immediately.
  • ๐Ÿ”Œ Universal Support: Works with any interface supported by python-can (slcan, socketcan, vector, pcan, ixxat, etc.).
  • ๐Ÿ“Š Live Monitor: Real-time scrolling table with Timestamp, DLC, and Hex Data view.

๐Ÿ› ๏ธ Dependencies

pip install python-can

๐Ÿ“ฅ Download Full Source Code Get the complete, fully commented source code (main.py). You can use it as a standalone tool or integrate the J1939 parsing logic into your own projects.

๐Ÿ‘‰ Download on Gumroad ($9.9): Link

(Includes: main.py, requirements.txt, and Setup Guide)

๐Ÿ“– Code Sneak Peek (J1939 Logic) The code includes a helper function to extract PGNs from 29-bit Extended IDs:

Python

def parse_j1939_id(self, can_id):
    """Extract PGN and Source Address from 29-bit ID"""
    pgn = (can_id >> 8) & 0x3FFFF
    sa = can_id & 0xFF
    priority = (can_id >> 26) & 0x7
    return pgn, sa, priority

๐Ÿ‘จโ€๐Ÿ’ป About the Author Phil Yeh - Senior Automation Engineer

My Gumroad Store (More Engineering Tools)

Keywords: Python, CAN Bus, J1939, SAE J1939, PGN Decoder, ECU, OBD2, Sniffer, GUI, Tkinter, Automation, Vector, PCAN

About

A professional CAN Bus Analyzer & J1939 Decoder built with Python. Features real-time PGN parsing and a built-in traffic simulator.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published