Skip to content

kikuchan/scat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

scat

Super simple serial console

Usage

% scat -s 230400 -8N1 /dev/ttyUSB0
% scat -h
Usage: scat [options] [device]
  -l <device>
  -s <speed> (default: 115200)
  -[45678]: datasize (default: 8)
  -[NEO]: parity (default: N)
  -[12]: stopbit (default: 1)
  -[HX]: flow contro (default: not specified)
  -x: hex dump mode
  -r: raw output mode (display characters AS IS)
  -t: Make TTY raw mode
  -T <N>: timeout after EOF in sec (default: 0.5)

Why

Sometimes, serial console stops working because unprintable characters confuse your terminal emulator. This program escapes such characters to hex notation to avoid this problem.

How it works

  • Incoming Non-ASCII characters are converted to <XX> (negateable by -r option)
  • Canonical mode by default (negateable by -t option)
    • Send line by line basis, it's provided by a line discipline as usual

Limitations

  • Not so efficient
  • No escape sequence is supported, by design
  • Only ASCII characters are supported (for now)

This program is for...

  • Watching log messages on UART
    • Very useful in case that the line is electrically unstable
  • Issue simple AT commands to your modem for diagnostics
  • Communicate with the device doesn't have a line editor support
  • Dump binary data/file via UART with -x option
  • As a simple cu alternative, maybe with -rt options

Releases

No releases published

Packages

No packages published