Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 May 2010 22:36:13 -0700
From:      Mayo Jordanov <mayo@oyam.ca>
To:        Garrett Cooper <yanefbsd@gmail.com>
Cc:        remko@freebsd.org, freebsd-bugs@freebsd.org
Subject:   Re: kern/147082: [uart] Serial ports unusable
Message-ID:  <28327E98-2893-4595-947E-E669CE01A7EA@oyam.ca>
In-Reply-To: <AANLkTiksnVef6o59_AV3fWls3atgy7BYjehEmfTl0qM2@mail.gmail.com>
References:  <201005261942.o4QJgacx011479@freefall.freebsd.org> <008FD1A4-F1AB-4683-A3A6-6EAA3C0AECED@oyam.ca> <AANLkTil7Y_Yb500zXHilLvHlmpRfDMaJZP_UffNURKmk@mail.gmail.com> <7353B9CB-BAEF-4A7E-9C89-6B46227DF779@oyam.ca> <AANLkTiksnVef6o59_AV3fWls3atgy7BYjehEmfTl0qM2@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On 2010-05-26, at 21:46 , Garrett Cooper wrote:

> On Wed, May 26, 2010 at 8:01 PM, Mayo Jordanov <mayo@oyam.ca> wrote:
>>=20
>> On 2010-05-26, at 19:34 , Garrett Cooper wrote:
>>=20
>>> On Wed, May 26, 2010 at 6:42 PM, Mayo Jordanov <mayo@oyam.ca> wrote:
>>>>=20
>>>> On 2010-05-26, at 12:42 , remko@FreeBSD.org wrote:
>>>>=20
>>>>> Synopsis: [uart] Serial ports unusable
>>>>>=20
>>>>> State-Changed-From-To: open->feedback
>>>>> State-Changed-By: remko
>>>>> State-Changed-When: Wed May 26 19:42:36 UTC 2010
>>>>> State-Changed-Why:
>>>>> I send my working serial line to Mayo, set status to feedback
>>>>>=20
>>>>> http://www.freebsd.org/cgi/query-pr.cgi?pr=3D147082
>>>>=20
>>>> I'm gona re-reply here, to preserve the history.
>>>>=20
>>>>>>> How-To-Repeat:
>>>>>> 1) Edit /etc/ttys, do the ttyu0 line reads:
>>>>>> ttyu0        "/usr/libexec/getty std.9600"   vt100   on secure
>>>>>> 2) kill -HUP 1
>>>>>> 3) Try connecting to it with terminal application
>>>>>=20
>>>>>=20
>>>>> /etc/ttys
>>>>> console    "/usr/libexec/getty Pc"         cons25  on  secure
>>>>>=20
>>>>> /boot/loader.conf
>>>>> console=3D"comconsole"
>>>>>=20
>>>>> That enabled serial access to my Soekris device running on =
FreeBSD8(PFsense), it also works for several remote machines I have.
>>>>>=20
>>>>> Can you confirm that you have these settings in loader.conf and =
rebooted?!
>>>>>=20
>>>>> --
>>>>> /"\   Best regards,                        | remko@FreeBSD.org
>>>>> \ /   Remko Lodder                      | remko@EFnet
>>>>> X    http://www.evilcoder.org/    |
>>>>> / \   ASCII Ribbon Campaign    | Against HTML Mail and News
>>>>=20
>>>> test# cat /boot/loader.conf
>>>> console=3D"comconsole"
>>>>=20
>>>> looking at the /etc/ttys entry you pasted above, will that enable =
serial console? That looks like a regular console on the machine itself.
>>>>=20
>>>> I have rebooted numerous times, and I do get the kernel messages =
during boot on serial up to the point where getty starts (presumably... =
I see portion of the messages as nics are getting setup and then =
nothing).
>>>>=20
>>>> I have some machines where serial works fine, but I have some =
machines where it doesn't and behaves the same way as described above. =
If necessary, I can provide access to a troublesome machine.
>>>=20
>>>    All of this is described in more grusome detail at
>>> =
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/serialconsole-se=
tup.html
>>=20
>> Unfortunately, the handbook does not help in this case. If there is a =
solution to the problem I describe in the PR description in the =
handbook, please be so kind and point it out to me, because I must be =
blind.
>>=20
>> Also, why do the gettys get stuck and I have to kill them manually =
(or reboot because they can't be killed) to reflect changes to /etc/ttys =
instead of simple `kill -HUP 1`? I've never ever had to do it manually =
in previous FreeBSD installations/versions. Why are they stuck in ttydtd =
and not in ttyin as they are supposed to be?
>=20
>    The comconsole bit is in the section of /etc/ttys in the
> beforementioned page.
>    Details about debugging your connection is available here:
> http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/term.html .
> What's the baud rate for your serial connection?
>    The part about kill -HUP 1 not working sounds like a possible
> syscons/tty bug. Can you try killing init, then provide us with the
> wait state in ps/top for the relevant getty instance?
> Thanks!
> -Garrett

Sorry, I wasn't clear in my problem description above. I just said I =
modified loader.conf, intending that I added console=3D"comconsole".

I'm using 9600 baud. I've tried both 3wire and std connections, I don't =
get prompt with either, I'm sticking to 3wire for the time being.

After boot -- after I see interface configuration, daemons start, etc, =
right when I expect the "login:" prompt -- I get no login prompt and it =
takes about 3 minutes for it to show up. (This delay does not exist when =
I disable ttyd0.) SSHing in during those 3 minutes of delay, there are =
no gettys running. Once they do start, the states are:
    0  1220     1   0  45  0  6892  1300 ttyin  Is+   u0    0:00.01 =
/usr/libexec/getty 3wire.9600 ttyu0

(which seems right, but the terminal still misbehaves as described =
before)
Changing the ttyu0 line in /etc/ttys and `kill -HUP 1`:
    0  1252     1   0  44  0  6892  1300 ttyout SEs+  u0-   0:00.00 =
/usr/libexec/getty 3wire.9600 ttyu0

The reason I was mentioning uart is that I can't even get communication =
going between two ports (kermit to kermit, cu to cu, etc).

It is also worth noting, messages on console generated by kernel =
(plugging usb devices in/out, for eg.) _do_ make it over the serial =
console immediately as on normal console, but nothing else does work.

Thanks,
mayo




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?28327E98-2893-4595-947E-E669CE01A7EA>