Linux as Ethernet to serial bridge

Hello,
I'm looking for a solution to bridge an ethernet connection to a serial connection. I have found a hardware solution, but haven't bought it yet.
I thought (hoped) there might be a Linux solution to the problem, but I can't figure it out myselft.
I need to translate exactly what comes in on an ethernet to go out to a serial port and reversed. The purpose is to transmitt NC code from a PC to a NC machine over a long distance.
Maybe it is not possible due to speed differences and buffer problems but I thought I could ask. Maybe this only requires a simple script by those who know how to write them :-)
regards Bjorn
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Bjorn wrote:

Define "long distance".
--

Fundamentalism is fundamentally wrong.

To reply to this message, replace everything to the left of "@" with
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Well, long distance... it's about 35m but the enviroment contains lots of other noisy machinery that might disturb the signal. I used a normal serial cable (shorter, 20m) before and it worked, but speed wasn't so good. So I want to put a Linux PC close to my NC machine with only a short serial cable between them and hopefully get up to full serial speed, 115Kbps.
/Bjorn
with

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

I'm not sure I've figured out yet what is being done. What is an "NC machine"? Does this machine *only* have serial port capability? And is 115Kbps the highest rate that it can work at?
If that does describe what you have, then yes putting a Linux box next to it will allow you to run the RS-232 link at 115Kbps. If your environment is really obnoxious you can even use shielded cable if you keep the length very short. But *do* use cable intended for RS-232 (e.g., do *not* use twisted pair like CAT 5). If the cable can be less than 2m, even with shielding you'll be able to use 115Kbps.
--
Floyd L. Davidson <http://web.newsguy.com/floyd_davidson
Ukpeagvik (Barrow, Alaska) snipped-for-privacy@barrow.com
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
With "NC machine" I mean a CNC controlled milling machine for example. We have other milling machines that have a built in ethernet card, but one of the machines isn't possible to upgrade. My idea was to be able to use the same communication procedure for all machines instead of two different.
In a Linux box I want something like http://serial-ethernet.com/serial-ethernet/ipether232/serial-ethernet.html Looking at the lower part of that homepage you will see a CNC application example.
/Bjorn
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Ah. The significant point is that it can't use an ethernet card.

I think you have a sound approach. Just use a computer with a case that can be sealed up fairly tight electrically, and get it as close to the serial port on the milling machine as you can. With it that short, I'd go for shielded cable to start with.
The significance of cable intended for RS-232 is that it will have thicker insulation on the individual wires, to keep them farther appart from each other, thus there will be less capacitive coupling between them. Don't use a cable meant for something else.
Shielding the cable reduces the length/speed that you can use, but improves the noise immunity.
At just a few feet, you should not have a problem at 115Kbps.

--
Floyd L. Davidson <http://web.newsguy.com/floyd_davidson
Ukpeagvik (Barrow, Alaska) snipped-for-privacy@barrow.com
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
| | With "NC machine" I mean a CNC controlled milling machine, | for example. We have other milling machines that have a built in | Ethernet card, but one of the machines isn't possible to upgrade. | ... | In a Linux box I want something like | http://serial-ethernet.com/serial-ethernet/ipether232/serial-ethernet.html
| > So I want to put a Linux PC close to my NC machine with only | > a short serial cable between them and hopefully get up to full | > serial speed, 115kbps. | > ...Well, long distance... it's about 35m but the environment contains | > lots of other noisy machinery that might disturb the signal....
Using a general-purpose machine running a general-purpose operating system just to tunnel an asynchronous serial connection over Ethernet/TCP/IP/Telnet is a lot of overhead.
While the "serial-ethernet" devices from "ipcas GmBH" (at the above URL) appear, at first glance, to be uncomfortably Windows-centric to a Linux guy, another vendor has a similar idea.
Lantronix makes several simple, little, plug-and-go products. Several of them are intended precisely for industrial automation:
http://www.lantronix.com/products/ds/index.html
One of them can use a fiber-optic Ethernet medium for noise immunity:
http://www.lantronix.com/products/ds/coboxfliap/index.html
On the other hand, some potentially useful Linux-based software is visible here:
http://www.linuxlots.com/~termpkg /
--
H.O.

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.