LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-03-2007, 06:51 AM   #1
Thakowbbery
Member
 
Registered: Mar 2005
Posts: 138

Rep: Reputation: 17
How to connect to switch console port using Linux?


Greetings

Iīve been trying for quite some time now to connect to a switch console port using a linux notebook (itīs a serial to RJ-45 cable).

Iīve tried both Kermit-C and Minicom, but none seen to work. Here is what Iīve done:

Kermit-C:

set line /dev/ttyS0
set flow-control /direct-serial none
set parity none
set stop-bits 1
set serial 8N1
set speed 9600

When I type connect, I receive the following message:

Connecting to /dev/ttyS0, 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.
?Carrier required but not detected.
****************************
Hint: To CONNECT to a serial device that
is not presenting the Carrier Detect signal,
first tell C-Kermit to:

SET CARRIER-WATCH OFF

****************************

When I do as it says, and type īSET CARRIER-WATCH OFFī, followed by connect again, I receive the same message, but without the Hint part, and it stays there. Then Iīm obligated to use the old "kill -9" to unstuck my kermit.


Minicom:

At its main menu, I call "O", for Configure Minicom, and then I set:

Serial Device: /dev/ttyS0
Bps/Par/Bits: 9600 8N1
Hardware Flow Control: No

Then I save it as default.
Next I call "P", for Comm Parameters:

Speed: 9600
Parity: None
Stopbits: 1
8-N-1

Next is "Add Linefeed" (sometimes I do this part, sometimes I donīt, in the end itīs the same result).
Then I try "Initialize Modem" and then... thatīs where I stop, cause I donīt know how to continue :P
I tried also letter "K", Run Kermit, but nothing happened.

I checked with a Windows notebook (yack) using HyperTerminal and it worked fine. Iīd like to know what am I doing wrong
 
Old 01-03-2007, 10:52 AM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Your configuration looks okay, although I don't recognize the details of the line
Quote:
'set flow-control /direct-serial none'
I always just use
Code:
set flow none
Have you tried this as root? Perhaps the permissions on /dev/ttyS0 are not sufficient as a mortal user.
Minicom always seems to get in the way for direct serial applications, as it seems to assume that a modem is present, and wants to initialize it. I know you can work around this, but I prefer C-Kermit for use as a comm's tool over serial links.

--- rod.
 
Old 01-03-2007, 11:42 AM   #3
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
Code:
alias minicom='/usr/bin/sudo /opt/local/bin/minicom -o'
Is what I did (minicom is probably in a different location on your system). Just make sure you do
Code:
$ sudo minicom -s
once first (before setting the alias) to select the correct serial device (and save the file as .dfl when it prompts). I think it defaults to /dev/modem. Use CTRL + A -> Q to quit. It will ask you if you're sure you want to quit w/o hanging up (yes).

After you save the config with the right serial device, and set the alias, you can just do
Code:
$ minicom
and it will prompt you for your password, then connect w/o trying to initialize the modem.

Last edited by chort; 01-03-2007 at 11:45 AM.
 
  


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
Linux router to 5 port switch (IP masquerading) hazmatt20 Linux - Networking 15 07-12-2006 04:23 PM
Linux compatible Manhattan 4 Port PS/2 KVM Switch? rioguia Linux - Hardware 3 02-25-2004 09:00 AM
How to connect to a switch via COM port ? CRego3D Linux - Networking 2 06-12-2003 01:11 PM
Best 10/100 Mbps 24 port switch for full duplex with Linux joeschmoe Linux - Networking 2 11-10-2001 09:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:26 PM.

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