惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

L
LangChain Blog
博客园_首页
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
月光博客
月光博客
S
SegmentFault 最新的问题
量子位
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 司徒正美
博客园 - Franky
Google DeepMind News
Google DeepMind News
Recent Announcements
Recent Announcements
B
Blog RSS Feed
C
Check Point Blog
The Cloudflare Blog
M
MIT News - Artificial intelligence
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
F
Fortinet All Blogs
Hugging Face - Blog
Hugging Face - Blog
博客园 - 叶小钗
V
Visual Studio Blog
V
V2EX
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 聂微东
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

Show HN

Show HN: AI agents for UK GDAD PCF roles and their skills The Two Pillars: Mixer Mode and Meta-Software in the Reorganization of Software Work After AI GitHub - JaiCode08/teleport-env What 1,000+ Harness Experiments Taught Me About Self-Improving Agents Show HN: Liiists, a Markdown-first, iOS and CLI list app SwiperTab – Get this Extension for 🦊 Firefox (en-US) GitHub - kouhxp/fftext: Summarize, explain, fact-check, or translate any text, URL, or file. No GPU. No cloud. One command GitHub - sweetpad-dev/sweetpad: Develop Swift/iOS projects using VSCode GitHub - dogmaticdev/IRON: IRON a.k.a. Intermediate Representation Object Notation is a Interpreter/Database that is used to create Programming Languages. GitHub - sjhalani7/vaen: Package your AI coding harness into a portable .agent file, and share it across repos, teams, & the community without ever having to copy-paste instructions, skills, MCP config, or secrets. Show HN: Gandalf the Grader Show HN: Citadeld – replay any CI failure locally from a single file GitHub - tdortman/cuSBF: High-Performance GPU Super Bloom Filter coral-ai/claude-code-token-xray at main · Coral-Bricks-AI/coral-ai GitHub - ulyssestenn/funes: Funes is a Git-based framework for LLM-managed knowledge work: an AI Librarian ingests raw sources, builds an interlinked Markdown knowledge base, and uses it to produce cited reports, analyses, and other outputs. GitHub - ThatXliner/gah: Git Add Hunk, built for agents to use GitHub - harmont-dev/harmont-cli: Command-line client for the Harmont CI platform GitHub - brooksmcmillin/mcp-authflow: OAuth 2.0 Authorization Server framework for MCP servers GitHub - javaid-codes/audit-supply-chain-agents GitHub - amorey/gochan: A small library of common channel architectures for Go, inspired by Rust GitHub - arifozgun/OpenGem: Free, Open-Source AI API Gateway with Gemini, OpenAI & Anthropic Compatibility in 1 file GitHub - Pranesh950/BioPetals: 🌸 Run BIOxAI models at home, BitTorrent-style. Fine-tuning and inference up to 10x faster than offloading GitHub - cnguyen14/bounty-doctor: Diagnose a GitHub bounty issue before you waste hours: detects honeypot scam repos, AI-bot attempt swarms, and stale contests. Show HN: CoreMCP – MCP Server for On-Prem DBs Show HN: KittyHTML – Render HTML/CSS as an inline image in your terminal GitHub - bingud/filemat: Web-based file manager Show HN: TruthLens – Free multi-signal deepfake image detector GitHub - apexlocal-jz/claude-usage-tray: Windows system-tray app showing your Claude Code rate-limit usage at a glance. Zero deps, ~300 lines of PowerShell. Cross-IDE (works regardless of VS Code, Cursor, plain terminal). Release v0.1.2.1 · kouhxp/yapsnap GitHub - noopolis/moltnet: Self-hostable chat network for AI agents. Pre-built bridges for Claude Code, Codex, and the Claws. Rooms, DMs, history. No Slack bots, no Matrix, no glue code.
GitHub - NTICompass/NetworkAttachedMouse: A serial mouse ...
nticompass · 2026-06-25 · via Show HN

Network Attached Mouse

