In-system configuration-EEPROM programmer for the Microchip USB2244 card‑reader controller. Read, edit, and program the board's settings (USB VID/PID, strings, power, LEDs, LUN map, …) over the controller's vendor SCSI interface — no external EEPROM programmer or bench tooling required.
Ships with both a desktop GUI (usb2244-gui) and a command‑line tool
(usb2244). The configuration codec, image builder, and device transport are shared
between the two and covered by an automated test suite, including a golden vector
captured from a known‑good vendor write.
- Edit every configuration field — identity (serial, VID, PID, language ID, manufacturer, product), power (bus/self/wake, MaxPower in mA, per‑slot power bytes), attribute bit‑flags, device‑ID / SCSI‑inquiry strings, and the LUN map.
- Per‑field documentation — hover any field (or its label) and its address, default, and description appear in the Help pane.
- Changed‑value highlighting — any field whose value differs from the factory default is tinted light yellow, live as you type.
- Read / Program with verify — programming writes the 512‑byte image, waits out the board's USB re‑enumeration, reads the config back, and verifies it byte‑for‑byte.
- Settings files — save/load the configuration as human‑readable JSON; restore factory defaults at any time.
- Batch programming — optional auto‑increment of the serial number after each successful program.
- CLI for scripting and CI — build/inspect images offline and program boards from the command line.
- Windows (device access uses Windows
\\.\PhysicalDriveSCSI pass‑through). - Python 3.11+.
- Administrator privileges for any device operation (detecting, reading, or programming a board needs raw drive access). The editor, help, and JSON load/save work without elevation.
The configuration/help/JSON features are cross‑platform; only the device I/O is Windows‑ and Administrator‑specific.
python -m venv .venv
.venv\Scripts\activate
pip install -e .This installs two entry points:
usb2244-gui— the desktop GUIusb2244— the command‑line tool
You can also run the GUI without installing:
python -m usb2244.guiLaunch it from an Administrator terminal so it can see the board:
usb2244-guiLayout (see screenshot above):
- Toolbar / menus —
Load/Save(JSON settings),Defaults(restore factory values), and the device actionsReadandProgram. The same actions live under the File and Device menus. - Device selector — pick the target board;
Refreshrescans. If no board appears and you are not elevated, the status bar tells you device access requires Administrator. - Settings form — every field, grouped into Identity / Power / Attributes / Device IDs · Inquiry / LUNs. Fields that differ from the factory default are highlighted light yellow.
- Help pane — shows the focused/hovered field's hex address, default value, and description.
- Status bar — operation results (e.g. signature validity,
VERIFIED, errors).
Typical workflow
- Click Read to load the attached board's current configuration.
- Edit fields as needed (validation runs inline; invalid values block programming).
- Click Program, confirm the (irreversible) write, and the tool writes,
re‑enumerates, reads back, and reports
VERIFIEDor a byte‑level mismatch. - Optionally tick Auto‑increment serial after each Program for batch runs.
⚠️ Programming is irreversible. AlwaysRead/back up a board before writing if you may need to restore it.
usb2244 <command> [options]
Device commands (need Administrator):
| Command | Description |
|---|---|
list |
List USB2244 boards and their PhysicalDrive index |
read |
Read & decode the board's config (-o saves the raw 256‑byte image) |
backup |
Save the board's full 512‑byte EEPROM image (-o required) |
write |
Program the board — --from-image or field flags; add --yes to actually write |
set |
Read‑modify‑write specific fields on the board |
File commands (offline, no hardware):
| Command | Description |
|---|---|
build |
Build a 256‑byte .dat config image (--from a JSON file and/or field flags) |
dump |
Decode and print a .dat config image |
verify |
Check a .dat image for the required ata2 signature |
Field flags (shared by build / write / set): --serial-number,
--manufacturer, --product, --inquiry-vendor, --inquiry-product, --vid,
--pid, --lang-id, --max-power, --bm-attributes, plus --increment-serial.
Examples:
# Inspect an attached board
usb2244 read
# Program a new product string + serial, with read-back verify
usb2244 set --product "Free Wili 4 Reader" --serial-number 000000225042 --yes
# Build an image offline and check it
usb2244 build -o myconfig.dat --vid 0x093C --product "Free Wili 4 Reader"
usb2244 dump myconfig.datThe USB2244 stores its configuration in the first 256 bytes of an external 2‑wire
EEPROM, validated by an ata2 signature. Rather than wiring up an EEPROM programmer,
this tool updates it in system over USB using the controller's vendor SCSI
commands (CF 54 03 to read pages, CF 54 04 to write the 512‑byte image), exactly
as the vendor utility does — verified against a live golden capture.
The protocol and byte map were reverse‑engineered and documented here:
- USB‑level programming protocol — the read/write commands, framing, and timing.
- Protocol notes & reverse‑engineering log — how the commands were discovered and resolved (incl. the DFU vs. SCSI‑write findings).
- Configuration EEPROM map — the authoritative 256‑byte field layout, defaults, and codec rules (from datasheet DS00001979A §7.2).
The Microchip USB2244 datasheet (DS00001979A) is not redistributed in this repository. Download it from the Microchip USB2244 product page.
Design and implementation records:
- GUI design spec · GUI implementation plan
- Programmer design spec and earlier plans
src/usb2244/
config.py # configuration codec (encode/decode the 256-byte image)
fields.py # declarative registry of editable fields (drives the GUI + help)
formmodel.py # Tk-free conversion/validation between Config and form values
programmer.py # shared write -> re-enumerate -> read-back -> verify logic
scsi.py # Windows SCSI pass-through transport + device discovery
imagefile.py # 256-byte config <-> 512-byte EEPROM image
cli.py # command-line interface
gui.py # Tkinter desktop GUI
protocol/ # reverse-engineered protocol & EEPROM map docs
docs/ # design specs, implementation plans, screenshot
tests/ # pytest suite (incl. golden vendor-capture vector)
pip install -e ".[dev]"
python -m pytestThe device transport is injectable, so the codec, form model, programmer, and CLI are tested without hardware; the GUI has a construction/behavior smoke test, and a golden 512‑byte vendor capture pins the encoder byte‑for‑byte.
Released under the MIT License.
The Microchip USB2244 datasheet is © Microchip Technology Inc. and is not included in this repository; obtain it from Microchip.
