Re: Serial Port Problems (Solved)

2007-03-16 Thread Dan D Niles
On Fri, 2007-03-16 at 11:16 -0400, David Robillard wrote:

> That being said, I checked /usr/src/libexec/getty/main.c to find out
> how to recreate your fix. But I'm not a huge C programmer, so I tried
> other ways to solve this.

I submitted a bug report and patch, but it has not been accepted yet.
I'm not even sure that it has been reviewed.  I'll attach my patch to
this message.

> That brought me to gettytab(5) which says that the "de" field controls
> the "delay secs and flush input before writing first prompt" as the
> man page puts it.

This puts a delay before the first prompt but not the prompts after
entering a null login name or other invalid input.   It could help if
you were having problems with garbled output all the time not just after
invalid input.  If  that is the case, you probably need to set de and
use my patch.

Dan


--- libexec/getty/main.c.orig   Tue Mar  6 15:55:35 2007
+++ libexec/getty/main.cTue Mar  6 15:58:06 2007
@@ -295,6 +295,8 @@
/* remove any noise */
(void)tcflush(STDIN_FILENO, TCIOFLUSH);
}
+   if (!first_sleep)
+   sleep(1);
first_sleep = 0;
 
setttymode(0);
@@ -376,6 +378,7 @@
continue;
if (name[0] == '-') {
puts("user names may not start with '-'.");
+   oflush();
continue;
}
if (!(upper || lower || digit)) {
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: Serial Port Problems (Solved)

2007-03-16 Thread David Robillard

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.


I have the same behavior as you do on some machines here. But I
originally thought it was caused by the (old) serial port card I used
to build a serial console server.

The card is an EasyIO PCI 8-port card from Stallion Technologies as
suggested by Gregory Bond's article "Console Server" from
http://www.freebsd.org/doc/en_US.ISO8859-1/articles/console-server/index.html
(BTW, don't buy this card today because it's driver was not ported
from FreeBSD 4.x to neither 5.x nor 6.x.)

That being said, I checked /usr/src/libexec/getty/main.c to find out
how to recreate your fix. But I'm not a huge C programmer, so I tried
other ways to solve this.

That brought me to gettytab(5) which says that the "de" field controls
the "delay secs and flush input before writing first prompt" as the
man page puts it.

So I changed a test machine's gettytab default entry from:

default:\
   :cb:ce:ck:lc:fd#1000:im=\r\n%h (%t)\r\n\r\n:sp#1200:\
   :if=/etc/issue:

To:

default:\
   :cb:ce:ck:lc:fd#1000:im=\r\n%h (%t)\r\n\r\n:sp#1200:\
   :if=/etc/issue:de=2:

And restarted (not sure if a reboot is necessary here?). I had to
fiddle a bit with the delay, but it did help.

HTH,

David
--
David Robillard
UNIX systems administrator & Oracle DBA
CISSP, RHCE & Sun Certified Security Administrator
Montreal: +1 514 966 0122
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Serial Port Problems (Solved)

2007-03-06 Thread Dan D Niles
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



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Serial Port Problems

2007-03-04 Thread Tom Judge

Dan D Niles wrote:

More Dell 2950 woes.

I use serial ports to manage my FreeBSD machines remotely.  I've never
had any problems until now.  I've installed FreeBSD 6.2 on a Dell 2950.

The install goes without problems over the serial port.  After the
reboot, I get the typical:

FreeBSD/i386 (test.host.net) (ttyd0)

login:

and I can log in just fine.  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 can log in blind, but everything is scrambled.  Here is what I see
after logging in:

nooo~:ro}Zqsswv~?Nmswtl~:t|}}msr 1115?;5>:3ontt}}t=Koy{{oo|
t(kk)19;??2077t|mefvwgSWdproogw~/Koy{{oo|
t(kk)17?=,1998<,199;?=99>>,1998<,199<,1999=,199;>,19;?,199==*  t|
merwggo~wsoot|meuowws{}}ofccmmoo~oio.lllr{oo|
wsrwen/NvwegSWd.>?WMMESWe({_]p#3::fv{ijkon1331;:5?;30uUWc227?_wmooometovwegSWe-Jggvwesweokoogtugkikcmlswupv|,puesweuwwet|mefogrwwwsg?oo
 swgww{}taev{{mwsaonuuteuuedewrsuuannomu}oonforlllrwmmeswwsaswo*  
auth|ttz?/wnvwegSWnowo~mesww/--amwyycoow}|tt|meeWSUUaswgw}ooo* 
forywrrwmmessfo{swtassi}wwspteuuedfvwuuuo~}/oo 
t|mehiefoookaondfGQqdgw}mo~wsasweauz?/wwnvwegFnowo/aonl-* 
amooogw}|ht|meaimmooglm{ww,conbgeswesskmedbbggto*  h|tz?/wwnvwegSowowessko/. 
fft|medoocdm{wvrwu}oonhis*  
eeoniowumlmel,hm}wweamoawwmmcnmefomutuemon/ws{iswoogo/Kofyusw|llhiwweaaquuwwonorpronmmm,lmeswetukoet|meuutuutooojuomm-mg/,amooogw}taoyrwmmwwo~tewrmmwssggw,aedemmimli}}kss
 quuww}oontot|hquuww}oosFvwewWnowgmmimmoogi{w~. 
iofyuasngisrwihfvwegSWgwsdm{sw{ylmyu|,pueswerwggwrtotuehimwz??-omo}lpqggo. 
iofyuswenotfgiaw}|hmmoumlpqew,t}yue`mmonmoo//[ummyylouwwes{{{ow|ll89)torwmmo~vrt|meiowumlmuonaonmkoonoowuu}oonuu}mm}}.eem}t/ouwoootdoockiooget|i{slooonaonoogmmon/~uwww#

If I exit things go back to normal until I disconnect for a while or hit
return without a login name.

I tried loading an older FreeBSD to see if it was a hardware issue or a
FreeBSD issue, but my disks (mfi) aren't supported.

It seems like the speed of the tty is getting out of sync.

HELP! Any ideas?  


Thanks,

Dan


We have some PE2950's setup with serial consoles using IPMI over LAN. 
If you set the port in the BIOS to com2 and 57600 bps then you should be 
able to use ipmitool to access the console.  If you set the device hints 
correctly you will be able to have FreeBSD use this port as a serial 
console.


Tom


Tom
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Serial Port Problems

2007-03-02 Thread Mike Tancsa
On Thu, 01 Mar 2007 15:27:19 -0600, in sentex.lists.freebsd.questions
you wrote:

>
>More Dell 2950 woes.
>
>I use serial ports to manage my FreeBSD machines remotely.  I've never
>had any problems until now.  I've installed FreeBSD 6.2 on a Dell 2950.
>
>The install goes without problems over the serial port.  After the
>reboot, I get the typical:
>
>FreeBSD/i386 (test.host.net) (ttyd0)
>
>login:
>
>and I can log in just fine.  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:
>


I get similar strange results as well on Server Works BIOS based
machines.  I usually talk to them through a pm25.  For me, I have to
make sure flow control is off on both ends (no software, no hardware).
Also, login gets confused if you start with an enter for some reason.
I can generally recover from this seemingly hung state with a bunch of
CTRL+d's.  Not sure if it will help you, but the symptons are somewhat
like what I see.

Whats odd is that it all works just fine from the loader prompt and if
I boot into single user mode.  But soon as getty/login take over, its
very picky.

---Mike

Mike Tancsa, Sentex communications http://www.sentex.net
Providing Internet Access since 1994
[EMAIL PROTECTED], (http://www.tancsa.com)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Serial Port Problems

2007-03-02 Thread Dan D Niles
On Fri, 2007-03-02 at 01:33 -0800, Ted Mittelstaedt wrote:
> - Original Message - 
> From: "Dan D Niles" <[EMAIL PROTECTED]>
> To: 
> Sent: Thursday, March 01, 2007 1:27 PM
> Subject: Serial Port Problems
> 
> 
> >
> > More Dell 2950 woes.
> >
> > I use serial ports to manage my FreeBSD machines remotely.  I've never
> > had any problems until now.  I've installed FreeBSD 6.2 on a Dell 2950.
> >
> > The install goes without problems over the serial port.  After the
> > reboot, I get the typical:
> >
> > FreeBSD/i386 (test.host.net) (ttyd0)
> >
> > login:
> >
> > and I can log in just fine.  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:
> >
> 
> Get a cheapie pci serial port card, plug it in, and see if it works any
> better
> 
> Ted

I use console redirection to have access to the BIOS over the serial
port.  Can I redirect console output to a pci card?



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Serial Port Problems

2007-03-02 Thread Ted Mittelstaedt

- Original Message - 
From: "Dan D Niles" <[EMAIL PROTECTED]>
To: 
Sent: Thursday, March 01, 2007 1:27 PM
Subject: Serial Port Problems


>
> More Dell 2950 woes.
>
> I use serial ports to manage my FreeBSD machines remotely.  I've never
> had any problems until now.  I've installed FreeBSD 6.2 on a Dell 2950.
>
> The install goes without problems over the serial port.  After the
> reboot, I get the typical:
>
> FreeBSD/i386 (test.host.net) (ttyd0)
>
> login:
>
> and I can log in just fine.  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:
>

Get a cheapie pci serial port card, plug it in, and see if it works any
better

Ted

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: serial port problems

2002-09-18 Thread Nathan Kinkade

On Wed, 18 Sep 2002 23:15:39 -0400
<[EMAIL PROTECTED]> wrote:

> Hi,
> 
> My machines lock up whenever I access the com1
> ports. One machine is a desktop gateway & the other a thinkpad 600E.
> The lockup is complete, including the second hand on the xclock
> display.
> 
> Both machines running 4.6.
> 
> Suggestions?
> 
> Thanks. Kent

Sounds a little like an IRQ/IO conflict.  Is this an onboard serial
port?  If it is an onboard serial port, do you have any other "COM"
devices installed in the machine - such an an internal modem?

Nathan


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message