Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233
Rep:
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
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.
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.
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 ...
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.
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.
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233
Rep:
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...
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.