### Manage FPGA program library with vmancer CLI Source: https://github.com/anarkiwi/pyvmancer/blob/main/README.md Commands to list, check, download, and install FPGA program library releases. The install commands default to a dry run; use --yes to actually install and --force to re-upload files already present. Downloads verify the archive against checksums.sha256. ```sh vmancer library list # published library releases vmancer library status # newest release vs what is on the card vmancer library download 1.0.3 # fetch and verify an archive, no install vmancer library install # dry run: shows what would be installed vmancer library install --yes # install the latest release vmancer library install --yes --force # re-upload files already present ``` -------------------------------- ### settings get Source: https://github.com/anarkiwi/pyvmancer/blob/main/docs/protocol.md Retrieves a setting value by its key ID. ```APIDOC ## settings get ### Description Retrieves a setting value by its key ID. ### Method N/A (Serial command) ### Endpoint `settings get ` ### Parameters #### Path Parameters - **key_id** (string) - Required - The setting key identifier. ### Request Example ``` @settings get 123 ``` ### Response #### Success Response - **@settings get ...** - Command executed successfully. #### Error Response - **!:** - Command failed. ``` -------------------------------- ### Python API for firmware upgrade Source: https://github.com/anarkiwi/pyvmancer/blob/main/README.md Python example using pyvmancer to resolve the latest release, inspect a UF2 file, and perform an upgrade with a shell. `latest` includes prereleases; pass `stable_only=True` to refuse them. Set `GITHUB_TOKEN` if hitting rate limits. ```python import pyvmancer as vm vm.resolve_release("latest").version # newest published version image = vm.inspect_uf2("videomancer-1.0.0-rc.46.uf2") image.blocks, image.families # validated before anything is written with vm.open_shell() as shell: vm.upgrade("latest", shell=shell, report=print) ``` -------------------------------- ### Install library from Python with pyvmancer Source: https://github.com/anarkiwi/pyvmancer/blob/main/README.md Installs the latest library release using the pyvmancer Python API. Requires an open shell connection; the report callback receives progress output. Files already on the card at the archive's size are skipped, so re-running resumes an interrupted install. ```python import pyvmancer as vm with vm.open_shell() as shell: vm.install("latest", shell=shell, report=print) ``` -------------------------------- ### Install pyvmancer with pip (MIDI only or all transports) Source: https://github.com/anarkiwi/pyvmancer/blob/main/README.md Install the library. The base package covers USB MIDI only; the `[all]` extra adds serial and libusb transports. On Linux, the `python-rtmidi` dependency links `libasound.so.2`, so install `libasound2t64` via apt. ```sh pip install pyvmancer # MIDI only pip install "pyvmancer[all]" # adds serial and libusb transports ``` -------------------------------- ### Install libasound2t64 on Linux for python-rtmidi Source: https://github.com/anarkiwi/pyvmancer/blob/main/README.md Required on Linux because the `python-rtmidi` dependency links `libasound.so.2`. ```sh sudo apt-get install libasound2t64 ``` -------------------------------- ### CLI commands for device management and program control Source: https://github.com/anarkiwi/pyvmancer/blob/main/README.md List of pyvmancer CLI commands for discovering devices, listing operators, setting parameters, recalling presets, managing programs, and running shell commands. Use these from a terminal after installing pyvmancer. ```sh vmancer devices # discover attached units and their device nodes vmancer operators # list the 25 modulation operators vmancer set 1=0.5 7=on # set parameters over MIDI vmancer preset 3 # recall a preset vmancer authors # list program authors vmancer programs # all programs; non-lzx names are author/Name vmancer programs --author lzx # one author's programs, plain names vmancer load Isotherm # load an lzx program vmancer load czartroniks/Teletext # load another author's program vmancer manifest # SD program library metadata vmancer hash sd:/programs/x.vmprog vmancer resync # recover an output that stopped passing frames vmancer shell modulation status # run any raw shell command ``` -------------------------------- ### Command Set Source: https://github.com/anarkiwi/pyvmancer/blob/main/docs/protocol.md The shell supports a set of commands grouped by category. The `help` command returns the authoritative list for the connected firmware. ```APIDOC ## Command Set ### Description The shell supports a set of commands grouped by category. The `help` command returns the authoritative list for the connected firmware. ### Commands | Group | Commands | | --- | --- | | general | `version`, `serial`, `status`, `help`, `language`, `reboot bootloader` | | programs | `programs list`, `programs authors`, `programs enumerate`, `program load`, `program info`, `program state`, `program stream` | | presets | `program presets list/get/apply/save/delete/rename` | | modulation | `modulation status/source/set/reset/cc-map/latch`, `modulation audio status` | | video | `video status`, `video input`, `video timing` | | transport | `transport status/bpm/play/stop` | | fpga | `fpga status`, `fpga register`, `fpga preferred-variant` | | remote | `remote enable/disable/status/write` | | settings | `settings export/import/get/set/reset` | | midi | `midi monitor on/off/verbose` | | storage | `msd enter/exit/status`, `fs info/caps/ls/stat/mkdir/rm/rename/read/write/put/hash` | | diagnostics | `cpu`, `ram`, `log level`, `screen navigate` | ### Notes - On firmware `1.0.0-rc.37`, there are 64 commands. - The `help` command returns the authoritative list for the connected firmware. ``` -------------------------------- ### Device knowledge: park, parameter, manifest, file hash, video state, resync Source: https://github.com/anarkiwi/pyvmancer/blob/main/README.md Library-encoded device knowledge: `park()` makes manual values a reference so a CC is absolute; `parameter()` returns an object with `role`, `steps`, and `sample_values()`; `program_manifest()` provides program metadata; `file_hash()` hashes a file on the device; `video_state().source_locked` reports per-input lock (not the genlock flag); `resync()` re-initializes the output raster. ```python d.park() # manual values to a reference, so a CC is absolute p = d.parameter("Posterize") # p.role, p.steps, p.sample_values() d.program_manifest().get("combing").description d.file_hash("sd:/programs/lzx/combing.vmprog") d.video_state().source_locked # per-input lock, not the genlock flag d.resync() # bounce the timing to re-init the output raster ``` -------------------------------- ### Open MIDI via rawmidi backend Source: https://github.com/anarkiwi/pyvmancer/blob/main/docs/permissions.md Opens MIDI using the pure-Python ALSA rawmidi backend, which works without ALSA userspace when `libasound.so.2` is absent. ```python midi = pyvmancer.open_midi(prefer="rawmidi") ``` -------------------------------- ### fs put Source: https://github.com/anarkiwi/pyvmancer/blob/main/docs/protocol.md Bulk upload to the SD filesystem with an 8 MiB cap. ```APIDOC ## fs put ### Description Bulk upload to the SD filesystem with an 8 MiB cap. ### Method N/A (Serial command) ### Endpoint `fs put ` ### Parameters #### Path Parameters - **path** (string) - Required - File path, must start with `sd:/` and may not contain `..`. - **data** (string) - Required - Data to upload, up to 8 MiB. ### Request Example ``` @fs put sd:/large.bin ``` ### Response #### Success Response - **@fs put ...** - Command executed successfully. #### Error Response - **!:** - Command failed. ``` -------------------------------- ### vmancer manifest Source: https://github.com/anarkiwi/pyvmancer/blob/main/README.md Shows SD program library metadata. ```APIDOC ## [CLI] vmancer manifest ### Description Shows SD program library metadata. ### Method CLI command ### Command `vmancer manifest` ### Parameters None ### Response SD program library metadata. ``` -------------------------------- ### vmancer set Source: https://github.com/anarkiwi/pyvmancer/blob/main/README.md Sets parameters over MIDI. ```APIDOC ## [CLI] vmancer set ### Description Sets parameters over MIDI. ### Method CLI command ### Command `vmancer set 1=0.5 7=on` ### Parameters #### Arguments - **parameter=value** (string) - Required - Parameter number and value to set, e.g., `1=0.5` or `7=on`. ### Response Confirmation of parameter set. ``` -------------------------------- ### vmancer firmware download Source: https://github.com/anarkiwi/pyvmancer/blob/main/README.md Fetches and validates a UF2, no flashing. ```APIDOC ## [CLI] vmancer firmware download ### Description Fetches and validates a UF2, no flashing. ### Method CLI command ### Command `vmancer firmware download 1.0.0-rc.46` ### Parameters #### Arguments - **version** (string) - Required - Version to download. ### Response Confirmation of download and validation. ``` -------------------------------- ### Basic usage: open device, load program, set parameters, play Source: https://github.com/anarkiwi/pyvmancer/blob/main/README.md Opens the Videomancer, loads a program, sets named parameters in native units, addresses slots directly, triggers a modulation operator, sets BPM, plays, and closes. `set_named` uses native units (e.g., Posterize 0..7, Mix 0..100); `set_param` uses 0.0..1.0 and accepts booleans for toggles. ```python import pyvmancer as vm d = vm.Videomancer.open() d.load_program("Isotherm") d.set_named("Posterize", 5) # native units: Posterize is 0..7 d.set_named("Mix", 80) # Mix is 0..100 d.set_source("Contrast", "free lfo") d.set_param(1, 0.75) # or address slots directly, 0.0..1.0 d.set_param(7, True) # toggles take bools d.trigger(4) # note-trigger a modulation operator d.set_bpm(128) d.play() d.close() ``` -------------------------------- ### vmancer firmware list Source: https://github.com/anarkiwi/pyvmancer/blob/main/README.md Lists published firmware releases, newest first. ```APIDOC ## [CLI] vmancer firmware list ### Description Lists published firmware releases, newest first. ### Method CLI command ### Command `vmancer firmware list` ### Parameters None ### Response List of published firmware releases. ``` -------------------------------- ### vmancer load Source: https://github.com/anarkiwi/pyvmancer/blob/main/README.md Loads a program. ```APIDOC ## [CLI] vmancer load ### Description Loads a program. ### Method CLI command ### Command `vmancer load Isotherm` or `vmancer load czartroniks/Teletext` ### Parameters #### Arguments - **program** (string) - Required - Program name, optionally prefixed with author/. ### Response Confirmation of program load. ``` -------------------------------- ### Firmware upgrade CLI commands Source: https://github.com/anarkiwi/pyvmancer/blob/main/README.md Commands to list, check, download, and upgrade firmware. `upgrade` is a dry run unless `--yes` is given; use `--manual` for recovery when serial is unusable and `--volume` when bootloader is already mounted. ```sh vmancer firmware list # published releases, newest first vmancer firmware status # running version vs the newest release vmancer firmware download 1.0.0-rc.46 # fetch and validate a UF2, no flashing vmancer firmware upgrade # dry run: shows what would be flashed vmancer firmware upgrade --yes # flash the latest release vmancer firmware upgrade 1.0.0-rc.40 --yes --force # pin a version, or downgrade ``` -------------------------------- ### vmancer firmware upgrade Source: https://github.com/anarkiwi/pyvmancer/blob/main/README.md Upgrades firmware. Dry run unless --yes is given. ```APIDOC ## [CLI] vmancer firmware upgrade ### Description Upgrades firmware. Dry run unless --yes is given. ### Method CLI command ### Command `vmancer firmware upgrade` or `vmancer firmware upgrade --yes` or `vmancer firmware upgrade 1.0.0-rc.40 --yes --force` ### Parameters #### Options - **--yes** (flag) - Optional - Actually flash the latest release. - **--force** (flag) - Optional - Force upgrade even if downgrade. - **--manual** (flag) - Optional - Use when unit was put into bootloader mode by hand. - **--volume** (string) - Optional - Specify bootloader volume if already mounted. - **--stable** (flag) - Optional - Refuse prereleases. #### Arguments - **version** (string) - Optional - Version to upgrade to; defaults to latest. ### Response Confirmation of upgrade or dry run output. ``` -------------------------------- ### vmancer programs Source: https://github.com/anarkiwi/pyvmancer/blob/main/README.md Lists all programs; non-lzx names are author/Name. Can filter by author. ```APIDOC ## [CLI] vmancer programs ### Description Lists all programs; non-lzx names are author/Name. Can filter by author. ### Method CLI command ### Command `vmancer programs` or `vmancer programs --author lzx` ### Parameters #### Options - **--author** (string) - Optional - Filter programs by author. ### Response List of programs. ``` -------------------------------- ### vmancer devices Source: https://github.com/anarkiwi/pyvmancer/blob/main/README.md Discovers attached units and their device nodes. ```APIDOC ## [CLI] vmancer devices ### Description Discovers attached units and their device nodes. ### Method CLI command ### Command `vmancer devices` ### Parameters None ### Response List of attached units and their device nodes. ``` -------------------------------- ### vmancer preset Source: https://github.com/anarkiwi/pyvmancer/blob/main/README.md Recalls a preset. ```APIDOC ## [CLI] vmancer preset ### Description Recalls a preset. ### Method CLI command ### Command `vmancer preset 3` ### Parameters #### Arguments - **preset_number** (integer) - Required - The preset number to recall. ### Response Confirmation of preset recall. ``` -------------------------------- ### pyvmancer Python API Source: https://github.com/anarkiwi/pyvmancer/blob/main/README.md Python functions for resolving releases, inspecting UF2 images, and upgrading firmware. ```APIDOC ## [Python] pyvmancer API ### Description Python functions for resolving releases, inspecting UF2 images, and upgrading firmware. ### Functions #### resolve_release(version) - **version** (string) - Required - Version to resolve, e.g., 'latest'. - **Returns**: Release object with `.version` attribute. #### inspect_uf2(path) - **path** (string) - Required - Path to UF2 file. - **Returns**: Image object with `.blocks` and `.families` attributes. #### upgrade(version, shell, report) - **version** (string) - Required - Version to upgrade to. - **shell** (object) - Required - Shell object from `open_shell()`. - **report** (callable) - Required - Callback for progress reporting. #### open_shell() - **Returns**: Shell context manager for use with `with` statement. ### Example ```python import pyvmancer as vm vm.resolve_release("latest").version image = vm.inspect_uf2("videomancer-1.0.0-rc.46.uf2") image.blocks, image.families with vm.open_shell() as shell: vm.upgrade("latest", shell=shell, report=print) ``` ``` -------------------------------- ### vmancer firmware status Source: https://github.com/anarkiwi/pyvmancer/blob/main/README.md Shows running version vs the newest release. ```APIDOC ## [CLI] vmancer firmware status ### Description Shows running version vs the newest release. ### Method CLI command ### Command `vmancer firmware status` ### Parameters None ### Response Running version and newest release. ``` -------------------------------- ### vmancer authors Source: https://github.com/anarkiwi/pyvmancer/blob/main/README.md Lists program authors. ```APIDOC ## [CLI] vmancer authors ### Description Lists program authors. ### Method CLI command ### Command `vmancer authors` ### Parameters None ### Response List of program authors. ``` -------------------------------- ### Run container with device nodes Source: https://github.com/anarkiwi/pyvmancer/blob/main/docs/permissions.md Maps `/dev/snd` and `/dev/ttyACM0` into a Docker container. Mapping `/dev/snd` alone gives MIDI but not the serial shell. ```sh docker run --device /dev/snd --device /dev/ttyACM0 ... ``` -------------------------------- ### fs write Source: https://github.com/anarkiwi/pyvmancer/blob/main/docs/protocol.md Writes data to a file on the SD filesystem. Payload is base64-encoded. ```APIDOC ## fs write ### Description Writes data to a file on the SD filesystem. Payload is base64-encoded. ### Method N/A (Serial command) ### Endpoint `fs write ` ### Parameters #### Path Parameters - **path** (string) - Required - File path, must start with `sd:/` and may not contain `..`. - **offset** (integer) - Required - Byte offset to start writing at. - **base64_data** (string) - Required - Base64-encoded data to write. Must fit within the 511-byte command line limit. ### Request Example ``` @fs write sd:/test.txt 0 SGVsbG8= ``` ### Response #### Success Response - **@fs write ...** - Command executed successfully. #### Error Response - **!:** - Command failed. ``` -------------------------------- ### vmancer shell Source: https://github.com/anarkiwi/pyvmancer/blob/main/README.md Runs any raw shell command. ```APIDOC ## [CLI] vmancer shell ### Description Runs any raw shell command. ### Method CLI command ### Command `vmancer shell modulation status` ### Parameters #### Arguments - **command** (string) - Required - The raw shell command to run. ### Response Output of the shell command. ``` -------------------------------- ### video timing Source: https://github.com/anarkiwi/pyvmancer/blob/main/docs/protocol.md Forces an output standard. The usage string enumerates what the firmware accepts. ```APIDOC ## video timing ### Description Forces an output standard. The usage string enumerates what the firmware accepts. ### Method N/A (Serial command) ### Endpoint `video timing ` ### Parameters #### Path Parameters - **standard** (string) - Required - Output standard, e.g., `NTSC`, `PAL`, `480p`, `576p`, `720p60`, `720p50`, `1080i60`, `1080p30`, etc. ### Request Example ``` @video timing 720p60 ``` ### Response #### Success Response - **@video timing ...** - Command executed successfully. #### Error Response - **!:** - Command failed. ### Notes - Bouncing the timing away and back is the strongest output reset the shell offers (`ShellClient.resync`); it drops the input selection and leaves `overridden: true`. ``` -------------------------------- ### vmancer hash Source: https://github.com/anarkiwi/pyvmancer/blob/main/README.md Computes hash of a program file. ```APIDOC ## [CLI] vmancer hash ### Description Computes hash of a program file. ### Method CLI command ### Command `vmancer hash sd:/programs/x.vmprog` ### Parameters #### Arguments - **path** (string) - Required - Path to the program file. ### Response Hash of the file. ``` -------------------------------- ### MIDI-only usage: open_midi, set_param, select_preset, run_clock Source: https://github.com/anarkiwi/pyvmancer/blob/main/README.md Use when no serial link is needed. Opens a MIDI connection on channel 1, sets a parameter, selects a preset, and runs the clock for 8 beats at 120 BPM. ```python with vm.open_midi(channel=1) as m: m.set_param(1, 0.5) m.select_preset(3) m.run_clock(120, beats=8) ``` -------------------------------- ### fs read Source: https://github.com/anarkiwi/pyvmancer/blob/main/docs/protocol.md Reads a file from the SD filesystem. Returns a JSON envelope with base64-encoded data. ```APIDOC ## fs read ### Description Reads a file from the SD filesystem. Returns a JSON envelope with base64-encoded data. ### Method N/A (Serial command) ### Endpoint `fs read ` ### Parameters #### Path Parameters - **path** (string) - Required - File path, must start with `sd:/` and may not contain `..`. - **offset** (integer) - Required - Byte offset to start reading from. - **count** (integer) - Required - Number of bytes to read. Must be at most `read_max_bytes // 4 * 3` (see `fs caps`). ### Request Example ``` @fs read sd:/programs/manifest.json 0 96 ``` ### Response #### Success Response - **data** (string) - Base64-encoded file content. - **read** (integer) - Number of bytes read. #### Response Example ```json {"data":"ewogICJmb3JtYXRfdmVyc2lvbiI6ICIxLjAiLAog...","read":96} ``` #### Error Response - **!:** - Command failed. ``` -------------------------------- ### vmancer operators Source: https://github.com/anarkiwi/pyvmancer/blob/main/README.md Lists the 25 modulation operators. ```APIDOC ## [CLI] vmancer operators ### Description Lists the 25 modulation operators. ### Method CLI command ### Command `vmancer operators` ### Parameters None ### Response List of modulation operators. ``` -------------------------------- ### fs caps Source: https://github.com/anarkiwi/pyvmancer/blob/main/docs/protocol.md Reports transfer limits for the filesystem. ```APIDOC ## fs caps ### Description Reports transfer limits for the filesystem. ### Method N/A (Serial command) ### Endpoint `fs caps` ### Parameters None ### Request Example ``` @fs caps ``` ### Response #### Success Response - **read_max_bytes** (integer) - Maximum base64 payload size for `fs read` (256 on `1.0.0-rc.37`/`rc.40`). - **fs_hash** (integer) - Indicates support for `fs hash` (1 if supported). #### Response Example ```json {"read_max_bytes":256,"fs_hash":1} ``` #### Error Response - **!:** - Command failed. ``` -------------------------------- ### List device nodes with vmancer devices Source: https://github.com/anarkiwi/pyvmancer/blob/main/docs/permissions.md Output of `vmancer devices` showing all four device nodes: serial, rawmidi, tty, block, and usbfs. ```json { "serial": "E464B0605F113625", "rawmidi": "/dev/snd/midiC6D0", "tty": "/dev/ttyACM0", "block": "/dev/sdc", "usbfs": "/dev/bus/usb/003/041" } ``` -------------------------------- ### program stream Source: https://github.com/anarkiwi/pyvmancer/blob/main/docs/protocol.md Streams a program with a specified size and optional name. ```APIDOC ## program stream ### Description Streams a program with a specified size and optional name. ### Method N/A (Serial command) ### Endpoint `program stream [name]` ### Parameters #### Path Parameters - **size** (integer) - Required - Size of the program data. - **name** (string) - Optional - Program name. ### Request Example ``` @program stream 1024 myprog ``` ### Response #### Success Response - **@program stream ...** - Command executed successfully. #### Error Response - **!:** - Command failed. ``` -------------------------------- ### vmancer resync Source: https://github.com/anarkiwi/pyvmancer/blob/main/README.md Recovers an output that stopped passing frames. ```APIDOC ## [CLI] vmancer resync ### Description Recovers an output that stopped passing frames. ### Method CLI command ### Command `vmancer resync` ### Parameters None ### Response Confirmation of resync. ``` -------------------------------- ### fs hash Source: https://github.com/anarkiwi/pyvmancer/blob/main/docs/protocol.md Computes a SHA-256 hash of a file on the device. ```APIDOC ## fs hash ### Description Computes a SHA-256 hash of a file on the device. ### Method N/A (Serial command) ### Endpoint `fs hash ` ### Parameters #### Path Parameters - **path** (string) - Required - File path, must start with `sd:/` and may not contain `..`. ### Request Example ``` @fs hash sd:/programs/combing.vmprog ``` ### Response #### Success Response - **hash** (string) - SHA-256 hex digest. - **size** (integer) - File size in bytes. #### Response Example ```json {"hash":"","size":12345} ``` #### Error Response - **!:** - Command failed. ### Notes - Hash computation is slow (~79 kB/s); use a size-derived timeout. ``` -------------------------------- ### Diagnose device access Source: https://github.com/anarkiwi/pyvmancer/blob/main/docs/permissions.md Commands to check what the library sees, ALSA's view of MIDI ports, and rawmidi byte counters. The Tx counter confirms bytes reached the device. ```sh vmancer devices # what the library can see amidi -l # ALSA's view of MIDI ports cat /proc/asound/card*/midi0 # rawmidi Tx/Rx byte counters ``` -------------------------------- ### video status Source: https://github.com/anarkiwi/pyvmancer/blob/main/docs/protocol.md Reports the output timing, selected input, and lock flags. ```APIDOC ## video status ### Description Reports the output timing, selected input, and lock flags. ### Method N/A (Serial command) ### Endpoint `video status` ### Parameters None ### Request Example ``` @video status ``` ### Response #### Success Response - **timing** (string) - Output timing standard. - **input** (string) - Selected input. - **locked** (boolean) - Genlock flag; false when timing is overridden. - **hdmi** (string) - HDMI sub-status. - **analog** (string) - Analog sub-status. #### Response Example ```json {"timing":"720p60","input":"hdmi","locked":true,"hdmi":"locked","analog":"unlocked"} ``` #### Error Response - **!:** - Command failed. ### Notes - The top-level `locked` flag tracks genlock, so it reads false whenever timing is overridden even though the input is fine. The selected input's own sub-status (`hdmi`/`analog`) is the authoritative field in both directions. ``` -------------------------------- ### Open serial shell via libusb Source: https://github.com/anarkiwi/pyvmancer/blob/main/docs/permissions.md Opens the serial shell using libusb when `/dev/tty*` cannot be mapped. Requires read-write access to the usbfs node; read-only is insufficient. ```python shell = pyvmancer.open_shell(prefer="usb") ``` -------------------------------- ### language Source: https://github.com/anarkiwi/pyvmancer/blob/main/docs/protocol.md Sets or queries the language. ```APIDOC ## language ### Description Sets or queries the language. ### Method N/A (Serial command) ### Endpoint `language [en_US|de_DE|fr_FR|es_ES|...]` ### Parameters #### Query Parameters - **locale** (string) - Optional - Locale code, e.g., `en_US`, `de_DE`, `fr_FR`, `es_ES`, etc. ### Request Example ``` @language en_US ``` ### Response #### Success Response - **@language ...** - Command executed successfully. #### Error Response - **!:** - Command failed. ``` -------------------------------- ### Serial Shell Command Format Source: https://github.com/anarkiwi/pyvmancer/blob/main/docs/protocol.md The serial shell uses newline-terminated ASCII over USB CDC. Commands are sent as `@:` and responses are either `@:` on success or `!:` on failure. ```APIDOC ## Serial Shell Command Format ### Description Newline-terminated ASCII over USB CDC; the baud rate is ignored. Maximum 511 bytes per command line. ### Method N/A (Serial protocol) ### Endpoint N/A (Serial protocol) ### Parameters #### Command Line - **command** (string) - Required - The command name and arguments, e.g., `version`, `programs list`. - **payload** (string) - Optional - Additional data for the command, separated by a colon. ### Request Example ``` @version: ``` ### Response #### Success Response - **@:** - The command executed successfully. #### Error Response - **!:** - The command failed. Error codes are tagged as `0x58000000 | n` on firmware `1.0.0-rc.37`; `pyvmancer.shell.decode_error_code` strips the tag. #### Response Example ``` @version:1.0.0-rc.37 ``` ### Notes - Unprefixed lines are log output. - The shell is single-threaded and expects one connected terminal at a time. ``` -------------------------------- ### Reload udev rules Source: https://github.com/anarkiwi/pyvmancer/blob/main/docs/permissions.md Reloads udev rules and triggers device events to apply the new rule. ```sh sudo udevadm control --reload-rules && sudo udevadm trigger ``` -------------------------------- ### fpga register Source: https://github.com/anarkiwi/pyvmancer/blob/main/docs/protocol.md Writes a value to an FPGA register. ```APIDOC ## fpga register ### Description Writes a value to an FPGA register. ### Method N/A (Serial command) ### Endpoint `fpga register ` ### Parameters #### Path Parameters - **addr** (string) - Required - Register address. - **value** (string) - Required - Value to write. ### Request Example ``` @fpga register 0x00 0x01 ``` ### Response #### Success Response - **@fpga register ...** - Command executed successfully. #### Error Response - **!:** - Command failed. ``` -------------------------------- ### Add user to dialout group Source: https://github.com/anarkiwi/pyvmancer/blob/main/docs/permissions.md Adds the current user to the `dialout` group for serial device access. Takes effect on next login. ```sh sudo usermod -aG dialout "$USER" ``` -------------------------------- ### modulation source Source: https://github.com/anarkiwi/pyvmancer/blob/main/docs/protocol.md Sets the modulation source for a given index. ```APIDOC ## modulation source ### Description Sets the modulation source for a given index. ### Method N/A (Serial command) ### Endpoint `modulation source ` ### Parameters #### Path Parameters - **index** (integer) - Required - Modulation index, range 0-11. - **source** (string) - Required - Source identifier. ### Request Example ``` @modulation source 0 LFO ``` ### Response #### Success Response - **@modulation source ...** - Command executed successfully. #### Error Response - **!:** - Command failed. ``` -------------------------------- ### remote Source: https://github.com/anarkiwi/pyvmancer/blob/main/docs/protocol.md Controls remote functionality: enable, disable, status, or write. ```APIDOC ## remote ### Description Controls remote functionality: enable, disable, status, or write. ### Method N/A (Serial command) ### Endpoint `remote ` ### Parameters #### Path Parameters - **action** (string) - Required - One of `enable`, `disable`, `status`, or `write`. ### Request Example ``` @remote status ``` ### Response #### Success Response - **@remote ...** - Command executed successfully. #### Error Response - **!:** - Command failed. ``` -------------------------------- ### TransportError on settings export Source: https://github.com/anarkiwi/pyvmancer/blob/main/docs/firmware-notes.md Running `settings export` on firmware 1.0.0-rc.37/rc.40 drops the CDC connection mid-reply, raising a TransportError. The device re-enumerates with a new USB address, so open handles must be reopened and any /dev/bus/usb ACL granted to the old address is lost. The unit recovers on its own and no state is lost. ```text TransportError: read from /dev/ttyACM0 failed: device reports readiness to read but returned no data ``` -------------------------------- ### udev rule for uaccess Source: https://github.com/anarkiwi/pyvmancer/blob/main/docs/permissions.md Persistent udev rule that grants ACL access to the device's USB and TTY interfaces for the active seat user. Place in `/etc/udev/rules.d/70-lzx-videomancer.rules`. ```udev # /etc/udev/rules.d/70-lzx-videomancer.rules SUBSYSTEM=="usb", ATTR{idVendor}=="16d0", ATTR{idProduct}=="14db", TAG+="uaccess" SUBSYSTEM=="tty", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="14db", TAG+="uaccess" ``` -------------------------------- ### modulation set Source: https://github.com/anarkiwi/pyvmancer/blob/main/docs/protocol.md Sets modulation parameters for a given index. ```APIDOC ## modulation set ### Description Sets modulation parameters for a given index. ### Method N/A (Serial command) ### Endpoint `modulation set [time] [space] [slope]` ### Parameters #### Path Parameters - **index** (integer) - Required - Modulation index, range 0-11. - **manual** (string) - Required - Manual value. - **time** (string) - Optional - Time parameter. - **space** (string) - Optional - Space parameter. - **slope** (string) - Optional - Slope parameter. ### Request Example ``` @modulation set 0 1 2 3 4 ``` ### Response #### Success Response - **@modulation set ...** - Command executed successfully. #### Error Response - **!:** - Command failed. ```