FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 12-17-2008, 02:31 PM
Martin McCormick
 
Default How do you Undefine A character in stty?

I need to ignore EOF characters that might appear on a
serial RS-232 line. In this case, an EOF probably just means
somebody jiggled the plug just the right way and created some
garbage. in stty, many special characters are defined including
eof as Control-D

intr = ^C; quit = ^; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;

I want to make eof look like eol so that any eof is passed as
the read loop I wrote will ignore any toxic characters.

This is a data logger connected to a RS-232 output on a
telephone switch and all sorts of odd situations have occurred
at various times when technicians are stopping and restarting
the serial board on the switch. I want my logger to just shrug
off eof's and Control-C's and keep on recording.

Looking at the stty help and man pages didn't tell me
anything I recognized as useful but I may have missed something.

Trying to stuff undef after eof = doesn't work and
trying a - just set eof to -. The null string either in or out
of "" appears to still leave eof defined to a null.

Thanks.

Martin McCormick WB5AGZ Stillwater, OK
Systems Engineer
OSU Information Technology Department Telecommunications Services Group

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-18-2008, 01:19 AM
Cameron Hutchison
 
Default How do you Undefine A character in stty?

Martin McCormick <martin@dc.cis.okstate.edu> writes:

> This is a data logger connected to a RS-232 output on a
>telephone switch and all sorts of odd situations have occurred
>at various times when technicians are stopping and restarting
>the serial board on the switch. I want my logger to just shrug
>off eof's and Control-C's and keep on recording.

If you want no processing of special characters, you can use "raw" mode.
There is also a "cbreak" mode which turns off some special character
processing. Add -isig to turn off signals.

If you look at the stty(1) man page under the Local settings: section,
you'll see the processing you can turn on and off.


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-18-2008, 02:05 AM
Martin McCormick
 
Default How do you Undefine A character in stty?

Cameron Hutchison writes:
> If you want no processing of special characters, you can use "raw" mode.
> There is also a "cbreak" mode which turns off some special character
> processing. Add -isig to turn off signals.
>
> If you look at the stty(1) man page under the Local settings: section,
> you'll see the processing you can turn on and off.

Thanks! I did read it but I got a little confused and
thought it wasn't what I needed.:-)

Martin

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 08:52 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org