LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Serial to net? net2ser, sredird how-to or tutorial? (http://www.linuxquestions.org/questions/linux-software-2/serial-to-net-net2ser-sredird-how-to-or-tutorial-635992/)

matiasar 04-17-2008 08:22 AM

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

TB0ne 04-17-2008 08:50 AM

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

matiasar 04-17-2008 11:35 AM

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

TB0ne 04-17-2008 12:33 PM

Quote:

Originally Posted by matiasar (Post 3124289)
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.

Avonturier 08-03-2008 04:40 PM

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,

matiasar 08-04-2008 11:57 AM

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

derek_ou 08-06-2008 06:32 PM

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

matiasar 08-06-2008 08:42 PM

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


All times are GMT -5. The time now is 12:30 AM.