LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 04-18-2013, 01:20 AM   #1
keirvt
Member
 
Registered: Sep 2006
Location: Sydney Australia
Distribution: fedora/Ubuntu
Posts: 80

Rep: Reputation: 15
agetty over the network


I have friend that has terminals connected to a server that has terminal server cards. Time for that to go beside the terminal cards have lost the magic smoke. They don't want to rewire the premises with ethernet cable and we want to use the serial cabling and more or less existing serial software..

I bought an Advantek EKI 1521, that is an ethernet to serial converter. I would like to connect a Wyse style terminal to the EK 1521 and get a login session most likely converting the serial port traffic to network traffic.

Using wireshark I can see the EK and my test linux box are exchanging packets. Instead of a terminal I'm using a second linus machine and talking to the EK through its serial port using cutecom. I can sed characters to the EK and they display on cutecom or even simply cat /dev/ttyS0 shows characters sent using netcat on an appropriate port for the EK device

However I want a login session.

My question is how do I get agetty or mgetty to not address the serial port but instead create network traffic to a particular IP on a certain port(the EK) perhaps using something like netcat.

There is a network serial software called ser2net that allows network connections to be made to a serial port. This daemon listen on serial port where as I want mgetty to talk not to a serial port but to the network.
 
Old 04-18-2013, 01:43 AM   #2
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,466

Rep: Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213
I would say you missed a very important point. the serial interface gives you a very simple and straightforward connection to the box. You can reach and handle even a half-dead os using serial teminals. Using it over network has no real meaning. There are much better and advanced solutions available for example telnet or ssh can be used.
(but probably I missed something)
 
Old 04-18-2013, 08:33 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,763

Rep: Reputation: 719Reputation: 719Reputation: 719Reputation: 719Reputation: 719Reputation: 719Reputation: 719
From the manual the EK has a client mode whereby you can configure an IP address and port on the device. This might satisfy your requirements.
 
Old 04-21-2013, 04:32 PM   #4
keirvt
Member
 
Registered: Sep 2006
Location: Sydney Australia
Distribution: fedora/Ubuntu
Posts: 80

Original Poster
Rep: Reputation: 15
Need to replace the serial ports

Just go over it again.

There is a linux server with multiple serial ports and terminals attached to each serial port. The serial port card has died (digicard). In any event we would like to begin replacing the multiple serial connections with ethernet connections.

With the serial to ethernet converter EK 1521 characters on a serial line coming from a Wyse terminal characters are converted to ethernet and delivered to the server. I can see the packets with wireshark.

I want the server to respond to the ethernet connection with a login prompt and have this appear on the Wyse terminal. I'm simulating the Wyse on a second linux box using cutecom.

Can't use telnet because you need a telnet client one the serial (Wyse) end.

The program getty provides the login behaviour I want but only talks to a serial port and I want it to talk to a network connection.

Is there a way I can get this application (or some other similar application) to chat on a network connection?
 
Old 04-24-2013, 05:30 PM   #5
keirvt
Member
 
Registered: Sep 2006
Location: Sydney Australia
Distribution: fedora/Ubuntu
Posts: 80

Original Poster
Rep: Reputation: 15
Should work but needs work

I can listen to a terminal on the server using
netcat. So to see typing on the serial port of the remote machine I can use
Code:
nc -l 8701
where 8701 is the outgoing port I use on the serial to ethernet converter.
I can direct listened output into a file

I can send data back to the terminal using the designated import port 8702
Code:
echo "Some stuff"|nc 192.168.0.64 8702
where 192.168.0.64 is the IP of the ethernet converter

What I would like to do is
Code:
nc -l 8701 | bash | nc 192.168.0.64 8702
The idea being that listened data goes to a shell and the output from the shell is sent back to the terminal. The problem seems to be the bash or sh invocation not responding or sending back to the terminal through netcat.

I could write a Python program (because Python is the easiest) that listens on a port executes the OS command collects the output and sends back to the IP device but that is a a bit of effort and may not work anyway. Probably should be written in C or I could get the code for agetty and modify that which is a lot of work too.

Any suggestions?
 
  


Reply

Tags
ethernet


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
agetty password where jowa45 Linux - Newbie 3 02-07-2008 09:20 AM
Can't login through agetty :( emanresu Linux - Software 2 08-15-2006 01:27 AM
agetty hangs on 10.1 Barx Slackware 5 04-20-2005 08:16 PM
agetty slack66 Linux - Networking 0 01-03-2005 09:48 AM
disable agetty muhkuhmasta Slackware 2 07-15-2004 03:50 PM


All times are GMT -5. The time now is 01:41 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