GRABSERIAL(1)

πŸŽ€ GRABSERIAL(1) πŸŽ€

okay bestie, welcome to the General Commands Manual corner of the internet, where we're about to make serial consoles make sense. no cap, this one's a lil gem.


✨ NAME ✨

grabserial β€” Serial line reader πŸ’–

like. that's it. that's the whole name. it reads serial lines. iconic behaviour honestly.


🌸 SYNOPSIS 🌸

grabserial

yes, just grabserial, that's the vibe. (there's more below tho, keep reading 🫢)


πŸ¦‹ DESCRIPTION πŸ¦‹

so grabserial is this lil program that reads a serial port and writes the data straight to standard output. literally that simple, and that's the point. πŸ’…

the main character energy purpose here is: you got a target board running Linux, it's yapping away on its serial console, and you wanna collect those messages and save them on a host machine. that's the job. that's the assignment. and it ate. πŸ”₯


πŸ‘‘ USAGE πŸ‘‘

grabserial [options] <config_file>

πŸ’– OPTIONS πŸ’–

okay so here's the full menu, no skips, no shortcuts, we're listing every single one:

  • -h, --help β€” prints this message. the classic. the "help me bestie" flag.
  • -d, --device=<devpath> β€” sets the device to read. default is '/dev/ttyS0'.
  • -b, --baudrate=<val> β€” sets the baudrate. default is 115200.
  • -w, --width=<val> β€” sets the data bit width. default is 8.
  • -p, --parity=<val> β€” sets the parity. default is N.
  • -s, --stopbits=<val> β€” sets the stopbits. default is 1.
  • -x, --xonxoff β€” enables software flow control. default is off.
  • -r, --rtscts β€” enables RTS/CTS flow control. default is off.
  • -f, --force-reset β€” forces pyserial to reset device parameters. it's giving "do it anyway, I said what I said".
  • --endtime=<secs> β€” ends the program after the specified seconds have elapsed. a lil timer, a lil goodbye. πŸ•
  • --command=<cmd> β€” sends a command to the port before reading. pregame behaviour fr fr.
  • -t, --time β€” prints time for each line received. the time is when the first character of each line is received by grabserial.
  • --systime β€” prints system time for each line received. the time is the absolute local time when the first character of each line is received by grabserial. yes, that's a different flavour of timestamp, don't @ me. ⭐
  • -m, --match=<pat> β€” specifies a regular expression pattern to match to set a base time. time values for lines after the line matching the pattern will be relative to this base time. so like, reset the clock, cutie. πŸŽ€
  • -i, --instantpat=<pat> β€” specifies a regular expression pattern to have its time reported at end of run. works mid-line. lowkey sneaky, highkey useful.
  • -q, --quitpat=<pat> β€” specifies a regular expression pattern to end the program. works mid-line. the "okay we're done here" flag. πŸ’€
  • -l, --launchtime β€” sets base time from launch of the program. t=0 is when you started, bestie.
  • -o, --output=<name> β€” outputs data to the named file. saving the receipts. πŸ“
  • -v, --verbose β€” shows verbose runtime messages. it will tell you things.
  • -V, --version β€” shows version number and exits. quick lil flex then bye. ✨

🌈 Example 🌈

grabserial -e 30 -t -m ^Linux version.*

so what's happening here: this will grab serial input for 30 seconds, displaying the time for each line, and re-setting the base time when the line starting with "Linux version" is seen.

ngl that -m pattern is the moment. the second your board says "Linux version", the clock resets and everything after is measured from there. chef's kiss. πŸ‘‘

🫢 AUTHOR 🫢

this manual page was written by Nobuhiro Iwamatsu <iwamatsu@debian.org>, for the Debian GNU/Linux system (but may be used by others). shoutout to them, absolute legend. πŸ’œ


aaaand that's the whole page!! MAY 2015 energy, GRABSERIAL(1) forever. go read some serial ports bestie, you got this πŸ¦‹βœ¨