I am trying to redirect the minicom output to a file, there is the
capture file option in my version of minicom but it only writes to the
file when I choose "close capture file".
I want to add minicom as a startup service, and make its' output
redirected automatically to a file, without having buffer in memory
because that risks losing data in power loss.
Your help appreciated.
Regards,
Arto
The best advice I can give you is to toss minicom. It is a painfully hard
program to use. It's one of those "It only ever gained any currency because
it is the built-in default program of its type (in Linux)". Kinda like
"EDLIN" being the only built-in editor in DOS. So everybody started using
it, instead of (quickly) installing something that works.
Anyway, back on topic, use "screen" as your serial comm program. (No, I'm
not joking - screen can do serial communications). I am not sure if it will
fix the buffering problem (I think it will, but I'm not sure), but the point
is, you will have something that you can work with.
--
> No, I haven't, that's why I'm asking questions. If you won't help me, why
> don't you just go find your lost manhood elsewhere.
CLC in a nutshell.
Thank you very MUCH for your help. I managed to use the following
screen command to do what I want:
screen /dev/ttyS0 9600,cs8 -ixon
I found good info on this website:
http://www.cyberciti.biz/faq/unix-linux-apple-osx-bsd-screen-set-baud-rate/
I am just left with two questions which are confusing to me as yet...
1. If I want to redirect the output of screen, should I just use the
traditional way "screen /dev/ttyS0 -blah -blah >file1.out" or should I
try some functionality built in the screen command that supports
redirection? And what is it?
2. If I want to start-up the screen monitoring of the serial port
automatically at each start-up (I'm using CentOs 5.5), should I make a
small script in crontab to initiate an if statement every 5 minutes
and check if screen is UP or NO, ORRRR should I try to set the screen
command/script as a service? And how can I add a script as a service
on Centos 5.6?
Your help is extremely appreciated :D
Regards,
Arto
It seems to me that what you're trying to achieve would be
answered by:
(stty 115200 cs8 -ixon; cat) < /dev/ttyS0 > some-file.log
wouldn't it?
Or do you need to interact with that?
--
Stephane
Thanks a lot for your reply Stephane, the command you provided is
working. Could you please explain it? I don't understand the syntax
meaning at all.
Regards,
Arto