LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Serial connection over Ethernet with C-Kermit (https://www.linuxquestions.org/questions/linux-networking-3/serial-connection-over-ethernet-with-c-kermit-743879/)

Evstrati 07-30-2009 05:41 AM

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

michaelk 07-30-2009 07:59 AM

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.

Evstrati 07-30-2009 08:17 AM

Quote:

Originally Posted by michaelk (Post 3625432)
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

michaelk 07-30-2009 08:56 AM

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

Evstrati 07-30-2009 11:11 AM

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.

michaelk 07-30-2009 11:44 AM

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?

Evstrati 07-30-2009 12:20 PM

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

Evstrati 07-30-2009 01:09 PM

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

TB0ne 07-30-2009 01:14 PM

Quote:

Originally Posted by Evstrati (Post 3625750)
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.

michaelk 07-30-2009 01:57 PM

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.

Suncoast 07-30-2009 08:52 PM

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.

Evstrati 07-31-2009 05:50 AM

Quote:

Originally Posted by michaelk (Post 3625814)
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.


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