-
Notifications
You must be signed in to change notification settings - Fork 13
Configuration
Typing out long strings of command-line flags every time you want to connect to a device can get tedious. To streamline your workflow, comchan supports a persistent configuration file.
When you launch comchan, it will automatically look for this file and apply your saved settings. Any command-line flags you pass during runtime will override the settings in this file.
You don't need to create this file manually. You can generate a default template by running:
comchan --generate-configWhere does it live?
-
Linux/macOS:
~/.config/comchan/comchan.toml -
Windows:
%APPDATA%\comchan\comchan.toml
Here is what the generated comchan.toml looks like:
# ComChan Configuration File
port = "auto"
baud = 9600
data_bits = 8
stop_bits = 1
parity = "none"
flow_control = "none"
timeout_ms = 500
reset_delay_ms = 1000
verbose = false
plot = false
plot_points = 100
zephyr = false
export_limit = 1000000
plot_title = "Sensor Data"
simulate = false
csv_file = "latest_run.csv"
replay_file = "test.log"
hex_mode = false
hex_pretty = false
obj_file = "custom_model.obj"
braille = "cube" # Can also be "tetrahedron", "octahedron", or "path/to/model.wrfm"
rtt = false
elf = ""
chip = ""Below is a breakdown of what each field in the configuration file controls. They directly map to the CLI flags.
The serial port to connect to. Set to "auto" to have comchan find the active USB device, or specify a direct path like "/dev/ttyUSB0" or "COM3".
The communication speed. Usually 9600 or 115200.
Number of data bits per frame. Typically 8.
Number of stop bits per frame. Typically 1 or 2.
Error-checking parity. Options: "none", "even", "odd".
Method of flow control. Options: "none", "software", "hardware".
How long to wait for incoming data before timing out, in milliseconds.
An artificial delay (in ms) applied during connection/reconnection to allow slow-booting hardware to initialize.
If true, comchan will automatically launch into the 2D Serial Plotter UI on startup.
The maximum number of historical data points rendered on the plotter's X-axis at one time.
The memory cap for data points kept for SVG exports, preventing RAM exhaustion during long sessions.
The default title stamped at the top of exported SVG plots.
Path to a custom .obj 3D model. Only applicable if running with GPU-accelerated Ratty features.
The 3D model used for CPU wireframe rendering. Can be a built-in shape ("cube", "tetrahedron", "octahedron") or a path to a custom .wrfm file.
If true, prints detailed connection logs and enables accurate local timestamps for incoming text.
If true, generates internal mock sensor data instead of looking for physical hardware. Great for testing layouts.
If true, enables formatting optimized for Zephyr RTOS interactive shells.
If true, starts the monitor in raw hex dump mode to analyze unformatted binary data.
If true, starts the monitor in the buffered, perfectly aligned 16-byte hex frame mode.
If populated (e.g., "data.csv"), comchan will automatically stream parsed numeric sensor data into this file on startup.
Path to a previously recorded .log or .csv file to play back natively.
If true, attempts to bypass standard UART and attach to the target via a debug probe (SWD) using probe-rs.
The path to the compiled .elf firmware file. Mandatory if rtt is true for decoding logs.
The specific microcontroller name (e.g., "nRF52840_xxAA"). Mandatory if rtt is true.