Echo output from ttyUSB port to file

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I'm trying to communicate to a ttyUSB device via Terminal window on Linux Mint 18.2. I'm using commands like



echo -e "D" > /dev/ttyUSB0


for sending my commands and



cat /dev/ttyUSB0


for reading results on another terminal window. Now i'd like to redirect the output of the serial device directly to a text file ( i don't really need to watch the output on a terminal) and i tried with:echo -e "D" > /dev/ttyUSB0 >> ciccio.txt



But is logging just the input i'm sending with echo. Can anyone ease my mind please?







share|improve this question






















  • echo -e "D" > /dev/ttyUSB0 && cat /dev/ttyUSB0 >> ciccio.txt? If the echo to the tty device is successful, read the tty device and redirect it to the file.
    – Raman Sailopal
    Nov 20 '17 at 12:14










  • I managed to display the correct response on the second terminal windows, and to redirect that output to a txt file. But what i'm trying to do is to log the response directly without the need of a second terminal window. If i send my echo and then do a cat upon the device on the same terminal, i'm seeing nothing
    – user3905025
    Nov 20 '17 at 12:40















up vote
0
down vote

favorite












I'm trying to communicate to a ttyUSB device via Terminal window on Linux Mint 18.2. I'm using commands like



echo -e "D" > /dev/ttyUSB0


for sending my commands and



cat /dev/ttyUSB0


for reading results on another terminal window. Now i'd like to redirect the output of the serial device directly to a text file ( i don't really need to watch the output on a terminal) and i tried with:echo -e "D" > /dev/ttyUSB0 >> ciccio.txt



But is logging just the input i'm sending with echo. Can anyone ease my mind please?







share|improve this question






















  • echo -e "D" > /dev/ttyUSB0 && cat /dev/ttyUSB0 >> ciccio.txt? If the echo to the tty device is successful, read the tty device and redirect it to the file.
    – Raman Sailopal
    Nov 20 '17 at 12:14










  • I managed to display the correct response on the second terminal windows, and to redirect that output to a txt file. But what i'm trying to do is to log the response directly without the need of a second terminal window. If i send my echo and then do a cat upon the device on the same terminal, i'm seeing nothing
    – user3905025
    Nov 20 '17 at 12:40













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I'm trying to communicate to a ttyUSB device via Terminal window on Linux Mint 18.2. I'm using commands like



echo -e "D" > /dev/ttyUSB0


for sending my commands and



cat /dev/ttyUSB0


for reading results on another terminal window. Now i'd like to redirect the output of the serial device directly to a text file ( i don't really need to watch the output on a terminal) and i tried with:echo -e "D" > /dev/ttyUSB0 >> ciccio.txt



But is logging just the input i'm sending with echo. Can anyone ease my mind please?







share|improve this question














I'm trying to communicate to a ttyUSB device via Terminal window on Linux Mint 18.2. I'm using commands like



echo -e "D" > /dev/ttyUSB0


for sending my commands and



cat /dev/ttyUSB0


for reading results on another terminal window. Now i'd like to redirect the output of the serial device directly to a text file ( i don't really need to watch the output on a terminal) and i tried with:echo -e "D" > /dev/ttyUSB0 >> ciccio.txt



But is logging just the input i'm sending with echo. Can anyone ease my mind please?









share|improve this question













share|improve this question




share|improve this question








edited Aug 21 at 0:32









Rui F Ribeiro

35.8k1271114




35.8k1271114










asked Nov 20 '17 at 11:46









user3905025

1




1











  • echo -e "D" > /dev/ttyUSB0 && cat /dev/ttyUSB0 >> ciccio.txt? If the echo to the tty device is successful, read the tty device and redirect it to the file.
    – Raman Sailopal
    Nov 20 '17 at 12:14










  • I managed to display the correct response on the second terminal windows, and to redirect that output to a txt file. But what i'm trying to do is to log the response directly without the need of a second terminal window. If i send my echo and then do a cat upon the device on the same terminal, i'm seeing nothing
    – user3905025
    Nov 20 '17 at 12:40

















  • echo -e "D" > /dev/ttyUSB0 && cat /dev/ttyUSB0 >> ciccio.txt? If the echo to the tty device is successful, read the tty device and redirect it to the file.
    – Raman Sailopal
    Nov 20 '17 at 12:14










  • I managed to display the correct response on the second terminal windows, and to redirect that output to a txt file. But what i'm trying to do is to log the response directly without the need of a second terminal window. If i send my echo and then do a cat upon the device on the same terminal, i'm seeing nothing
    – user3905025
    Nov 20 '17 at 12:40
















echo -e "D" > /dev/ttyUSB0 && cat /dev/ttyUSB0 >> ciccio.txt? If the echo to the tty device is successful, read the tty device and redirect it to the file.
– Raman Sailopal
Nov 20 '17 at 12:14




echo -e "D" > /dev/ttyUSB0 && cat /dev/ttyUSB0 >> ciccio.txt? If the echo to the tty device is successful, read the tty device and redirect it to the file.
– Raman Sailopal
Nov 20 '17 at 12:14












I managed to display the correct response on the second terminal windows, and to redirect that output to a txt file. But what i'm trying to do is to log the response directly without the need of a second terminal window. If i send my echo and then do a cat upon the device on the same terminal, i'm seeing nothing
– user3905025
Nov 20 '17 at 12:40





I managed to display the correct response on the second terminal windows, and to redirect that output to a txt file. But what i'm trying to do is to log the response directly without the need of a second terminal window. If i send my echo and then do a cat upon the device on the same terminal, i'm seeing nothing
– user3905025
Nov 20 '17 at 12:40
















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f405752%2fecho-output-from-ttyusb-port-to-file%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f405752%2fecho-output-from-ttyusb-port-to-file%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?