LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-18-2004, 05:59 PM   #1
lectraplayer
Member
 
Registered: Mar 2003
Location: a little west of Birmingham, AL, USA.
Distribution: Porteus 3.1
Posts: 934

Rep: Reputation: 32
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.
 
Old 02-18-2004, 06:28 PM   #2
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
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

Last edited by frieza; 02-18-2004 at 06:34 PM.
 
Old 02-18-2004, 08:50 PM   #3
lectraplayer
Member
 
Registered: Mar 2003
Location: a little west of Birmingham, AL, USA.
Distribution: Porteus 3.1
Posts: 934

Original Poster
Rep: Reputation: 32
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 , 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.
 
Old 02-18-2004, 09:34 PM   #4
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
hmm, i'm not sure about the paralell port one, but many dumb terminals support vt100 emulation of some sort...
 
Old 02-18-2004, 10:00 PM   #5
2damncommon
Senior Member
 
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,918

Rep: Reputation: 103Reputation: 103
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.
 
Old 02-19-2004, 06:24 PM   #6
lectraplayer
Member
 
Registered: Mar 2003
Location: a little west of Birmingham, AL, USA.
Distribution: Porteus 3.1
Posts: 934

Original Poster
Rep: Reputation: 32
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.
 
Old 02-19-2004, 06:26 PM   #7
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 60
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 ...
 
Old 02-19-2004, 06:29 PM   #8
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
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

Last edited by frieza; 02-19-2004 at 06:36 PM.
 
Old 02-19-2004, 06:31 PM   #9
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 60
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
 
Old 02-19-2004, 06:37 PM   #10
lectraplayer
Member
 
Registered: Mar 2003
Location: a little west of Birmingham, AL, USA.
Distribution: Porteus 3.1
Posts: 934

Original Poster
Rep: Reputation: 32
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.

...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.

Last edited by lectraplayer; 02-19-2004 at 06:40 PM.
 
Old 02-19-2004, 06:38 PM   #11
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 60
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 ;-)
 
Old 02-20-2004, 12:21 AM   #12
2damncommon
Senior Member
 
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,918

Rep: Reputation: 103Reputation: 103
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/
 
Old 02-20-2004, 07:27 PM   #13
lectraplayer
Member
 
Registered: Mar 2003
Location: a little west of Birmingham, AL, USA.
Distribution: Porteus 3.1
Posts: 934

Original Poster
Rep: Reputation: 32
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.

Last edited by lectraplayer; 02-20-2004 at 07:30 PM.
 
Old 02-21-2004, 12:25 PM   #14
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
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...
 
Old 02-21-2004, 06:07 PM   #15
lectraplayer
Member
 
Registered: Mar 2003
Location: a little west of Birmingham, AL, USA.
Distribution: Porteus 3.1
Posts: 934

Original Poster
Rep: Reputation: 32
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
linux serial port to router console port connection? frankie_fix Linux - General 3 02-26-2007 09:32 PM
Using serial port card(PCMCIA) with IPAQ running Linux, can't find ttyS0 port d2army Linux - Laptop and Netbook 0 11-12-2005 08:07 PM
Dumb terminal (non-telnet!!) via DB9 serial port WindsorKnot Linux - Newbie 8 09-12-2005 08:47 PM
serial port (ttyS1) - Sending commands via terminal... HELP!!! Nalorin Linux - Networking 2 08-21-2005 10:22 PM
Terminal on serial port sourceman Linux - General 0 08-06-2002 04:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration