<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Muhammad Umer Saeed</title>
    <description>The latest articles on DEV Community by Muhammad Umer Saeed (@muhammad_umersaeed).</description>
    <link>https://dev.to/muhammad_umersaeed</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4152063%2F6acf81a6-ac68-4de8-9584-b3bae5e3cf33.png</url>
      <title>DEV Community: Muhammad Umer Saeed</title>
      <link>https://dev.to/muhammad_umersaeed</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/muhammad_umersaeed"/>
    <language>en</language>
    <item>
      <title>I Built an Open-Source J1939 CAN Bus Emulator (Because Vector Tools Cost Too Much)</title>
      <dc:creator>Muhammad Umer Saeed</dc:creator>
      <pubDate>Wed, 30 Sep 2026 11:13:19 +0000</pubDate>
      <link>https://dev.to/muhammad_umersaeed/i-built-an-open-source-j1939-can-bus-emulator-because-vector-tools-cost-too-much-2i1j</link>
      <guid>https://dev.to/muhammad_umersaeed/i-built-an-open-source-j1939-can-bus-emulator-because-vector-tools-cost-too-much-2i1j</guid>
      <description>&lt;p&gt;If you've ever tried to test J1939 diagnostics tooling, integrate a telematics app, or just learn how heavy-duty vehicle networks work, you've probably hit the same wall I did: the real tools are excellent, expensive, and closed. A Vector CANoe/CANalyzer license is a serious purchase, and even once you have it, you still need a real ECU — or a very good simulation — to test against.&lt;/p&gt;

&lt;p&gt;So I built one. This post covers why, what it does, and how it's put together. Three companion deep-dive posts cover the protocol internals (PGNs &amp;amp; address claim, DTCs &amp;amp; transport protocol, VIN &amp;amp; BAM) if you want to go further.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Needed to Exist
&lt;/h2&gt;

&lt;p&gt;A few things kept coming up whenever I talked to people trying to get started with J1939:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The established tools are expensive.&lt;/strong&gt; Vector, Peak, and similar platforms are the industry standard for good reason, but the entry cost is real, especially for a startup or a solo developer who just wants to prototype.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;They're hard to configure without deep CAN/J1939 knowledge already.&lt;/strong&gt; The tooling assumes you know the protocol; it doesn't teach it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reading raw CAN traffic isn't the hard part — decoding it is.&lt;/strong&gt; SPN scaling factors, byte ordering, PGN structure — none of that is obvious from a raw frame dump.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Python-can changes the economics.&lt;/strong&gt; It's open-source, actively maintained, and supports a wide range of hardware — from professional-grade Vector interfaces down to a $30 CANable adapter.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cheap hardware is genuinely good now.&lt;/strong&gt; CANable and similar SLCAN-based adapters are inexpensive and easy to buy, and they work.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Virtual CAN means you don't need hardware at all for a lot of development.&lt;/strong&gt; python-can supports virtual buses, so telematics and application-layer development can happen entirely in software.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The library ecosystem is mature.&lt;/strong&gt; Logging, J1939 message handling, ISO-TP — the building blocks already exist in Python; they just hadn't been assembled into an approachable emulator.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That gap — approachable, cheap, open, and genuinely educational — is what this project fills.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;python-can based J1939 ECU emulator&lt;/strong&gt;, available as both a CLI and a GUI, running entirely on your machine.&lt;/p&gt;

&lt;h3&gt;
  
  
  CLI mode
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Runs in a Docker container, so it fits into existing CI/CD or cloud infrastructure without modification&lt;/li&gt;
&lt;li&gt;Virtual ECUs let you build and test a telematics application with zero hardware in the loop&lt;/li&gt;
&lt;li&gt;Can be deployed to the cloud as a virtual vehicle for solution development and integration testing&lt;/li&gt;
&lt;li&gt;Suited to automated testing pipelines, since it's fully scriptable&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  GUI mode
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Runs on localhost, on a port you choose&lt;/li&gt;
&lt;li&gt;Select your hardware, set the baud rate, and configure PGNs — five PGNs ship in v1.0, each with live sliders&lt;/li&gt;
&lt;li&gt;Watch raw CAN values update in real time as you change signal values&lt;/li&gt;
&lt;li&gt;Configurable PGN broadcast timing&lt;/li&gt;
&lt;li&gt;Set or modify the VIN live&lt;/li&gt;
&lt;li&gt;Inject and clear DTCs (both single-frame and multi-frame) to test fault-handling logic&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Platform support
&lt;/h3&gt;

