[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Read Serial Port
On Thursday 02 November 2006 03:00, Bernhard Walle wrote:
> Hello,
>
> * botron@xxxxxxxx <botron@xxxxxxxx> [2006-11-01 20:37]:
> > Hey Fernando,
> >
> > > Which program allows to do this under Linux??
> >
> > 'screen' is one of them.
>
> Screen? Really? How do I configure screen to read from the serial
> port?
I do something like this.
echo "log on" > $rc
echo "logfile $logdir/$host.log" >> $rc
echo "logtstamp on" >> $rc
screen -S $host -c $rc -d -m -h 1000 -L /dev/ttyS0 \
115200,cs8,-ixon,-ixoff,-istrip
Then just use screen to attach/detach as you want (e.g. screen -x -r $host).
All output gets logged to the log file even when not attached.
[Setting rc, logdir, & host is left as a exercise for the reader]
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/