A serial mouse driver capable of connecting to a serial mouse over the network via a terminal server (and I guess a local COM port too, but where's the fun in that?).

TL;DR: A python script to connect to a network port (or COM port) and let you use a serial mouse on Windows1.

NetMouse.exe --microsoft --ip=192.168.1.2 --port=3008
# or
NetMouse.exe --microsoft --com=COM7
# or
uv sync
uv run main.py --microsoft --ip=192.168.1.2 --port=3008

Serial mouse attached to a terminal server (Note: Click picture for video demo)

Backstory

At a swap meet, I'd picked up a terminal server, specifically a Lantronix ETS8P. A terminal server is a device with multiple serial/RS-232 ports that lets you access those ports over the network.

You configure the baud rate and other serial settings on the device - via telnet or by accessing it over a serial console/terminal - and then you can access each of its serial ports through a network port. In my case ports 3001 - 3008.

Anyway, I was using to access my home server by its serial console when I was curious about something. Does it only work with serial consoles? Or could I connect any serial device and access that over the network?

Initial tests

I wanted to try this, but I wasn't really sure where to start. First, I'd need to find/create a serial mouse driver, I guess...

I didn't really want to create my own driver, as I'm sure someone must've created this already. After plenty of searching, I found the inputattach command for Linux (part of the linuxconsoletools package on Fedora).

Let's see if my mouse even works at all, so I used my trusty USB to serial adapter and ran

sudo inputattach --microsoft /dev/ttyUSB0

and it just worked! I'm using a KeyTronic branded 2-button mouse, but lots of mice used the "Microsoft Serial Mouse" command set.

Ok, this bodes well for it working over the terminal server, so let's configure that. According to inputattach.c, the mouse communicates at 1200 baud, 7N1. I configured port 8 on my terminal server, and connected the mouse2 and a null-modem adapter. I then set the termianl server's IP and used one of my favorite linux tools, socat.

socat -d -d pty,rawer,echo=0,link=/tmp/sermouse tcp:192.168.1.2:8008
sudo inputattach --microsoft /tmp/sermouse

This got me... a permission error! Not sure why, but inputattach can't attach to symlinks - which is what /tmp/sermouse is. But, if you look at the symlink it goes to /dev/pts/2 and using that...

socat -d -d pty,rawer,echo=0,link=/tmp/sermouse tcp:192.168.1.2:3008
sudo inputattach --microsoft /dev/pts/2

worked! Now I could move my serial mouse, connected to the terminal server, wait a bit and see the cursor move on my screen!

What about Windows?

inputattach is very much a Linux tool, so what about Windows. Well, it turns out that Windows 11 still has a serial mouse driver built-in! You can enable it like this:

sc config sermouse start=demand

after running this, nothing seems to have happened. Even with my USB to serial adapter and mouse connected.

After a reboot, however... the mouse just started working! Device manager even showed "Microsoft Serial Mouse". Cool, that's awesome, now to connect to a network port.

I think there is socat for Windows, and I even found something like com0com to create a virtual COM port, but I couldn't figure out how to attach it to the sermouse driver. Just like on Windows 9x, the Windows 11 sermouse scans the COM ports for mice on boot up. There's no way to manually enable it on a arbitrary COM port, at least I couldn't figure out how.

So, I gave in and decided to make my own driver for the mouse.

Serial mouse decoder

Fine, I'll make my own decoder3. I just need to understand what the (binary) I'm getting from the mouse means and how to decode it. Good thing I found some helpful info about that from searching the web!

Links:

This doesn't seem too complicated. The mouse sends 3-byte packets, which each bit having a specific meaning - including that meaning being "unused". So, just grab bytes as they come in, and after every 3, decode that packet.

While I could just start totally from scratch, using only the description of how the packets work, I could also adapt code that's already been written. So, thanks to @reconbot (also https://roborooter.com/post/serial-mouse-project/) for doing the hard work for me!

Basing my code off of his (https://github.com/reconbot/serial-mouse-parser/blob/master/lib/stream.ts), and using pynput (so I don't need to call win32 APIs manually), I got to work and was able to make a basic mouse driver that reads/decodes the packets from the mouse and moves the cursor on the screen.

Video Demo

NetMouse_Demo.mp4
  1. Should also work on MacOS and Linux, but I only tested it on Windows. ↩

  2. This terminal server only has RJ-45 ports, according to the docs the pinout matches that of a Cisco console/rollover cable. I do have one of those, but I used a generic RJ-45 to DB-25 adapter to make my own. ↩

  3. I am a professional PHP and JavaScript (TypeScript) developer and I am still learning python and currently only use it for fun/hobbies. ↩