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

Reply to
Bjorn
Loading thread data ...

Define "long distance".

Reply to
James Knott

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

"James Knott" skrev i meddelandet news:GMrBb.23321$r% snipped-for-privacy@twister01.bloor.is.net.cable.rogers.com...

Reply to
Bjorn

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.

Reply to
Floyd Davidson

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

formatting link
at the lower part of that homepage you will see a CNC application example.

/Bjorn

"Floyd Davids> >Well, long distance... it's about 35m but the enviroment contains

Reply to
Bjorn

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.

Reply to
Floyd Davidson

"Bjorn" wrote, variously: | | 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 |

formatting link
| > 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:

formatting link
One of them can use a fiber-optic Ethernet medium for noise immunity:

formatting link
On the other hand, some potentially useful Linux-based software is visible here:

formatting link

Reply to
Helpful Observer

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.