Answer the question
In order to leave comments, you need to log in
How to withdraw CAT | SCREEN to a file?
ZDR!
There is a device connected via usb
# dmesg | grep cp210x
[ 22.880215] usbcore: registered new interface driver cp210x
[ 22.880277] usbserial: USB Serial support registered for cp210x
[ 22.880391] cp210x 2-1:1.0: cp210x converter detected
[ 23.265817] usb 2-1: cp210x converter attached to ttyx USB converter now redirected to /dev
/
COM1 for convenience and not to
change
\x37' > $PORT
device should respond, BUT!
cat /dev/COM1 - silence
screen /dev/COM1 - everything is displayed fine
but I can’t write SCREEN into a variable for later parsing, or at least into a file.
Answer the question
In order to leave comments, you need to log in
RESOLVED!
1. The problem was in the port settings
Not working
speed 300 baud; rows0; columns0; line=0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = ; eol2 = ; swtch = ; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werease = ^W; lnext = ^V; flush = ^O; min = 0; time = 0;
parenb -parodd cs7 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
Working
speed 300 baud; rows0; columns0; line=0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = ; eol2 = ; swtch = ; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werease = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
parenb -parodd cs7 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
cat
:
no process found
ALL SPS!
"screen / dev / COM1 - everything is fine displayed"
So redirect its output.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question