1
1
Fork
You've already forked ucom
0
Cruft-free serial terminal
  • C 93.1%
  • Makefile 6.9%
Find a file
Chris Webb 67276802f9 Disable unused-result warnings
Warnings about unused results from functions declared with
__attribute__((warn_unused_result)) can be suppressed with an explicit
(void) cast on clang but not on gcc, for incoherent reasons. glibc sprinkles
this attribute around very liberally with -D_FORTIFY_SOURCE, which is
enabled by default on some distributions, so the least noisy way to avoid
unwanted warnings is to turn them off completely.
2026年06月28日 17:24:30 +00:00
COPYING Import initial version of ucom 2024年06月24日 18:28:25 +01:00
Makefile Disable unused-result warnings 2026年06月28日 17:24:30 +00:00
README Set CLOCAL in termios c_cflag 2025年04月28日 10:41:15 +01:00
ucom.c Set CLOCAL in termios c_cflag 2025年04月28日 10:41:15 +01:00

ucom
====
ucom is a serial terminal in the style of cu, minicom and GNU screen, but
without legacy modem control, file transfer or a nested terminal emulation
layer. In fewer than 150 lines of C, it provides a clean interactive
session with a serial port, aiming for both correctness and efficiency.
Usage
-----
Run with a serial port as argument, it switches both this port and
the local terminal into raw mode, then bidirectionally copies between
the two. The local quit key (typically ^\ on Linux and BSD) can be used
to disconnect, restore the terminal settings and exit.
To set the baud rate and line characteristics, use stty on the serial
port before running ucom. For example,
 stty 115200n8 < /dev/ttyS0
 ucom /dev/ttyS0
Similarly, to change the default quit key to ^X on the local terminal, use
 stty quit ^X
If the quit key is disabled with stty quit undef, the terminal can still be
terminated gracefully by sending it a SIGHUP, SIGINT, SIGQUIT or SIGTERM.
It can be convenient to wrap ucom in a shell function such as
 ucom() {
 stty "${@:2}" >/dev/null < "1ドル" && command ucom "1ドル"
 }
which allows the port to be configured with additional arguments.
Building and installing
-----------------------
Run 'make install' at the top of the source tree to install ucom in /bin.
Alternatively, you can set DESTDIR and/or BINDIR to install in a different
location, or make, strip and copy the binary into place manually.
The program should be portable to any reasonably modern POSIX system,
including Linux and BSD. However, macOS poll() still fails on character
devices and this longstanding bug will break ucom. A branch of ucom
modified to use the ugly legacy select() interface is available for macOS.
Please report any problems or bugs to Chris Webb <chris@arachsys.com>.
Copying
-------
This software was written by Chris Webb <chris@arachsys.com> and is
distributed as Free Software under the terms of the MIT license in COPYING.