Serial Port Problems (Solved)

Dan D Niles dan at more.net
Tue Mar 6 21:54:29 UTC 2007


On Thu, 2007-03-01 at 15:27 -0600, Dan D Niles wrote:
> If I disconnect and come back later
> (sometimes), or if I hit return without entering a login name (always)
> it starts spitting out junk like:
> 
> nooo~:Woo{;>6(|uww~now~nou})|t}}t9- 

I found a solution, although I'm not sure why it works.

When you just hit enter getty goes back to the beginning of its loop.
This also happens if you enter a name starting with "-" or consisting of
just spaces.  These also causes the output to become garbled. 

At the beginning of the loop it calls setttymode(0).  If I insert a
sleep(1) before this call, everything works correctly.  If I insert the
sleep after that, the output still gets garbled.

Like I said, I don't know why it works, but it does.

I don't think a short delay is unreasonable after entering invalid or no
information.  I am going to submit a PR with a patch.

Dan





More information about the freebsd-questions mailing list