LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 07-30-2009, 05:41 AM   #1
Evstrati
LQ Newbie
 
Registered: Jan 2009
Posts: 24

Rep: Reputation: 0
Question Serial connection over Ethernet with C-Kermit


Hello,

here is a situation that I can't find a solution for.

I have a Sun server that could be only configured via serial interface. It has one serial port with a RJ 45 connector. Although my laptop has not serial interface. Is there a way to use C-Kermit or any software to establish a serial connection via the ethernet port. It should be some kind of virtual serial port that should transmit the information over the ethernet port, without encapsulating it in ethernet frames.

Any ideas?

Cheers
 
Old 07-30-2009, 07:59 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,763

Rep: Reputation: 719Reputation: 719Reputation: 719Reputation: 719Reputation: 719Reputation: 719Reputation: 719
You would still need someway to convert RS232 to ethernet. IMO it would be easier to purchase a USB serial port adapter. Most chipsets are supported.
 
Old 07-30-2009, 08:17 AM   #3
Evstrati
LQ Newbie
 
Registered: Jan 2009
Posts: 24

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by michaelk View Post
You would still need someway to convert RS232 to ethernet. IMO it would be easier to purchase a USB serial port adapter. Most chipsets are supported.
The serial port of the Sun machine is already with an ethernet (RJ 45) connector. It is a software problem, rather than a hardware one.

I am looking at socat right now as a possible solution, but still not sure how to manage it.

Cheers

Last edited by Evstrati; 07-30-2009 at 08:18 AM.
 
Old 07-30-2009, 08:56 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,763

Rep: Reputation: 719Reputation: 719Reputation: 719Reputation: 719Reputation: 719Reputation: 719Reputation: 719
Just because the serial port (RS-232) uses a RJ45 connector does not mean it is signal compatible with ethernet. Do you have any pinout information for the serial port?

edit: added typical pinout description.
http://www.w4rp.com/ref/pinouts_for_rj45_jacks.htm

RJ45 to DB9 pin adapter.
http://www.sealevel.com/product_deta...product_id=787

Last edited by michaelk; 07-30-2009 at 09:06 AM.
 
Old 07-30-2009, 11:11 AM   #5
Evstrati
LQ Newbie
 
Registered: Jan 2009
Posts: 24

Original Poster
Rep: Reputation: 0
It is an ordinary serial port. The only thing is that it is not an RS 232 port/connector, it is a RJ 45 one. It is not a hardware issue. My need is to
1) create virtual serial port on my machine
2) to bridge somehow the ethernet port of the machine and the virtual serial port, and then to use Kermit or minicom or any other serial line communication program to connect to my server.

regards

edit: when I have a computer with serial port, I use an ethernet to serial adaptor and plug it in the serial port of the computer and then it connects just well. At the moment I need to do this over the ethernet port -- no serial port on the laptop I use now.

Last edited by Evstrati; 07-30-2009 at 11:22 AM.
 
Old 07-30-2009, 11:44 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,763

Rep: Reputation: 719Reputation: 719Reputation: 719Reputation: 719Reputation: 719Reputation: 719Reputation: 719
If it is not a hardware issue then you need to provide some additional information. I am just trying to understand physically how you are going connect the serial port on the server to the laptop. It is not possible to connect an ethernet cable directly from the laptop ethernet port to the server's serial port. Do you have some type of ethernet to serial adapter?
 
Old 07-30-2009, 12:20 PM   #7
Evstrati
LQ Newbie
 
Registered: Jan 2009
Posts: 24

Original Poster
Rep: Reputation: 0
Ok, English is not my mother tongue, and maybe I explain it in a wrong manner. Sorry for that.

On the back of a Sun machine you have couple of interfaces. On this one there is 4 ethernet interfaces (0 to 3 with RJ45 connectors), one network management interface (a way to connect to the ALOM via network -- RJ 45 connector) and a serial management interface (another way to connect to the ALOM -- ***!!! also a RJ 45 interface, but it is a serial port and it is a serial connection !!!***

So I would like to user this last interface to set-up the Sun box. I connect a RJ 45 cable (as this is a RJ 45 connector even though it is a serial port) and at the other hand I plug the other part of the cable in the network plug of a laptop.

And that's all. Now I still need to capture all the info that comes through my ethernet port and pass it to Kermit, minicom, whatever. When I have a computer with a serial port, I use an adaptor from RJ 45 to RS232 in order to plug it in the serial port.

Is it more clear ? You could search on google images for "ser mgt" and you should see what it looks like.

regards

P.S. don't ask me why I don't use the network management interface It should be enabled via the serial connection...
 
Old 07-30-2009, 01:09 PM   #8
Evstrati
LQ Newbie
 
Registered: Jan 2009
Posts: 24

Original Poster
Rep: Reputation: 0
Part of the solution

Here is part of the solution:

1) socat creates a virtual serial port (/dev/pts/1) and a "bridge" between my ethernet port and and the virtual device

