LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 07-17-2004, 08:41 PM   #1
Toshi3
LQ Newbie
 
Registered: May 2004
Distribution: Red Hat 9
Posts: 20

Rep: Reputation: 0
Connect to a machine via a serial connection


Hi everyone,

I came over an old Sun server which is connected to my Linux box via a serial cable. The serial settings on the Sun machine are:

9600 baud
8 bit w/o parity and 1 stop bit

On my Linux box, the serial port is set to /dev/ttyS5.

How do I connect to the machine via this serial connection?

I don't have 'kermit' and I tired with 'agetty 9600 /dev/ttyS5' w/o any success.

I would greatly appreciate any help or suggestions,

Toshi
 
Old 07-17-2004, 09:29 PM   #2
osvaldomarques
Member
 
Registered: Jul 2004
Location: Rio de Janeiro - Brazil
Distribution: Conectiva 10 - Conectiva 8 - Slackware 9 - starting with LFS
Posts: 519

Rep: Reputation: 34
Are you using a modem or an standard serial port?
 
Old 07-18-2004, 01:07 AM   #3
Toshi3
LQ Newbie
 
Registered: May 2004
Distribution: Red Hat 9
Posts: 20

Original Poster
Rep: Reputation: 0
It's a standard serial port or more precise - a 16550 UART serial COM port.

Thanks,

Toshi
 
Old 07-18-2004, 07:06 PM   #4
osvaldomarques
Member
 
Registered: Jul 2004
Location: Rio de Janeiro - Brazil
Distribution: Conectiva 10 - Conectiva 8 - Slackware 9 - starting with LFS
Posts: 519

Rep: Reputation: 34
Well,
I don't know what are you trying to. Lets start by the first things first.
You have to connect your machines with a null modem cable. Basically, you need three wires in this cable: logical ground connecting both pins 7 of db25, pin 2 of one side connecting pin 3 of the other side and pin 3 of one side connecting pin 2 of the other side. All this description is for 25 pin connector. You may google with "null modem" between quotes. After having a cable be sure you have the you Sun port enabled for login and use minicom on the linux side to configure the port and open a session in the Sun. When you get this, you know that all the physical configuration is ok.
After this, I need to know if you want to just open a session in linux from the Sun, or want to establish a network connection. All this is possible, depending on the system software you have on the Sun machine.
 
Old 07-18-2004, 09:22 PM   #5
kevinalm
Member
 
Registered: Oct 2003
Location: Iowa
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288

Rep: Reputation: 30
There is a pretty good "Howto" on this at the LDP site. It's titled the "Serial Laplink" howto as I recall.
 
Old 07-18-2004, 10:17 PM   #6
Toshi3
LQ Newbie
 
Registered: May 2004
Distribution: Red Hat 9
Posts: 20

Original Poster
Rep: Reputation: 0
Thanks for your replies!

I attached a DB25->RJ45 adapter to the Sun machine and a DB9->RJ45 adapter to one of the COM ports on the Linux box. Finally, I connected the two machine with a RJ45 cable.

I tried minicom, but I wasn't able to get it to connect.

I installed kermit, but it still doesn't connect:

(/root/) C-Kermit>set line /dev/ttyS5
(/root/) C-Kermit>set speed 9600
/dev/ttyS5, 9600 bps
(/root/) C-Kermit>set parity none
(/root/) C-Kermit>set stop-bits 1
(/root/) C-Kermit>set carrier-watch off
(/root/) C-Kermit>connect
Connecting to /dev/ttyS5, speed 9600
Escape character: Ctrl-\ (ASCII 28, FS): enabled
Type the escape character followed by C to get back,
or followed by ? to see other options.
----------------------------------------------------

nothing happens after this - the connection is never established...

Is there something I'm missing? or is it some hardware/driver issue?

Toshi
 
Old 07-18-2004, 10:19 PM   #7
Toshi3
LQ Newbie
 
Registered: May 2004
Distribution: Red Hat 9
Posts: 20

