LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   serial port terminal (https://www.linuxquestions.org/questions/linux-newbie-8/serial-port-terminal-147766/)

lectraplayer 02-18-2004 05:59 PM

serial port terminal
 
How would I go about having a serial port terminal on a Linux box? (hosting AND reading) I want to be able to do both (not necessarily at the same time) on a laptop or something along side some local BASH terminals that already exist. How would I go about setting one up? This would help sometimes as far as diagnosing some of those old UNIX networks I'm running into sometimes.

frieza 02-18-2004 06:28 PM

Also, if you didn't break it at least once while you're learning about it, did you really learn?
yes i've really learned....

in response to your question... first of all, what do you want to do with your serial port terminal? do you need command line only, or do you need it to be a node on your network.
for both cases you need a null modem cable or standard modem cable with a null modem adapter.
null modems can be bought here
http://www.pacificcable.com/NullModemAdapters.htm
if you don't already have one
once that is in place all you do is, for command line only add to your /etc/inittab file
something like this
S0:2345:respawn:/sbin/agetty /dev/ttyS0 19200 vt100 <-- terminal protocol to use
the breakdown
S0: a label for the computer to address the line
2345:the runlevels to have the terminal operative in
respawn: when agetty is killed, or you logout, restart agetty (make it persistant)
/sbin/agety: the program that opens the serial connection and presents the login prompt
/dev/ttyS0: the serial port to run the terminal on (replace this with yours S0 is com 1, S1 is com2 etc..)
19200: the baud rate, change this to something higher or lower number, must be a standard baud rate (9600, 19200, 28800, 33600 or 58600)
then simply set your other terminal emulator accordinly to baud rate and protocol (usually vt100)
for ppp networking put this in the /etc/inittab file
T0:2345:respawn:/usr/sbin/pppd 38400 /dev/ttyS1 noauth nodetach 192.168.36.9:192.168.36.10 local crtscts

where the ip addrs are loca.ip.for.interface:remote.ip.for.interface

and then set the ppp client appropriatly at the other end
good luck

lectraplayer 02-18-2004 08:50 PM

Thanks. :) I have the cables and everything. I was wanting a command line only anyway. You know these "dumb terminals" that used to be everywhere? They're just monitors and keyboards that get their instructions by hooking through miles of UTP to a serial port on a server or mainframe. This machine will appear on just about every one of these that has ever existed :p, so many of these will be variables. Any way to overcome this without editing my inittab each time I plug in? Any way to prompt for this stuff when switching to a (previously inactive) terminal?

Also, some of these things use a parallel port, how do I set something similar for a parallel port?

btw: login functions will usually be handled by the server I'm connecting to. :)

frieza 02-18-2004 09:34 PM

hmm, i'm not sure about the paralell port one, but many dumb terminals support vt100 emulation of some sort...

2damncommon 02-18-2004 10:00 PM

Are you sure it is a parallel port connection? Old VTs have connectors the size of a parallel connector, but it is a serial connection.

lectraplayer 02-19-2004 06:24 PM

You're right, I think the 25 pin (older style) serials are females, vs. the 9 pin males, isn't that right? Now that I think about it, I think that was a serial connection I saw on that dumb terminal unit I was looking at. :)

DrOzz 02-19-2004 06:26 PM

well lets put it this way :
if you physically see "pins" on the connector then its male
if its a connector type that pins insert into, then its female ...

frieza 02-19-2004 06:29 PM

no, the 25 pin serials are male.. the 25 pin parallels are female, remember, similar to mammalian organs, male have the pins, females have the holes :D

DrOzz 02-19-2004 06:31 PM

Quote:

similar to mammalian organs, male have the pins, females have the holes
hehe good analogy, i was trying to make one of the such but i couldn't think of something creative like that ;)

lectraplayer 02-19-2004 06:37 PM

The 9-pin serial has the pins, so it must be male according to that analogy, but you just said the 25 pin serial (which actually has holes and not pins) is the male. I'm getting so confused now.:confused:

...never mind. I must be smoking crack, because when I looked at the back of my PC, the printer port is what I was thinking about as far as the 25 pin serial port I was yapping about. It does have the pins for the 25 pin serial. It's what the paralell port isn't. Strangely, that's what was stuck on the back of that dumb terminal--a parallel port.

DrOzz 02-19-2004 06:38 PM

Quote:

but you just said the 25 pin serial (which actually has holes and not pins) is the male.
negative ...
lets put it this way if it has pins it is male and vice versa
no pins, no male ;-)

2damncommon 02-20-2004 12:21 AM

Quote:

Strangely, that's what was stuck on the back of that dumb terminal--a parallel port.
Make sure you are connecting to your PC's serial port at the male DB25 or the DB9, and not to your parallel port (female DB25).
http://www.tldp.org/HOWTO/Text-Termi...11.html#ss11.3

Just attach gender or size changers to a null-modem cable as needed. The null-modem has the DB9 connectors. Or roll your own. :)

What's the make and model of the terminal?
http://vt100.net/

lectraplayer 02-20-2004 07:27 PM

It was an IBM SmartWindow. Since I will be seeing this platform from time to time at my new job, I might as well build a tool to help me troubleshoot that vs. lugging around a big CRT-based dumb terminal when a Linux laptop will suffice nicely when properly set up. Also, I just wanna experiment with it. :)

Quote:

The 9-pin serial has the pins, so it must be male according to that analogy, but you just said the 25 pin serial (which actually has holes and not pins) is the male. I'm getting so confused now.
...now if I can just get off of the crack. :p

frieza 02-21-2004 12:25 PM

ok, serial ports can be both male or female, although usually on the back of a terminal or a computer they are male... on the back of a modem or other serial periferal, they are female...

lectraplayer 02-21-2004 06:07 PM

I guess that's so you can use an "extension" cord to interphase with it. I've noticed the same with my old modems. Maybe that's actually what that "parallel port" on that dumb terminal I saw was, but I also saw a regular serial port.


All times are GMT -5. The time now is 07:48 PM.