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 is115200.-w,--width=<val>β sets the data bit width. default is8.-p,--parity=<val>β sets the parity. default isN.-s,--stopbits=<val>β sets the stopbits. default is1.-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 bygrabserial.--systimeβ prints system time for each line received. the time is the absolute local time when the first character of each line is received bygrabserial. 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-mpattern 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 π¦β¨
π¦ where this page comes from
- debian bookworm: grabserial 2.1.0-1 Β· GPL-2.0-only
- debian trixie: grabserial 2.1.8+git20240709.f7edd29-1 Β· GPL-2.0-only
- ubuntu jammy: grabserial 2.1.0-1 Β· GPL-2.0-only
- ubuntu noble: grabserial 2.1.8-1 Β· GPL-2.0-only
- ubuntu questing: grabserial 2.1.8+git20240709.f7edd29-1
- ubuntu resolute: grabserial 2.1.8+git20240709.f7edd29-1build1 Β· GPL-2.0-only
- ubuntu stonking: grabserial 2.1.8+git20240709.f7edd29-1build1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms