stty echo in ash

Paul Fox pgf at brightstareng.com
Tue Aug 1 12:16:48 UTC 2006


rob wrote:
 > On Monday 31 July 2006 7:19 pm, David Byron wrote:
 > > On Monday 31 July 2006 11:49 am, Rob Landley wrote: 
 > > I grabbed the head of the source tree, configured and built it.
 > > 
 > > On my target, when I execute
 > > 
 > > ~ # stty raw -echo -ctlecho && nc -f /dev/ttyS0
 > > 
 > > what I type is still echoed to the screen, but when I hit enter I get a
 > > carriage return, no newline and no output, as though what I type isn't being
 > > treated as a command.  When I hit ctrl-c, I see a dot (.).  The way I got
 > > the shell back was to telnet in and kill it.
 > 
 > What are you talking to at the far end?
 > 
 > Yeah, you have to kill it from another console.  Netcat doesn't parse escape 
 > sequences.
 > 
 > > Feels like I'm missing something obvious.
 > 
 > Sounds like your shell is undoing what stty does.  Which shell are you using?

i missed the start of this thread, but the subject says he's using ash.

ash certainly plays with those tty settings, if command editing is
configured.  but it saves and restores what's there, and cmdedit_read_input()
shouldn't be called in the middle of this:
   # stty raw -echo -ctlecho && nc -f /dev/ttyS0
in any case.  so i think it should work as rob says.

that said, strace is probably your friend, if you have a working
copy for your platform.

paul
=---------------------
 paul fox, pgf at brightstareng.com



More information about the busybox mailing list