Repository navigation
feat(tools): add a command-line flasher sharing one protocol module with the web installer - #11
Merged
Conversation
…ash skill The flasher reuses docs/pxota.js and docs/pxpkg.js, the modules the installer page runs. It requires --confirm-flash for any write, supports --dry-run, checks the package against the manifest SHA-256, refuses the wrong model, verifies the version the pedal reports, and prints the SD-card recovery pointer on failure. Tested against the simulated pedal.
This was referenced Nov 6, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a command-line flasher,
node tools/op.mjs flash, so a built package can be installed on a connected pedal without a browser. It refuses to send any MIDI unless--confirm-flashis given, checks the package size, hash and model against the manifest first, and refuses when no pedal or more than one pedal is found. A failed update exits with an error and points to the SD-card recovery.The update protocol now lives in one shared module,
docs/pxpkg.js, that takes a small send and receive transport. The browser installer uses it with Web MIDI, and the command line uses it with a Node MIDI transport (tools/midi-node.mjs), so there is a single implementation. The installer's behaviour is unchanged and its existing tests pass unchanged. The newopenpocket-flashskill documents the safety rules.New host tests (
tests/test_flash.mjs, with a simulated pedal intests/simpedal.mjs) cover dry runs, a real update, and each refusal. The flasher was also proven on a real pedal.