Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Mar 1999 02:03:25 -0600 (CST)
From:      James Wyatt <jwyatt@RWSystems.net>
To:        E-Mail Admin <techexp@usa.net>
Cc:        freebsd-isp@FreeBSD.org
Subject:   Re: PC as terminal direct wired via serial port?
Message-ID:  <Pine.BSF.4.05.9903010026230.3300-100000@kasie.rwsystems.net>
In-Reply-To: <19990228222337.1549.qmail@nw171.netaddress.usa.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 28 Feb 1999, E-Mail Admin wrote:
> Okay. I wanted to direct-connect a 386 PC via a null modem cable (see
> FBSD Handbook section 14.2.2.1 Cables) connected to the com1 (db-25) PC
> serial port (at 2400Bd according to the MSD diagnostic Utility) and
> connected to the third serial port of the digiboard octopus cable
> (db-25). I am using qmodem 4.6 comm s/w configured as vt100 at 2400Bd
> 8,n,1, but I cannot get any screen on the PC, not even if I switch term

I like to cut problems in half and see which end still wiggles... 8{)

Summary: Before you try logging-in, you might ensure the port is found by
the kernel, dmesg should show all sios you think are there, and the wiring
is correct. You should have, at least, a decent serial program on each end
to test the link.

Tool 1: (I know you have a RS-232 tester, but for others) Radio Shack has
a *great* "RS-232 Mini-tester" which shows the signals on red/green LEDs.
It finds cable and driver setup bugs quickly. You might find it elsewhere,
but they have it and it saves hours and hours.

Make sure to use a null-modem cable: It has to pass signal ground (7) as
well as swap the TD(2)/RD(3) data pins. It should also swap DTR(20)/DCD(8)
for port-control and RTS(4)/CTS(5) pins for flow-controll. If port-control
doesn't work, cuaa devs (/dev/cuaa3) will work, but tty devs may not
(/dev/ttyd3). If flow-control doesn't work, you may lose pieces of data.
An inline mini-tester should show *all* LEDs lit - color doesn't matter
yet. If it doesn't, you don't have the right cable. You seem to have the
right cable.

Ensure the port exists and is configured correctly. The generic kernel
defaults to sio2 = COM3, IRQ5 and sio3 = COM4, IRQ 9, but leaves them
disabled. Make sure the board is jumpered properly and (please!) do not
reuse IRQ3 or 4 from COM1 or 2. Does dmesg show the port enabled and with
the correct IRQ?

Tool 2: If you aren't familiar with the 'cu' command, install the minicom
package it will help you work with serial ports. It is easy to configure
and generally useful for users at all levels. (nothing personal...) Looks
Procomm-esque and allows you to limit users to specific ports. (shell
users can't configure the router, no one can attach to 1-wire LAN port or
X-10 port, all can use outbound fax modem, etc...)

You are ready to talk: Fire-up the comm programs (minicom, hyperterm, etc)
on each end and watch which LEDs turn green with which program. If you set
them to 2400b, you should see the data (TD/RD) LEDs blink. You may not see
chars you type on your screen, but they should still go to the other. If
you're easily amused, quickly send a large text file to the other screen
and watch the flow-control (RTS/CTS) LEDs blink as it regulates the flow.
If the ttys can not talk, try using the cua device (/dev/cuaa3) to see if
port-control is broken. If you can't fix the cable, connect DSR, DCD, and
DTR together on each end. You may have to connect CTS to RTS on each end,
but that will force you to use software flow-control.

Please log in: Your example below should work. You said the getty process
shows up in 'ps -axuw', so you did the needed 'kill -HUP 1' or reboot
after editing /etc/ttys. (fwiw: You're right, FreeBSD getty should be as
good as mgetty for this.) Unfortunately, the proces will exist even if
it's port does not, but there will a complaint from getty in the
/var/log/messages file listing the port. My typos usually show-up here...

> ttyd3   "/usr/libexec/getty std.2400"   vt100 on secure

btw: I would drop the 'secure' if it's not needed, bad habit later if you 
install remote termnials.

If you are going to install terminals some distance from the port or at
higher speeds, you should consider an inexpensive line driver. RS-232
degrades into a flakey mess with poor cable placement, distance, speed,
etc... Almost anyone is cheaper than BlackBox for these, but they have
them.

If you have problems in vi or other curses (screen based) programs, here
is where the terminal type comes-in. Getty does not care about your
terminal type. Myperterm is something like ANSI or vt100, but not quite
right. Qmodem's was a pretty good vt100, IIRC.

> An e-mail reply would be preferred.

Done, though I sent it to the list if anyone else could use the info. (Did
I cover anything not in the FAQs?) This is a bit off-topic for freebsd-isp
unless you are letting others access via lynx on ttys, though.

> P.S.  what da heck is ttyh0?  MAKEDEV wont make it but it appears in the
> man page for ttys under v2.2.8.

My guess is that it looks like some kind of remote serial concentrator.



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9903010026230.3300-100000>