Original Poster
Rep: Reputation: 0
By the way, I want to bring up the Sun machine's console (doesn't have local graphical console).

Toshi
 
Old 07-19-2004, 02:16 AM   #8
osvaldomarques
Member
 
Registered: Jul 2004
Location: Rio de Janeiro - Brazil
Distribution: Conectiva 10 - Conectiva 8 - Slackware 9 - starting with LFS
Posts: 519

Rep: Reputation: 34
It's your physical connection. Both the machines may have transmit connected to th transmit of the other and receive connected to receive of the other. Look for "null cable".
 
Old 07-19-2004, 03:53 PM   #9
Toshi3
LQ Newbie
 
Registered: May 2004
Distribution: Red Hat 9
Posts: 20

Original Poster
Rep: Reputation: 0
Ok, I see. So I need somekind of cross-over cable? or can set some parameter in Kermit?

Thanks,

Toshi
 
Old 07-19-2004, 04:04 PM   #10
osvaldomarques
Member
 
Registered: Jul 2004
Location: Rio de Janeiro - Brazil
Distribution: Conectiva 10 - Conectiva 8 - Slackware 9 - starting with LFS
Posts: 519

Rep: Reputation: 34
Yes, Mr. this is another name the "null-modem" cable is known.
 
Old 07-19-2004, 04:47 PM   #11
Toshi3
LQ Newbie
 
Registered: May 2004
Distribution: Red Hat 9
Posts: 20

Original Poster
Rep: Reputation: 0
Thanks.

I am using null-modem cable. I tried with a standard cable and a null-modem cable, but neither worked. I also tried to connect to another device I have w/o success (I know I was able to connect to it using Windows' hyper terminal before). Any ideas?

I would appreciate any suggestion, advice, ideas...

Toshi
 
Old 07-19-2004, 05:31 PM   #12
kevinalm
Member
 
Registered: Oct 2003
Location: Iowa
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288

Rep: Reputation: 30
Here's a link to the howto I posted about earlier. It's all about exactly what you're attempting.

http://tldp.org/HOWTO/Serial-Laplink-HOWTO/
 
Old 07-19-2004, 05:51 PM   #13
Toshi3
LQ Newbie
 
Registered: May 2004
Distribution: Red Hat 9
Posts: 20

Original Poster
Rep: Reputation: 0
Thanks,

That link is for setting up a PPP connection between a Windows box and a Linux box. I want to set-up a ASCII terminal and bring up the Sun machine's console.

Toshi
 
Old 07-19-2004, 07:07 PM   #14
Toshi3
LQ Newbie
 
Registered: May 2004
Distribution: Red Hat 9
Posts: 20

Original Poster
Rep: Reputation: 0
I tried Windows' hyper terminal and it worked w/o any problems...?!? Perhaps I need to set some parameter in Kermit which Windows sets automatically...? In windows I just set the baud rate, parity, data bits and stop-bits, and pressed 'ok'...

Maybe it's a driver issue in Linux even though 'setserial -a' produce a nice output...

Toshi
 
Old 07-19-2004, 07:40 PM   #15
osvaldomarques
Member
 
Registered: Jul 2004
Location: Rio de Janeiro - Brazil
Distribution: Conectiva 10 - Conectiva 8 - Slackware 9 - starting with LFS
Posts: 519

Rep: Reputation: 34
You have to set some parameters. Your serial is waiting for modem signaling. Try
Code:
stty clocal </dev/ttyS5
This command will tell the serial driver this is a local port.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
ssh connection from a Windows machine to a Linux machine pistachio Linux - Networking 1 08-30-2005 11:45 AM
Connect to a serial port??? clausa Linux - Hardware 2 08-30-2005 08:11 AM
Samba: can't connect to my local linux machine but can connect to windows. Royle Linux - Networking 3 01-18-2005 06:32 PM
Find Serial Number of Machine zael Programming 4 10-27-2003 01:39 PM
Linux serial-connect to SCO Unix mattooo Linux - General 2 10-25-2003 09:16 PM


All times are GMT -5. The time now is 01:20 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration