I'm connecting to a USB-serial connection on /dev/ttyACM0. The code on the sender side is sending a
\f character at regular intervals.
print("----------------------------\n\r"); print("-- LED CONTROLLER 00.01 --\n\r"); print("-- (c) 2013 STACEY RIECK --\n\r"); print("----------------------------\n\r"); print("\n\f");
However, when I run
cat /dev/ttyACM0 from console, the output scrolls down my screen instead of refreshing at the top.
I've dug through the current
stty settings (by typing
stty -F /dev/ttyACM0 -a) which gives the following output:
speed 115200 baud; rows 0; columns 0; line = 0; intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^A; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0; -parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -iutf8 -opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 -isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt -echoctl -echoke
stty --help page gives the form feed delay (
ff0), but doesn't indicate how to change anything else. I also found this page which indicates that I can set the FormFeed character like so
FormFeed=014, but that syntax didn't work for my stty version (
stty --version gives
stty (GNU coreutils) 8.5).
Putty in Windows exhibits the correct behaviour, but I'm struggling to get this to work in Debian 6. Does anyone know how I can configure stty to interpret a form feed as a terminal clear?