---
name: lan7800-programmer
description: "Read, edit, and program the EEPROM of a Microchip LAN7800 USB-3.1 to Gigabit-Ethernet controller (VID 0x0424 / PID 0x7800) on Linux — MPLAB-Connect parity. Trigger words: LAN7800, program EEPROM, change MAC address on USB ethernet adapter, edit VID/PID, dump EEPROM to bin, LED/GPIO config, verify a network adapter, MPLAB Connect on Linux, flash a Microchip USB gigabit dongle."
user-invocable: true
---

# LAN7800 EEPROM Programmer

Read the EEPROM off a Microchip **LAN7800** USB-3.1→GbE adapter, edit
MAC / VID / PID / bcdDevice / strings / serial and LED/GPIO with a byte-exact
preview, and program a physical adapter with verify-after-write. **LAN7800 only**
(VID `0x0424` / PID `0x7800`).

## Safety model (read first)

- **Reads are free.** `scan`, `read`, `read-device`, `info`, `verify`, `edit`,
  and preview never touch hardware.
- **Physical writes are gated.** Only `program` and `erase` change an adapter,
  and both refuse unless `--force-physical-write` is passed. Set that flag only
  after a deliberate, confirmed decision — the webapp never sets it and returns
  the exact command for a human to run instead.
- **Keep a backup** before any write: `lan7800prog read --iface <if> --out backup.bin`.

## CLI (single source of truth)

```bash
lan7800prog scan                                   # FREE — enumerate LAN7800s
lan7800prog read-device --out dump.bin             # FREE — read connected adapter
lan7800prog info --in dump.bin                     # parse fields, config, LED/GPIO
lan7800prog edit --in dump.bin --out out.bin \
  --mac 00:80:0F:12:34:56 --serial SN0001 --ensure-signature
lan7800prog verify --iface <if> --image out.bin    # FREE — diff device vs image
# GATED — only after a confirmed decision:
lan7800prog program --iface <if> --image out.bin --force-physical-write
```

Every command prints `OK:` / `ERROR:` + `Hint:` lines and supports `--json`.

## Webapp

```bash
lan7800-programmer         # launches the Hydrogen webapp on http://127.0.0.1:8747
```

Scan → Load a `.bin` (or read a device) → edit fields + LED/GPIO with a live
byte-exact preview → save. `Program to device` is intentionally gated and shows
the exact command to run. State lives on the server (`GET /state`, `/console`,
`/scan`) so it is AI-drivable.

See `README.md` for the full command reference and `docs/` for the EEPROM
mechanism and MPLAB-Connect parity notes.
