Skip to content

usb-restart also covers WCH CH343 USB-serial bridges - #125

Merged
bdbarnett merged 1 commit into
mainfrom
usb-restart-ch343
Oct 21, 2026
Merged

bdbarnett merged 1 commit into
mainfrom
usb-restart-ch343

Conversation

@bdbarnett

@bdbarnett bdbarnett commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

mpftp usb-restart now restarts a CH343 USB-serial bridge (USB\VID_1A86&PID_<pid>\<serial>) as well as an Espressif board, so a COM port that answers "Incorrect function" on open can be recovered without a UAC prompt.

  • The allow rule gains one alternative, VID_(303A|1A86). Everything else is unchanged: one device per run, by explicit instance id, parent node only (no &MI_ children), no wildcards.
  • A CH343 comes back under the same id, so unlike an Espressif board a node that is gone after the restart exits 6 instead of 0. The Espressif behaviour is untouched.
  • --list, the --instance help, the agent guide and the installer's closing hints mention CH343. The installer's self-check now also proves the installed script accepts a CH343 id.
  • Tests cover the Python rule and the PowerShell script (dry run and the pretend-hardware scenarios). The new ones fail against the previous script.

The scheduled task runs the copy in Program Files, so it picks this up only after an administrator runs install-restart-esp-usb-task.ps1 again.

The no-UAC task now accepts the parent node of a CH343 as well as an
Espressif board, still one device per run by explicit instance id. A CH343
that is gone after the restart is reported as a failure (exit 6), since it has
no download mode to re-enumerate into. The installer's self-check now proves
the installed script knows the CH343 rule.
@bdbarnett
bdbarnett merged commit fba47f8 into main Oct 21, 2026
4 checks passed
@bdbarnett
bdbarnett deleted the usb-restart-ch343 branch October 21, 2026 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant