Skip to content

Latest commit

 

History

History
142 lines (93 loc) · 11.6 KB

File metadata and controls

142 lines (93 loc) · 11.6 KB

Lemon Serial Monitor

简体中文 | English

Latest release Total downloads MIT License Windows x64

I built Lemon Serial Monitor (Lemon串口监控) because I wanted an MIT-licensed, open-source Windows x64 serial-port monitor, COM-port monitor, and serial sniffer for read-only COM-port capture and serial traffic analysis. Commercial use is allowed. Its kernel filter driver copies completed read, write, and control events without the desktop application opening or occupying the monitored COM port; the WPF UI, CLI, and MCP support interactive inspection, automation, and AI-assisted hardware/software debugging. Compatibility targets include Windows 10/11 x64 and Windows Server 2019/2022/2025 x64; Server Core installs only non-UI components, and the validation limits are documented below.

The current version is 0.1.1 and is licensed under MIT. Personal use, commercial use (including for-profit use and sale), modification, redistribution, and sublicensing are permitted. If you distribute copies or substantial portions of the software, you must retain Copyright (c) 2026 qingningmneg and the MIT permission notice.

Download LemonSerialMonitor-Setup-x64.exe directly

After downloading, verify the installer with the corresponding Release's SHA256SUMS.txt.

Download and installation

The official installer is published on the project's GitHub Releases page under this filename:

LemonSerialMonitor-Setup-x64.exe

You do not need to open PowerShell to install it:

  1. Double-click the installer.
  2. Read and accept the Local Test Certificate Notice (本地测试证书使用说明).
  3. Choose where to install the desktop application.
  4. Click Install (安装) and grant administrator permission when Windows prompts you.
  5. If setup asks for a restart, save your work and restart as instructed. Open the application after Windows has restarted.

The current driver uses a local test certificate; it is not signed with Microsoft production signing. Setup verifies the installation package, imports the bundled public-key certificate, and may enable Windows TESTSIGNING when required. It does not disable Secure Boot or modify BitLocker. Setup stops when Secure Boot is enabled.

The test certificate cannot be imported until setup has administrator permission, so Windows may still show SmartScreen or “Unknown publisher” when you first double-click the installer. The 0.1.1 release files are locally test-signed, but they have no Microsoft trust chain and no RFC 3161 public timestamp. Download them only from this project's Release and verify SHA256SUMS.txt first.

Version 0.1.1 does not support overwriting an existing installation made by the current installer. Before updating, stop monitoring and back up your data, perform a full uninstall with the old version, restart if prompted, and then install the new version.

See Installation and uninstall for the complete instructions.

The complete operating manual is available in Simplified Chinese: PDF manual (Simplified Chinese) and Word manual (Simplified Chinese).

Compatibility targets

  • Windows 10 x64
  • Windows 11 x64
  • Windows Server 2019 x64 (Desktop Experience / Server Core)
  • Windows Server 2022 x64 (Desktop Experience / Server Core)
  • Windows Server 2025 x64 (Desktop Experience / Server Core)

Server Core does not install the WPF desktop application. It installs only the driver, background service, AI/command-line interfaces, and documentation. Setup rejects x86, ARM64, unknown Windows Server builds, and environments where Secure Boot is enabled.

The 0.1.0 historical baseline on a physical Windows 11 x64 system completed graphical installation, restart, service cold start, desktop connection, JSON CLI, and MCP checks. That candidate validation chain also completed a full uninstall of the previous candidate and a clean installation of the 0.1.0 code candidate. When no serial device is attached, the background service remains running. After you click Refresh Ports (刷新端口), an empty port list and a temporarily unavailable driver are normal; attach a real device and refresh again. This is historical 0.1.0 evidence, not a new 0.1.1 acceptance result.

In the 0.1.0 historical baseline, GitHub-hosted desktop runners for Windows Server 2022/2025 completed platform detection, managed tests, and installation-contract checks, but did not load the kernel driver. Server Core received component-layout contract tests only, and the Server 2019 self-hosted job was not run. Version 0.1.1 adds no end-to-end acceptance testing for driver installation, restart, capture, AI, and uninstall on a physical or virtual Server system. These versions are compatibility targets, not hardware certification. See the 0.1.1 release notes for the exact scope.

How it differs from a conventional serial terminal or assistant

Aspect Lemon Serial Monitor Typical serial terminal/assistant behavior
Relationship to the COM port The desktop UI does not open or take ownership of the monitored COM port; the kernel filter copies existing read/write activity. The tool typically opens the COM port directly and participates in communication.
Data direction Read-only monitoring; it does not actively send, inject, or replay data. The tool can typically send data actively.
AI-assisted debugging The protected local CLI/MCP interfaces expose captured events through pagination for AI-assisted hardware/software debugging. Local automation and paginated interfaces depend on the specific tool.

