PI AI MIC factory alt0 rescue for Windows
=========================================

Use this only when the normal DFU upgrade rescue sees the board but fails with:

  Cannot set alternate interface: LIBUSB_ERROR_IO

Observed bad firmware:
- PID: 20B1:4FBA
- Product: PI AI MIC Assistant Shortcut
- DFU alt 1 is visible but cannot be selected.

This package writes a factory/QSPI image to XMOS DFU alt 0. It does not use the
public `*_dfu_upgrade.bin` image. The included factory image was generated from
the validated recovery `.xe` with `xflash --factory`.

Observed limit:
- On the first tested 4FBA board, alt 0 could be selected but DFU_GETSTATUS
  failed with LIBUSB_ERROR_PIPE. If that happens, USB recovery is not usable for
  this firmware. Use Raspberry Pi SPI boot recovery or XTAG.

Recovery target:
- USB 2ch 48 kHz Assistant Square
- Factory image SHA256:
  2E145C758AD1749BB8C1A281634D5E62B11FC3B86F0C6F8C56C21EA7F2E47A1D

Steps:
1. Close Chrome, Audacity, Teams, Zoom, Windows sound settings and any app that may use the PI AI MIC.
2. Unplug the PI AI MIC USB cable.
3. Replug the PI AI MIC USB cable.
4. Double-click rescue-4fba-factory-alt0.cmd.
5. Wait until dfu-util reports completion, then unplug/replug the board.

If this fails too, use Raspberry Pi SPI boot recovery or XTAG.

Included tool:
- dfu-util 0.11 Windows static binary
- dfu-util license files are included in this folder.

Maintainer rebuild:

  powershell -ExecutionPolicy Bypass -File tools\dfu_rescue_windows_factory_alt0\build_package.ps1

The generated ZIP is:

  dist\pi-ai-mic-dfu-rescue-4fba-factory-alt0-windows.zip