&lt;p&gt;Runs in Chrome, Safari, Firefox, and Edge, and works cross-platform on Windows, Linux, and macOS.&lt;/p&gt;

&lt;h3&gt;
  
  
  Learning resources
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;YouTube playlist&lt;/strong&gt;: install/run walkthrough, plus dedicated explainers on PGNs, DTCs, VIN, address claim, and the BAM/RTS-CTS transport mechanisms — &lt;a href="https://youtube.com/playlist?list=PLDy4LZlr1w7w&amp;amp;si=Wg-tgoO1alZqnXx3" rel="noopener noreferrer"&gt;watch here&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub repo&lt;/strong&gt;: full source, README with setup and hardware instructions — &lt;a href="https://github.com/Embedded-Verse/j1939-emulator" rel="noopener noreferrer"&gt;github.com/EmbeddedVerse/j1939-emulator&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Core protocol features
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;PGN broadcast (5 signals in v1.0)&lt;/li&gt;
&lt;li&gt;DTCs — both single-frame and multi-frame (DM1)&lt;/li&gt;
&lt;li&gt;VIN — multi-frame broadcast (BAM)&lt;/li&gt;
&lt;li&gt;Address claim (J1939-81)&lt;/li&gt;
&lt;li&gt;Configurable timing across all of the above&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Who This Is Actually Useful For
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Testing a J1939 scanner tool&lt;/strong&gt; against a predictable, controllable ECU&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ECU-to-ECU communication&lt;/strong&gt; development and testing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Telematics application development&lt;/strong&gt; — build against a virtual vehicle before any hardware exists&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Learning how J1939 actually works&lt;/strong&gt; — the emulator plus the video series is closer to a lab than a black box&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Minimum-effort setup&lt;/strong&gt; — one command line gets a running virtual ECU&lt;/li&gt;
&lt;li&gt;Backed by documentation, cheap supported hardware, and a full video walkthrough series&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Choosing the stack&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;python-can&lt;/strong&gt; — open-source, wide hardware support, active community&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;NiceGUI&lt;/strong&gt; — for the localhost GUI&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CLI mode&lt;/strong&gt; — built specifically to fit cloud-native/containerized deployment&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CANable&lt;/strong&gt; — the reference hardware, because it's cheap, easy to buy, and easy to test against&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Architecture&lt;/strong&gt;&lt;br&gt;
The emulator was architected from the start to support both CLI and GUI from the same core, rather than bolting a GUI onto a script:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A CLI terminal layer for runtime parameter changes&lt;/li&gt;
&lt;li&gt;The CLI path is what makes cloud-native deployment realistic&lt;/li&gt;
&lt;li&gt;The GUI path is aimed at local development and fault injection, where a human is actively watching and adjusting values&lt;/li&gt;
&lt;li&gt;Runtime value changes and signal calculation (scaling, encoding) happen live, not just at startup&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Testing&lt;/strong&gt;&lt;br&gt;
I didn't just trust the code — I verified it against real hardware and a real analyzer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Used CANable paired with TSMaster, and separately with a Vector VN1610&lt;/li&gt;
&lt;li&gt;Verified raw CAN frames, timing, and data byte-for-byte&lt;/li&gt;
&lt;li&gt;Specifically verified multi-frame (transport protocol) reassembly, since that's where most naive implementations break&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try It
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Repo: &lt;a href="https://github.com/Embedded-Verse/j1939-emulator" rel="noopener noreferrer"&gt;github.com/EmbeddedVerse/j1939-emulator&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Videos: &lt;a href="https://youtube.com/playlist?list=PLDy4LZlr1w7w&amp;amp;si=Wg-tgoO1alZqnXx3" rel="noopener noreferrer"&gt;YouTube playlist&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you want the protocol internals — how PGNs and address claim actually work on the wire, how DTCs get split across multiple CAN frames, why VIN broadcast needs its own transport session — the three companion posts in this series go deep on each.&lt;/p&gt;

&lt;p&gt;I build custom CAN/J1939/OBD2 diagnostic tooling and embedded firmware for hardware product teams. Reach out if that's useful to you.&lt;/p&gt;

</description>
      <category>automotive</category>
      <category>opensource</category>
      <category>python</category>
      <category>embedded</category>
    </item>
  </channel>
</rss>
