Skip to content

xthanhn91/xSerial

Repository files navigation

xSerial

A modern, high-performance serial port monitor for developers and makers.

xSerial Screenshot

Overview

xSerial is a native serial port monitoring application built with Tauri 2 (Rust) and React 19 (TypeScript). It replaces outdated terminal emulators with an efficient solution optimized for embedded development workflows.

Status: Production Ready (v1.0) Bundle Size: 8-12 MB | Memory: 30-60 MB idle Platforms: macOS (Intel/ARM64), Windows (x64), Linux (x64)

Why xSerial?

  • Performance: Handle 2M baud without UI lag or data loss
  • Cross-Platform: Identical experience on macOS, Windows, Linux
  • Zero Friction: Common tasks accessible in 1-2 clicks
  • Professional: Auto-logging, export, firmware flashing built-in

Features

Serial Communication

  • Port Detection: Auto-scan USB CDC, FTDI, CH340, CP210x devices
  • Baud Rate: 300 - 2,000,000 bps with custom values
  • Flow Control: RTS-CTS, XON-XOFF, or none
  • Auto-Reconnect: Intelligent reconnection on device unplug/plug
  • Multi-Window: Independent serial connections (Cmd/Ctrl+N)

Terminal Display

  • Multi-Format: ASCII, HEX, Binary, Decimal views
  • Timestamps: Millisecond precision timestamps
  • Line Endings: CR, LF, CRLF, None
  • Auto-Scroll: Toggle with Space key
  • Search: Regex-based text search (Cmd/Ctrl+F)
  • High Performance: Virtualized rendering for 100k+ messages

Firmware Flasher

  • Integrated Flashing: Flash firmware directly from xSerial
  • Custom Commands: Configure flash commands per project
  • Template Support: Use {port} and {baud} placeholders
  • Real-time Output: View flash progress in terminal

Logging & Export

  • Auto-Logging: Automatic session recording to file
  • Export Formats: .txt, .csv, .log, .bin (raw bytes)
  • Selective Export: Export filtered or search-result data

User Interface

  • Dark/Light Theme: Toggle with persistence
  • Native Title Bar: Platform-specific window chrome
  • Settings Sidebar: Collapsible quick-access panel
  • Keyboard Navigation: Full shortcut support

Performance

Metric Target Achieved
Throughput 10 MB/s
Render Latency <100ms
Memory (100k msgs) <100 MB
CPU (steady state) <5%
Startup <2 seconds

Download

Releases

Platform Download
macOS (Apple Silicon) xSerial_x.x.x_aarch64.dmg
macOS (Intel) xSerial_x.x.x_x64.dmg
Windows xSerial_x.x.x_x64-setup.exe
Linux xSerial_x.x.x_amd64.deb

Supported Platforms

Platform Architecture Status
macOS arm64, x64 ✅ Supported
Windows x64 ✅ Supported
Linux x64 ✅ Supported

Usage Guide

Getting Started

  1. Connect Device: Plug in your serial device (Arduino, ESP32, etc.)
  2. Select Port: Choose the port from dropdown (e.g., /dev/cu.usbmodem*)
  3. Set Baud Rate: Match your device's baud rate (default: 115200)
  4. Connect: Click Connect button or auto-connect on port selection

Sending Data

  1. Type message in the input field at the bottom
  2. Press Enter to send
  3. Select line ending (LF, CR, CRLF) in Settings if needed

Firmware Flashing

  1. Open Flasher: Press Cmd/Ctrl+U
  2. Set Workspace: Select your project folder
  3. Configure Command: Enter flash command with placeholders:
    pio run -e myenv -t upload --upload-port {port}
    
  4. Flash: Click Flash button - connection auto-disconnects during flash

Command Templates

Tool Command Template
PlatformIO pio run -e <env> -t upload --upload-port {port}
Arduino CLI arduino-cli upload -p {port} -b <board> <sketch>
esptool esptool.py --port {port} --baud {baud} write_flash 0x0 firmware.bin
avrdude avrdude -p <mcu> -c <programmer> -P {port} -U flash:w:firmware.hex

Display Formats

Format Example Use Case
ASCII Hello World Human-readable text
HEX 48 65 6C 6C 6F Binary protocols
Binary 01001000 01100101 Bit-level analysis
Decimal 72 101 108 108 111 Numeric data

Keyboard Shortcuts

Shortcut Action
Cmd/Ctrl + N New Window
Cmd/Ctrl + U Firmware Flasher
Cmd/Ctrl + F Search
Cmd/Ctrl + L Clear Terminal
Cmd/Ctrl + D Disconnect
Cmd/Ctrl + , Settings
Space Toggle Auto-Scroll
Enter Send Message / Find Next
Shift + Enter Find Previous
Escape Close Search

Tech Stack

  • Framework: Tauri v2 (Rust backend + Web frontend)
  • Frontend: React 19 + TypeScript 5
  • Styling: Tailwind CSS 3 + Radix UI
  • State: Zustand (30Hz batching, 100k circular buffer)
  • Serial: serialport-rs + tokio async I/O
  • Virtualization: react-window

Development

Prerequisites

  • Node.js 18+
  • pnpm 10+
  • Rust toolchain (rustup)

Setup

# Clone repository
git clone https://github.com/xthanhn91/xSerial.git
cd xSerial

# Install dependencies
pnpm install

# Run development server
pnpm tauri:dev

# Build for production
pnpm tauri:build

Project Structure

xSerial/
├── src/                    # React frontend
│   ├── components/
│   │   ├── ui/            # Radix UI components
│   │   ├── terminal/      # Terminal display
│   │   ├── connection/    # Port selection
│   │   ├── firmware/      # Firmware flasher
│   │   └── settings/      # Settings sidebar
│   ├── hooks/             # Custom React hooks
│   ├── stores/            # Zustand stores
│   └── lib/               # Utilities
├── src-tauri/
│   ├── src/
│   │   ├── lib.rs         # Tauri setup & menus
│   │   ├── serial/        # Serial port module
│   │   └── commands/      # IPC commands + flash
│   ├── Cargo.toml
│   └── tauri.conf.json
├── docs/                   # Documentation
└── .github/workflows/     # CI/CD

Documentation

Document Description
Project Overview Vision, requirements, roadmap
Codebase Summary File structure, data flows
Code Standards Conventions, patterns, guidelines
System Architecture Technical architecture, IPC
Design Guidelines UI/UX design system
Tech Stack Technology decisions

Changelog

v0.1.1 (2024-12-15)

  • Fixed: Clear terminal now also clears export data (previously export included cleared messages)

v0.1.0 (2024-12-08)

  • Initial release
  • Core serial monitoring with multi-format display
  • Multi-window support
  • Firmware flashing integration
  • Dark/Light theme
  • Auto-logging and export

Roadmap

v1.0 (Planned)

  • Configurable message limit (prevent terminal lag)
  • Protocol analyzers (Modbus, CAN)
  • Session recording/playback
  • Advanced filtering

v2.0 (Future)

  • Plugin system
  • Remote monitoring
  • Performance dashboards

Author

Thành Thỏ (@xthanhn91)

License

MIT License - see LICENSE for details.