Hermetic Modular

06/HostLink

Your Module in the Browser

HostLink exposes a firmware's preset slots, settings, live state, and SD card to a host over the front-panel USB, while the module runs normally. You can use the Hermetic Modular web programmer to manage the state of the module, or write your own host parser.

HostLink: editing a running module from the browser

One declaration

The high-level integration is hostlink::Host. Construct it with your Presets and identity, attach it to the loop. Transport, buffers, the MCU unique id, and reboot handling are SDK defaults with fluent overrides.

the whole integration
static hostlink::Host host(presets, "my_module", "My Module",
                           "1.0.0", GIT_HASH);

/* in main(): */
loop.Use(host);

Commands execute inside the loop's 1 ms poll, on the same thread as panel gestures, never in the audio interrupt. A save from the browser and a save gesture on the panel serialize naturally; audio will not be impacted.

Self-deriving

The web editor's layout comes from the same objects your firmware already declared. Knob names, transforms, pages, settings controls: the descriptor is derived, so the editor cannot drift from the firmware. Optional metadata can clarify and change web behavior.

DeclarationWhat the editor shows
.Ident("flt.cutoff")a stable field id, so saved host presets survive pot reshuffles
.Unit("Hz")the unit next to the value
.Labels(names, n)zone names on a selector instead of numbers
VirtualButton + ButtonBankbutton chips with gesture hints, plus an editable field per stateful button
.Anchor("flt.cutoff")the button renders attached to that field, wherever the field appears
Settings + UsePresetsthe preset save/load pots appear on the settings mirror, labeled, instead of as unexplained gaps

When you outgrow derivation, OnDescribe() / Descriptor() hand you full control of the descriptor JSON.

What's transmitted

CapabilityIn practice
Preset slotslist, read, write, erase; save and load the live state to any slot
Live statewatch values move while hands are on the hardware
SD filesystembrowse, download, upload with crash-safe commits (via FsExtension)
Rebootincluding straight into the bootloader for a firmware update

Connect at the programmer with the front USB-C port. Any app that calls presets.Manage(...) gets backup and restore with zero extra work; the rest of the editor lights up as your declarations get richer. The same port also carries USB-MIDI, alongside the serial link.

Create your own host

The full spec, including the filesystem block and versioning rules, lives in hostlink-protocol.md. A bench CLI ships in tools/hostlink-cli for scripting against modules without a browser.