Keyboard shortcuts

Press ← or β†’ to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

πŸ“˜ Introduction to Comchan

Comchan (short for "Communication Channel") is a blazingly fast, minimal, and beginner-friendly serial monitor made with πŸ’– in Rust.

It’s built for makers, tinkerers, students, embedded developers β€” anyone who works with serial-connected devices like Arduino, ESP32, Teensy, or Raspberry Pi, and wants a clean, modern, and reliable way to talk to them from the terminal.

πŸš€ Whether you're debugging a sensor or sending messages to a microcontroller β€” Comchan is your calm, capable companion.


✨ Why Comchan?

Most serial tools out there are either:

  • ❌ Too basic (like screen, which doesn’t handle inputs well)
  • ❌ Too bloated (like GUIs you don’t need)
  • ❌ Confusing for newcomers

Comchan is:

  • 🧼 Minimal – Does one thing and does it well
  • ⚑ Fast – Built in Rust with snappy performance
  • 🎨 Pretty – Uses emoji + colored output for clarity
  • 🧠 Smart – Handles line buffering, timeouts, and clean exits
  • ✍️ Simple to Use – Just tell it your port and baud rate and you’re set!

πŸ”§ What Can It Do?

  • πŸ“₯ Read data from your Arduino or ESP32 or any microcontroller for that matter
  • πŸ“€ Send messages directly to your device
  • πŸ§ƒ See real-time communication as it happens
  • 🎨 Colorful logs that are clean and easy to follow
  • πŸ™‹β€β™‚οΈ Beginner-safe – Doesn’t crash on common mistakes
  • πŸ“Š Real-time data visualization from your microcontroller

πŸ›  Sample Use

# For Linux Users 
comchan -p /dev/ttyUSB0 -r 9600

# OR 

comchan --port /dev/ttyUSB0 --baud 9600

# For Windows Users 
comchan -p COM3 -r 9600

# OR 

comchan --port COM3 --baud 9600

πŸ’‘ The Goal

Comchan was built to make embedded development more joyful, less frustrating, and a little bit cute 🐣. Whether you're writing your first Serial.println("Hello"), or debugging complex protocols, Comchan will stay out of your way and do exactly what you ask.

✨ Made with Rust and a little anime soul.

How to Install ComChan

There are multiple ways to install ComChan.

Install using cargo install

The easiest way is via cargo

# cargo install
cargo install comchan

#cargo binstall
cargo binstall comchan

Or you can download the binary from the latest release To verify that comchan has been installed type the below command :

comchan --version

# OR

comchan --help

Install from the AUR

Thanks to Orhun, ComChan now has an Arch package. You can install it using any package manager for arch like yay or paru

#Using yay 

yay -S comchan 

# Using paru

paru -S comchan

Install from source

Clone the repository and cd in ComChan

cargo build --release
cargo run

How to use ComChan

Currently in the latest version, ComChan has the following features

  1. Basic Serial Monitor
  2. Verbose Mode of Basic Serial Monitor
  3. Logging data into a file
  4. Serial Plotter

Basic Serial Monitor

ComChan can be used as a basic serial monitor for EMbedded Applications.

In the Basic Serial Monitor mode, it has Read/Write capabilities.

Here is a GIF showing how it works in basic mode :

Video 1 (Hello World printing)

We will run a basic Arduino application that continuously prints Hello World

Apparatus Used:

  1. Arduino Uno
  2. ComChan

Configuration

  1. Port: /dev/ttyACM0 (for Linux) OR COM3 (for windows) (can be any number)
  2. Baud Rate: 9600

Command Used :

comchan -p <port> -r <baud_rate>

Basic mode Hello World


Video 2 (User Input)

We will now run another Arduino Application that takes User Input (1 or 0) to turn on and off the LED.

Working:

When the user types on or ON, the LED on the Arduino Turn ON and when the user types off or OFF, the LED turn OFF.

Here are the GIF's :



Verbose Mode

Command Used :

comchan -p <port> -r <baud_rate> -v 

# OR 

comchan --port <port> --baud <baud_rate> --verbose

ComChan also has a verbose mode where the timestamps are available.

The time stamps the time in milliseconds since January 1 1970 (Unix Epoch).

Here is the GIF


Logging

Command Used :

comchan -p <port> -r <baud_rate> -l <file_name>.log

# OR 

comchan --port <port> --baud <baud_rate> --log <file_name>.log

Log Files can be used to access the Serial Monitor data on a later date to debug Embedded Applications.

Here is the GIF of a Normal Serial Monitor

Here is the GIF of a log file

You can access the sample log file here.

Other Features of ComChan

  1. Serial Plotter
  2. Automatic Port Detection

The Serial Plotter

A Serial Plotter is a powerful visualization tool that transforms numerical data received through serial communication into real-time graphical representations. Originally introduced in Arduino IDE version 1.6.6, this tool has become an essential component for developers, engineers, and makers working with microcontrollers and embedded systems.