sudo socat -d -d PTY,raw,echo=0 interface:eth0

2) kermit connects to that virtual device and starts communicating with the Sun box over the virtual device

sudo kermit -l /dev/pts/1 -b 9600

There should be some additional settings, because now I only see some nasty characters, but the link is established. Will write here if I succeed with it. In the mean time if someone have ideas...

cheers
 
Old 07-30-2009, 01:14 PM   #9
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,134

Rep: Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456
Quote:
Originally Posted by Evstrati View Post
Here is part of the solution:

1) socat creates a virtual serial port (/dev/pts/1) and a "bridge" between my ethernet port and and the virtual device

sudo socat -d -d PTY,raw,echo=0 interface:eth0

2) kermit connects to that virtual device and starts communicating with the Sun box over the virtual device

sudo kermit -l /dev/pts/1 -b 9600

There should be some additional settings, because now I only see some nasty characters, but the link is established. Will write here if I succeed with it. In the mean time if someone have ideas...

cheers
Don't know if this will help you or not, but I've used these before, and have had very good luck with them.

http://www.connectivity.avocent.com/...network-based/

Plug it in to a network, and configure it. You can either telnet/ssh to it, and log into the serial port from there, or you can actually load a driver onto your box, and it'll see it as a serial port (like /dev/ttyS15, or whatever), and use it as a local device.
 
Old 07-30-2009, 01:57 PM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,763

Rep: Reputation: 719Reputation: 719Reputation: 719Reputation: 719Reputation: 719Reputation: 719Reputation: 719
Yes it is a hardware problem. You might get garbage but you can not directly connect a serial port to an ethernet port. Their signal interface is completely different. Ethernet is a differential signal and RS-232 is single ended. Voltage levels are completely different. Protocol is completely different.

As TBOne suggests you need to use a serial to ethernet converter, enable the network remote management interface or use a USB to serial port adapter.

Last edited by michaelk; 07-30-2009 at 02:13 PM.
 
Old 07-30-2009, 08:52 PM   #11
Suncoast
Member
 
Registered: Apr 2009
Location: Largo, Florida
Distribution: Slackware
Posts: 202

Rep: Reputation: 35
He is saying he wants to use the Linux software dev/pty to intercept the serial port and be able to access it over the LAN. I don't know why it wouldn't be possible on an existing system with Linux loaded, but I don't how you would do it.

To what TBOne suggested, another type of product I've used before is similar to this RS232 to TCP/IP adapter.

Last edited by Suncoast; 07-30-2009 at 08:59 PM. Reason: Link Correction
 
Old 07-31-2009, 05:50 AM   #12
Evstrati
LQ Newbie
 
Registered: Jan 2009
Posts: 24

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by michaelk View Post
Yes it is a hardware problem. You might get garbage but you can not directly connect a serial port to an ethernet port. Their signal interface is completely different. Ethernet is a differential signal and RS-232 is single ended. Voltage levels are completely different. Protocol is completely different.

As TBOne suggests you need to use a serial to ethernet converter, enable the network remote management interface or use a USB to serial port adapter.
Hello, it seems I had completely wrong understanding of the problem, thanks.

Last edited by Evstrati; 07-31-2009 at 05:53 AM. Reason: correction
 
  


Reply

Tags
bridge, ethernet, rs232, serial


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
how to change stdin, stdout & stderr in u-boot to ethernet from serial jynthms Linux - Newbie 1 04-01-2009 09:34 AM
2.6.x kernel debugging over ethernet (without serial connection) and reboot anitemp Linux - Kernel 2 02-25-2009 07:23 PM
serial to rj45 ethernet wrich Linux - Networking 3 10-11-2006 05:44 PM
Ethernet to Serial Terminal Echo andig Linux - Newbie 1 01-22-2006 05:25 PM
Ethernet to serial Terminal Echo on thin Client andig Linux - Software 0 01-19-2006 11:21 PM


All times are GMT -5. The time now is 09:43 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration