Claude Code and Codex Reverse Engineered a 1994 Jeep ECU: Anatomy of an AI-Assisted Hardware Hack
Two coding agents and a $3 Arduino pulled 32 KB of calibration data out of a 1994 Jeep SBEC-II. Here is the real architecture behind the video: 68HC11 opcode prebytes, SCI framing, shift-register ROM reads — and the exact points where the agents hallucinated.
AI Generated with Qwen 3.0 via CometAPIA viral Hacker News video claims that Claude Code and OpenAI Codex 'reverse engineered' a 1994 Jeep's ECU over a $3 Arduino. The reality is more interesting than the headline: a human engineer with a multimeter, a factory service manual, and two LLM agents orchestrated a legitimate embedded reverse-engineering engagement in roughly a weekend — work that historically consumed weeks of dead-tree datasheet archaeology.
This analysis breaks down what was actually built, why the 1994 Chrysler SBEC-II is such a hostile target, and how to reproduce the pipeline without bricking an irreplaceable 30-year-old controller.
What the $3 Arduino Actually Did
The microcontroller in the video (an ATmega328P clone board) performed three distinct jobs. Only one is glamorous:
- ROM extraction. Desolder — or in-circuit clip — the calibration memory and read 32 KB out over two daisy-chained 74HC595 shift registers driving the address bus, with a direct port read on the data bus.
- Bus sniffing. A second UART tap on the Chrysler SCI line between the ECU and a DRB-II scan tool, running at exactly 7,812.5 baud.
- Fault injection. PWM/DAC simulation of MAP, TPS, and coolant sensors on the bench to correlate live behavior with the disassembly.
None of these circuits are novel; the Ben Eater-style EPROM reader predates this video by a decade. The novelty is the software glue. The agents wrote the extraction firmware, the Python analysis harness, the opcode-table cross-checks, the image diffing, and the table-shape heuristics. The human supplied every piece of physical ground truth: pinouts verified by continuity, part numbers read off the housing, and scope captures proving the wire protocol.
That division of labor is the actual finding — and the actual cautionary tale.
Why a 1994 Jeep SBEC-II Is a Hostile Target
1994 sits in an awkward valley: pre-OBD-II, post-Renix. Chrysler's Single Board Engine Controller (SBEC-II) on the 4.0L inline-six is a closed, undocumented system with no public memory map, no published calibration format, and no legal mandate for the manufacturer to disclose either.
The Silicon: Motorola 68HC11 and Three Opcode Prebytes
The core is a Motorola 68HC11-family MCU: big-endian, 16-bit address space, and a nightmare for naive disassemblers because of prebyte-prefixed opcodes. Byte 0x18 switches to the Y-register page, 0x1A to page 3, and 0xCD to page 4. Any linear sweep that does not model the prebyte state machine desynchronizes within a few hundred bytes and produces confident, plausible, completely wrong assembly.
Two more facts the tooling must encode from day one:
- The interrupt vector table lives at
0xFFD6–0xFFFF; the reset vector is the word at `0xFFFE`. Recursive-descent disassembly must start there, not at offset zero. - On-chip I/O registers occupy the low page (
0x0000–0x01FFon F1-class parts), so0x00xxreads are register accesses, not RAM.
SCI, CCD, and the Absence of OBD-II
Two separate buses matter. SCI (Serial Communications Interface) is a single-wire, idle-high, bidirectional UART derivative used for scan-tool conversations. CCD (Chrysler Collision Detection) is a differential bus used between modules. Neither speaks OBD-II. 1994 is OBD-I with Mopar-proprietary framing, which means no generic ELM327 clone will help you.
A useful sanity anchor: 7,812.5 baud is exactly 16 MHz / (16 × 128), so an ATmega328P hits that rate with UBRR = 127 and zero baud error. That integer relationship is a strong hint that you are looking at the right divisor when your sniffed frames decode cleanly.
Phase 2: Production-Grade ROM Read Firmware
This is where agents shine: boring, layout-sensitive glue code with exact register semantics. The variant below reads a 27C256 through two shift registers and returns a CRC-32 so the host can prove the dump is reproducible.
#include <Arduino.h>
#include <stdint.h>
// 27C256 (32K x 8) ROM reader -- ATmega328P @ 16 MHz
// Data : D0-D3 -> PD4..PD7, D4-D7 -> PB0..PB3 (direct port reads)
// Address : A0-A7, A8-A14 via two daisy-chained 74HC595s
// Control : /CE, /OE driven low; /PGM tied to VCC
static constexpr uint8_t SR_DATA = 2; // PD2 -> 74HC595 DS (pin 14)
static constexpr uint8_t SR_CLOCK = 3; // PD3 -> 74HC595 SHCP (pin 11)
static constexpr uint8_t SR_LATCH = A0; // PC0 -> 74HC595 STCP (pin 12)
static constexpr uint8_t PIN_CE = A1;
static constexpr uint8_t PIN_OE = A2;
static constexpr uint32_t ROM_SIZE = 32768UL;
static void setupBus() {
DDRD &= 0x0F; // PD4..PD7 inputs (data)
PORTD &= 0x0F; // no pull-ups on a driven bus
DDRB &= 0xF0; // PB0..PB3 inputs (data)
PORTB &= 0xF0;
pinMode(SR_DATA, OUTPUT);
pinMode(SR_CLOCK, OUTPUT);
pinMode(SR_LATCH, OUTPUT);
pinMode(PIN_CE, OUTPUT);
pinMode(PIN_OE, OUTPUT);
digitalWrite(PIN_CE, LOW);
digitalWrite(PIN_OE, LOW);
}
static void shiftAddress(uint16_t addr) {
digitalWrite(SR_LATCH, LOW);
shiftOut(SR_DATA, SR_CLOCK, MSBFIRST, (uint8_t)(addr & 0xFF)); // A0-A7
shiftOut(SR_DATA, SR_CLOCK, MSBFIRST, (uint8_t)((addr >> 8) & 0x7F)); // A8-A14
digitalWrite(SR_LATCH, HIGH); // rising edge latches both bytes
}
static inline uint8_t readBus() {
return (uint8_t)(((PIND >> 4) & 0x0F) | ((PINB & 0x0F) << 4));
}
static uint32_t crc32Update(uint32_t crc, uint8_t b) {
crc ^= b;
for (uint8_t i = 0; i < 8; i++)
crc = (crc >> 1) ^ (0xEDB88320UL & (uint32_t)(-(int32_t)(crc & 1)));
return crc;
}
void dumpRom() {
uint32_t crc = 0xFFFFFFFFUL;
uint8_t seen = 0;
Serial.println(F("BEGIN"));
for (uint32_t a = 0; a < ROM_SIZE; a++) {
shiftAddress((uint16_t)a);
delayMicroseconds(1); // >= tACC (150 ns) + wiring margin
const uint8_t v = readBus();
seen |= v;
crc = crc32Update(crc, v);
Serial.write(v); // raw binary, framed by BEGIN/END
}
crc ^= 0xFFFFFFFFUL;
if (seen == 0x00 || seen == 0xFF) {
Serial.println(F("\nERR: bus stuck -- check /CE, /OE, GND"));
return;
}
Serial.print(F("\nCRC32 "));
Serial.println(crc, HEX);
}Two production details the video glosses over: dump the image twice and require identical CRC-32 before you trust it, and probe /CE//OE with a scope — a floating output-enable produces a plausible-looking but shifted image that will waste days of analysis.
Phase 3: Lifting 32 KB of Machine Code into a Memory Map
Agent involvement here is highest-leverage and highest-risk. The useful prompts are narrow: seed recursive descent from the reset vector at 0xFFFE, enumerate every branch target into a symbol table, then annotate register writes in the low page to recover peripheral configuration. Ghidra ships 6800-family processors; if the exact 68HC11 variant is missing, a SLEIGH module is the fallback — and this is precisely where an LLM will happily invent a valid-looking SLEIGH spec that decodes the prebyte pages incorrectly.
Phase 4: Extracting and Validating Calibration Tables
The payoff is a 16×16 volumetric-efficiency table and its spark-advance sibling. Do not eyeball these — assert on them:
"""Extract and sanity-check candidate tables from an SBEC-II image."""
from __future__ import annotations
import hashlib
from dataclasses import dataclass
from pathlib import Path
@dataclass(frozen=True)
class TableCandidate:
start: int
rows: int
cols: int
name: str
def load_image(path: Path) -> bytes:
blob = path.read_bytes()
if len(blob) != 32 * 1024:
raise ValueError(f"expected 32768 bytes, got {len(blob)}")
if blob.count(blob[0]) == len(blob):
raise ValueError("uniform fill: bad read or wrong /OE state")
return blob
def extract(blob: bytes, t: TableCandidate) -> list[list[int]]:
end = t.start + t.rows * t.cols
if end > len(blob):
raise IndexError(f"{t.name} overruns image at 0x{end:04X}")
flat = blob[t.start:end]
return [list(flat[r * t.cols:(r + 1) * t.cols]) for r in range(t.rows)]
def axis_monotonic(table: list[list[int]]) -> bool:
"""The RPM breakpoint axis sits in the trailing column of a row-major table."""
col = [row[-1] for row in table]
return all(b > a for a, b in zip(col, col[1:]))
def report(blob: bytes, t: TableCandidate) -> None:
tbl = extract(blob, t)
lo, hi = min(map(min, tbl)), max(map(max, tbl))
ok = axis_monotonic(tbl)
print(f"{t.name:20s} 0x{t.start:04X} range=[{lo:#04x},{hi:#04x}] axis_ok={ok}")
if not ok:
raise AssertionError(f"{t.name}: axis not monotonic -- re-anchor table")
if __name__ == "__main__":
img = load_image(Path("sbec2_cal.bin"))
print("sha256", hashlib.sha256(img).hexdigest())
for cand in (TableCandidate(0x7A00, 16, 16, "fuel_vol_eff"),
TableCandidate(0x7B00, 16, 16, "spark_advance")):
report(img, cand)Monotonicity is a cheap, powerful oracle: RPM breakpoints and MAP breakpoints must be strictly increasing, so a candidate table that violates ordering is almost certainly misaligned by one or more bytes — the single most common failure mode when an agent guesses a table base address.
Where the Agents Hallucinated (and How It Was Caught)
The video's honest moments are its most instructive. Recurring failure classes:
- Invented pin numbers. Confident, well-formatted, wrong. Mitigation: continuity-test every claim against the harness.
- Plausible-but-fake opcodes. Extended-page mnemonics that do not exist in the 68HC11 reference manual. Mitigation: validate generated disassembly against the official opcode map byte-for-byte.
- Protocol folklore. Baud rates and frame layouts recalled from unrelated Chrysler platforms (SBEC-III, JTEC) and applied to 1994 hardware.
- Silent table anchoring. Choosing a base address that produced a beautiful-looking graph with no checksum justification.
The countermeasure is not better prompting — it is a ground-truth file checked into the repo that the agent must cite rather than infer:
# Ground truth -- cite, never infer
- ECU: Chrysler SBEC-II, 1994 XJ 4.0L
- MCU: Motorola 68HC11 family, big-endian
- ROM: 27C256, 32 KiB, A0-A14, /CE pin 20, /OE pin 22
- Prebytes: 0x18 (Y page), 0x1A (page 3), 0xCD (page 4)
- Vectors: 0xFFD6-0xFFFE; reset = word at 0xFFFE
# Rules
1. Never invent a pin. If absent from docs/fsm/, answer UNKNOWN.
2. Every address must map to a dump offset.
3. Every disassembly claim must quote the decoded bytes.Operational Checklist Before You Touch a 30-Year-Old ECU
- Work on a spare. Buy a second SBEC from a junkyard before desoldering anything; NOS controllers are effectively extinct.
- Photograph and label every connector and solder joint before removal. Pin 1 orientation is not always silkscreened.
- Use a proper desoldering station and ESD-safe grounding; 1990s through-hole boards lift pads easily.
- Verify the dump with dual reads plus CRC-32, and archive
sha256alongside the raw image. - Sniff before you stimulate. Capture real SCI traffic before injecting anything.
- Never modify a calibration on a road-registered vehicle. Bench-verify only.
Legal, Emissions, and Safety Boundaries
Reverse engineering for interoperability and analysis has meaningful protection in the United States — Sega v. Accolade and Google v. Oracle both support intermediate copying for study. But tampering with an emissions control device is separately prohibited under Clean Air Act §203(a)(3)(A) (42 U.S.C. §7522), and 1994 vehicles are not exempt. The DMCA anti-circumvention provisions (17 U.S.C. §1201) are a separate question from copyright fair use and are worth reading before distributing modified binaries. Publish methodology and tooling; do not publish altered calibrations for road use.
Sources & Technical References
- NXP, M68HC11 Reference Manual (M68HC11RM) — opcode map, prebyte pages, interrupt vectors: https://www.nxp.com/docs/en/reference-manual/M68HC11RM.pdf
- NXP, MC68HC11F1 Technical Data — on-chip register map and memory layout: https://www.nxp.com/docs/en/data-sheet/MC68HC11F1.pdf
- Microchip, ATmega328P Datasheet — port registers, UBRR baud calculation,
shiftOuttiming: https://ww1.microchip.com/downloads/en/DeviceDoc/ATmega48A-PA-88A-PA-168A-PA-328-P-DS-DS40002061B.pdf - Arduino, shiftOut() Reference: https://www.arduino.cc/reference/en/language/functions/advanced-io/shiftout/
- Ghidra, SLEIGH Language Specification (NSA): https://github.com/NationalSecurityAgency/ghidra/blob/master/GhidraDocs/languages/index.html
- Chrysler/Mopar, 1994 Jeep Cherokee (XJ) / Wrangler (YJ) Factory Service Manual — wiring diagrams, SBEC pinouts, DRB-II procedures
- U.S. EPA, 40 CFR Part 86 — emissions testing and OBD regulatory context: https://www.ecfr.gov/current/title-40/chapter-I/subchapter-C/part-86
- Clean Air Act §203(a)(3)(A), 42 U.S.C. §7522: https://www.law.cornell.edu/uscode/text/42/7522
- 17 U.S.C. §1201, DMCA anti-circumvention: https://www.law.cornell.edu/uscode/text/17/1201
- Sega Enterprises Ltd. v. Accolade, Inc., 977 F.2d 1510 (9th Cir. 1992); Google LLC v. Oracle America, Inc., 593 U.S. 1 (2021)
- Anthropic, Claude Code documentation: https://docs.anthropic.com/en/docs/claude-code/overview
- OpenAI, Codex CLI repository: https://github.com/openai/codex
Discussion (0)
Continue Reading
More production-grade engineering deep dives and architectural guides

Signals vs Virtual DOM at 1B Monthly Renders: React 19 vs SolidJS vs Svelte 5 vs Vue 3.5 — Measured p99 Frame Time, Memory, Bundle Size, and True Cost per 1M Updates
We rebuilt the same 10,000-row update workload in React 19, SolidJS, Svelte 5, and Vue 3.5 and measured p99 frame time, retained heap, bundle weight, and a defensible cost model per million updates. The numbers show that architecture, not micro-optimization, decides whether your tail latency survives a billion renders.

Postgres Egress Cost Optimization: Cutting Network Bandwidth by 70% in High-Throughput APIs
Your Postgres bill is rarely about CPU — it is about bytes leaving the database, crossing an availability zone, and traversing a NAT gateway. Here is the systematic playbook we used to cut data transfer cost by 70% in a high-throughput API without touching query latency.

Gemini 4 Neon: A Principal Engineer's Deep Dive into the Architecture
Gemini 4 Neon is a serving-systems release disguised as a model launch: the interesting engineering lives in its control plane, cache fabric, and streaming transport, not the benchmark table. This analysis breaks down the four-plane topology, the latency budget you must own, and the production patterns that keep a Neon integration from melting down under load.