Screen as Serial Terminal
At work we use minicom on our Linux workstations to connect to the serial port of our development hardware. It works fine, but it's very text oriented. It also loses everything in the window if you re-size it. I've sometimes wondered if there are better alternatives, and today someone on one of our internal forums gave me a nice list. Sadly I couldn't find any of the suggestions for our old Red Hat 8 development boxes, except screen.
I've used screen before and it's great. I had no idea it could do serial communication too. Here's the command I used for our environment:
screen /dev/ttyS0 115200,cs8,-ixon,-ixon,istrip
I also have this .screenrc file that someone gave me years ago:
# kill startup message
startup_message off
# define a bigger scrollback, default is 100 lines
defscrollback 1024
# remap CTRL-A to CTRL-]
escape ^]]
# status bar
hardstatus on
hardstatus alwayslastline "%{rk}%H %{gk}%c %{yk}%M%d %{wk}%?%-Lw%?%{bw}%n*%f %t%?(%u)%?%{wk}%?%+Lw%?"
That gives you better key bindings and a nice colorful stats line at the bottom of the windows.
Advantages over minicom are, you can resize the window and you don't lose anything, you have screen's cool detached mode functionality, and there are a million other little nifty things that screen can do that you might find useful (man screen some rainy afternoon). You might be used to screen keybindings already too. A downside is, with minicom you can run it in an xterm with a scroll bar and use your wheelie mouse to scroll the buffer. That's handy. I can't get screen to do that.
UPDATE: You can scroll with your wheel mouse if you run screen in a recent version of gnome-terminal. See the comments on this entry.
UPDATE 2: There's another way to scroll screen output with your mouse that works exactly like minicom. See comment number 4 below.
Let me just say at this point that I should have already learned from emacs that when dealing with a UNIX program that has been in use since before I first touched a computer, never say that it can't do something, because it totally can.
Comments
# tell screen that you term can scroll
termcapinfo xterm ti@:te@
# bind Shift+PgUp/PgDn
bindkey -m "^[[5;2~" stuff ^b
bindkey -m "^[[6;2~" stuff ^f