LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 04-17-2008, 08:22 AM   #1
matiasar
Member
 
Registered: Nov 2006
Location: Argentina
Distribution: Debian
Posts: 314
Blog Entries: 1

Rep: Reputation: 31
Serial to net? net2ser, sredird how-to or tutorial?


Hello!

At job I'm trying to make a system capable of sending a serial signal (rs-232 N81) over ethernet. The idea would be the following: At one extreme of circuit a serial signal gets into a linux box's serial port and it would be sent over ethernet. At the other extreme another linux box would receive and directs that signal to its original form, rs-232 9600 N81.


RS-232 Linux Box Linux Box RS-232
(9600 N,8,1)--> Serial Port --> Network --> Serial Port -->(9600 N81)


My first google reserchs took me to ser2net (serial to network proxy) and sredird.

Does anybody knows if those softwares would work for the task I'm planning?
I found man pages of both softs quite short. And I didn't find any tutorial or how-to. If anybody knows some I would appreciate very much.

Thanks in advance,
Matías
 
Old 04-17-2008, 08:50 AM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,592

Rep: Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559
It may work, but I dealt with the same thing here at my job, and used this:

http://www.connectivity.avocent.com/...sed/esp_16.asp

It works perfectly. We use the 16 port model, and are using 8 ports on a Windows server, and the other 8 on a Linux server. Once you load the software (comes with it, easy to install), you'll just be presented with more 'serial' ports. In this case, the actual serial devices are about 100 miles away, running over the LAN.

Saved us a bunch of time developing....just FWIW
 
Old 04-17-2008, 11:35 AM   #3
matiasar
Member
 
Registered: Nov 2006
Location: Argentina
Distribution: Debian
Posts: 314
Blog Entries: 1

Original Poster
Rep: Reputation: 31
RE: Serial to net? net2ser, sredird how-to or tutorial?

TBOne,

Thanks for such a fast response!
That hardware is good. May be it's too good for my application.

So, I tried net2ser: really seems to fit my needs. All traffic is redirected from network to serial rs-232 and viceversa.
By the way, it's simpler than I thought:

in the doc directory /usr/share/doc/ser2net/examples there is an example of net2ser.conf, the one and only config file. A couple of minutes later, was working.

Now I'll see if I can setup a ssh tunnel to send those data over internet.

Regards,
Matías
 
Old 04-17-2008, 12:33 PM   #4
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,592

Rep: Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559
Quote:
Originally Posted by matiasar View Post
TBOne,

Thanks for such a fast response!
That hardware is good. May be it's too good for my application.

So, I tried net2ser: really seems to fit my needs. All traffic is redirected from network to serial rs-232 and viceversa.
By the way, it's simpler than I thought:

in the doc directory /usr/share/doc/ser2net/examples there is an example of net2ser.conf, the one and only config file. A couple of minutes later, was working.

Now I'll see if I can setup a ssh tunnel to send those data over internet.
Shouldn't be a problem...there's tons of documentation on the 'net about setting up SSH tunnels. And you're very welcome for the response...that little black box has worked great for us for several years, so I can't complain.

I've never played with net2ser, though...might have to give it a look.

Take care.
 
Old 08-03-2008, 04:40 PM   #5
Avonturier
LQ Newbie
 
Registered: Aug 2008
Posts: 1

Rep: Reputation: 0
Hello Matías,

Did you succeed in your first idea rs232- linux -lan- linux- rs232 over ssh tunnel?
If so can you give an example how to configure this. I need the same solution to monitor an inverter for a school in Mali (west africa) I have been googling for some hours, but don't find nice examples.. Very much telnet examples, but I'm stuck with a windows program on a laptop, than need to connect to serial on the linux server which has the ssh tunnel till the school in africa with another little linuxserver to rs232 connecting to the inverter with serial interface.... I might use openwrt as there is ser2net included. that is more my budget... the mentioned device in this post is nice but very expensive for hobby use... I found the manual of ser2net and how to connect to a tcp poort with telnet, but no example configuration of a full link between two servers rs232 - lan - rs232 So a virtual simple long rs232 cable...

please share your example if possible. It would be greatly appreciated.

Anco,
 
Old 08-04-2008, 11:57 AM   #6
matiasar
Member
 
Registered: Nov 2006
Location: Argentina
Distribution: Debian
Posts: 314
Blog Entries: 1

Original Poster
Rep: Reputation: 31
Dear Anco,

Finally I didn't make the final implementation of that project. Because the institution with which I was doing that project didn't want to change the actual solution (using old external asyncronicous modem over analog direct lines)...
Despite that, I did some tests with ser2net and it worked perfectly for what I needed. Unfortunatly I don't have with me both linux boxes I used for those tests.
I think you could do some tests. ser2net is not very popular, so isn't easy to find info about it doing some research in google.
But Net2ser come with all the info needed in its documentation.

Configuration file: /etc/ser2net.conf is well documented and has some examples.
And I think is really usefull the examples in:

/usr/share/doc/ser2net/examples/ser2net.conf

All you have to choose is a port number, select the rs-232 /dev/ttySn to use and its speed.

I think the best you could do is start from the simplest and then go on. I'd test ser2net without ssh tunneling, and once it's ok I'd continue setting the tunnel. That's what I did those days.
Finally I didn't test it with ssh tunneling because I did the test over my lan. But it's possible to find a lot of info about ssh tunneling over the internet. I think once ser2net is configured it's just a matter of time to add ssh funcionality.


Well, hope it helps. Goog luck!
Matías
 
Old 08-06-2008, 06:32 PM   #7
derek_ou
LQ Newbie
 
Registered: Aug 2008
Posts: 3

Rep: Reputation: 0
where to get net2ser

Hi, Matías,

Thanks for sharing your experience. I am wondering where can I get net2ser? ser2net can be found from the Linux package. But I can't find net2ser anywhere.

Thanks,
Derek
 
Old 08-06-2008, 08:42 PM   #8
matiasar
Member
 
Registered: Nov 2006
Location: Argentina
Distribution: Debian
Posts: 314
Blog Entries: 1

Original Poster
Rep: Reputation: 31
Hi Derek,

After writing my post I realized I had made a mistake whit ser2net package name.
You're right, the package is ser2net. In my previous post I was talking about ser2net when I wrote "net2ser"...
I apologize for the confusion.

If you are going to do something with ser2net please tell us about your results.

Regards,
Matías
 
  


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
PHP-MySQL tutorial and Linux Networking tutorial needed Please dlux45 Linux - Software 6 04-19-2010 01:10 PM
Using USB<->Serial and serial gender changer to transmit data between computers JoeyAdams Linux - Hardware 4 04-17-2008 05:15 AM
LXer: Tutorial: An Easy Tutorial on IP Tables and Port Knocking LXer Syndicated Linux News 0 02-04-2008 04:20 PM
RH doesn't detect my Serial modem connected to a PCI Serial card ricky_ds Linux - Hardware 1 08-17-2006 02:37 PM
Tutorial: Installing Debian, net installer, DSL, x86 machiner Debian 4 04-25-2005 03:39 PM


All times are GMT -5. The time now is 01:45 AM.

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