Main features

  • Monitor Read, Write, and configuration/control events on one or more serial ports without having the desktop application occupy the COM port.
  • Three views: List (列表), Dump, and Terminal (终端).
  • Display time, process, port, direction, operation code, status, length, flags, HEX, and text.
  • Wrap-around HEX and text search; HEX accepts ?? as a single-byte wildcard.
  • Copy multiple selected rows as spaced HEX, compact HEX, text, a C array, Python bytes, TSV, CSV, or JSON.
  • Ctrl+C uses the currently selected copy format; Ctrl+Shift+C copies only the continuous spaced HEX data.
  • Automatically persist sessions to a protected local database, then export CSV, TXT, or RAW after stopping.
  • Use the local AI interface for status, ports, start/pause/resume/stop, session lists, paginated reads, waiting for new events, export, and protocol descriptions.
  • Use a standard MCP stdio server. The AI interface does not expose an HTTP port and does not accept sending, injection, replay, or arbitrary file access.
  • Run a graphical full uninstall that uses the protected installation record to remove software-owned files, services, drivers, filters, certificates, and data.

Start monitoring in three minutes

  1. Open the original application that uses the serial port and let it connect to the device normally.
  2. Open Lemon Serial Monitor and click Refresh Ports (刷新端口).
  3. Select the COM ports you want to inspect and enter a session filename such as board-test.db.
  4. Click Start (开始).
  5. Let the original application actually send or read data.
  6. Switch among List (列表), Dump, and Terminal (终端) to inspect it.
  7. When finished, click Stop (停止) first, then copy or export as needed.

If the list is empty, first confirm that you clicked Start and that the original application actually read from or wrote to the same COM port after monitoring started. The monitoring tool does not actively send data to the device.

With no serial device attached, seeing Service connected (服务已连接), an empty port list, and a temporarily unavailable driver after a refresh is normal. It does not mean the background service failed to start.

See the User guide for the complete UI instructions and Troubleshooting for problem resolution.

AI integration

The installed AI client is located here by default:

C:\Program Files\Lemon串口监控\ai\Lemon.SerialMonitor.AI.exe

If you chose another installation location, use the actual path.

Quick command-line checks:

& 'C:\Program Files\Lemon串口监控\ai\Lemon.SerialMonitor.AI.exe' status --json
& 'C:\Program Files\Lemon串口监控\ai\Lemon.SerialMonitor.AI.exe' ports --json

Example MCP configuration:

{
  "mcpServers": {
    "lemon-serial-monitor": {
      "command": "C:\\Program Files\\Lemon串口监控\\ai\\Lemon.SerialMonitor.AI.exe",
      "args": ["mcp"]
    }
  }
}

See the AI integration guide for detailed setup steps. Commands, tools, fields, and integrity rules are documented in the AI API reference.

Data and complete uninstall

Sessions and export files are stored by default in a protected %ProgramData% data directory. The uninstaller gives an explicit warning: a full uninstall permanently deletes every session, export, setting, log, and AI state item produced by this software. Export or back up anything you need to keep before uninstalling.

Start a full uninstall from Settings → Apps → Installed apps, select Lemon串口监控 (Lemon Serial Monitor), and choose Uninstall. The uninstaller first closes the desktop application, AI client, and background service. Cleanup relies on the protected installation record and exact object identity; if an identity does not match, uninstall stops that deletion rather than guessing ownership. Only when the Windows kernel is still using the driver, a boot policy must be restored, or a file remains locked by the system does uninstall schedule a restart to continue cleanup and verify the remaining objects again.

Build from source

The repository already contains the validated DOCX/PDF manuals required to build the installer. Building from source also requires Visual Studio 2022, the WDK, Spectre libraries, the .NET SDK, Pester, and Inno Setup 6.7.3. See Build instructions for the build, signing, test, and installer commands.

See Security for the security boundaries and threat model, and the 0.1.1 release notes for version changes.

Open-source license

Lemon Serial Monitor is open sourced by qingningmneg under the MIT License. MIT permits personal and commercial use, modification, redistribution, sublicensing, and sale. Copies or substantial portions must retain Copyright (c) 2026 qingningmneg and the MIT permission notice. The software is provided “as is,” without express or implied warranties; see LICENSE for the complete terms.

Independent implementation

This project's code, protocols, session format, installation flow, and UI are independently implemented. It contains no binaries, icons, trademarks, private code, or other assets from other serial-port software.