How to use the Serial Plotter in ComChan

To use the terminal based Serial Plotter in ComChan, you just have to add a --plot flag with the other flags as shown below:

comchan --port /dev/ttyUSB0 --baud 9600 --plot

# OR 

comchan -p /dev/ttyUSB0 -r 9600 --plot

Once you do that, you will get this as your output:

Serial Plotter output


Features of ComChan Serial Plotter

  • Real-time plotting: Instantly visualize incoming data from your microcontroller.
  • Single stream support: Currently supports plotting one stream of numerical data at a time.
  • Color-coded lines: The data stream is rendered with a distinct color.
  • Terminal-friendly: No GUI required. Works completely inside the terminal.

Formatting Data for Plotting

To make your data compatible with the plotter, ensure that your microcontroller prints a single numerical value per line using Serial.println() like this:

Serial.println(sensor_value);

Currently, only one stream is plotted. If multiple values are sent, only the first one will be considered.


Use Cases

  • Sensor Monitoring: Plot values from temperature, humidity, or light sensors.
  • PID Tuning: Visualize control loop behavior in real time.
  • Data Debugging: Spot anomalies in system behavior quickly.

Auto Port Detection

You can run ComChan with the --auto flag like so:

comchan --auto

This automatically detects and connects to the appropriate serial port, so you don’t have to manually specify it using a --port flag.

This is especially useful if:

  • You’re not sure which port your board is connected to.
  • You’re frequently connecting/disconnecting devices.
  • You want a faster, zero-config setup.

Under the hood, ComChan scans all available serial ports and identifies the most likely candidate based on device names and connection responses.

Note: If needed, you can still specify the port manually like so:

comchan --port /dev/ttyUSB0

Demo

Here’s a quick demonstration:

Auto

As shown above, ComChan detects the port, connects, and begins serial communication β€” all without any extra configuration.

This feature aims to offer both convenience and control for developers and embedded enthusiasts alike.

Coming Soon

  • Multi-series plotting support
  • Zoom & pan capabilities
  • Export plots as image files
  • Custom axis labeling
  • Interactive TUI integration

πŸ”§ Using a Configuration File

Starting from ComChan v0.1.9, you can use a configuration file to streamline your workflow by saving frequently used options. This avoids the need to repeatedly pass flags through the command line every time you run comchan.

πŸ“ Generate the Default Config File

You can generate a default configuration file by running:

comchan --generate-config

This will create a file at:

~/.config/comchan/comchan.toml

πŸ“ Example comchan.toml

# ComChan Configuration File
#
# This file contains default settings for ComChan serial monitor.
# Command-line arguments will override these settings.
#
# To use auto-detection, set port = "auto"
# Available parity options: "none", "odd", "even"
# Available flow control options: "none", "software", "hardware"

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

βš™οΈ Configuration Fields Explained

KeyTypeDescription
portstringThe serial port to connect to. Set to "auto" to let ComChan pick the first available serial port automatically. You can also manually specify a port like "/dev/ttyUSB0" or "COM3" depending on your OS.
baudintegerThe baud rate used for communication. Common values include 9600, 115200, etc. Default is 9600.
data_bitsintegerNumber of data bits per frame. Valid values are usually 5, 6, 7, or 8. Default is 8.
stop_bitsintegerNumber of stop bits. Set to 1 or 2. Default is 1.
paritystringParity checking mode. Options are "none", "odd", or "even". Default is "none".
flow_controlstringFlow control method. Valid options: "none", "software" (XON/XOFF), or "hardware" (RTS/CTS). Default is "none".
timeout_msintegerTimeout in milliseconds for reading from the serial port. Prevents indefinite blocking. Default is 500.
reset_delay_msintegerOptional delay (in ms) after opening the port. Useful for microcontrollers that reset on port open (e.g., Arduino). Default is 1000.
verbosebooleanEnables detailed logging if set to true. Helpful for debugging configuration or runtime behavior. Default is false.
plotbooleanEnables the real-time serial plotter if set to true. Default is false.
plot_pointsintegerMaximum number of data points shown on the plot at once. Only applicable if plot = true. Default is 100.

NOTE

The default baud rate is 9600, but you can customize it in the config file as needed

All values in the config file can still be overridden at runtime via command-line arguments like --port, --baud, --plot, etc.

Outputs

Serial monitor (plot = false)

plotfalse

Serial Plotter (plot = true)

plottrue

Feedback

Thank you for using ComChan, I really appreciate you giving your time to read the full documentation.

Please give me your feedback on what you think of ComChan.

I have created a form using bashform for everyone to give feedback via the terminal itself (For those who do not want to use it, they can contact me through all the social media links given in my profile)

Feedback form

Open your terminal and paste the below command

ssh -t bashform.me f comchan