Author Topic: Has anyone made their own serial over ethernet converter?  (Read 1046 times)

0 Members and 1 Guest are viewing this topic.

Offline e100Topic starter

  • Frequent Contributor
  • **
  • Posts: 605
Has anyone made their own serial over ethernet converter?
« on: September 01, 2019, 03:33:17 am »
As in serial -> Ethernet -> serial
Using commonly available hardware what sort of latency and max baud rate are practical?
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4700
  • Country: au
  • Question Everything... Except This Statement
Re: Has anyone made their own serial over ethernet converter?
« Reply #1 on: September 01, 2019, 03:41:26 am »
Latency will be determined by the packet routing and normal network stuff, maximum baud rate comes down to the end points, and how congested your links are, e.g. what happens when a packet goes missing, what happens when they arrive out of order, and if it responds differently to what you expect midway through you sending the next command, how do you handle this?
 

Offline e100Topic starter

  • Frequent Contributor
  • **
  • Posts: 605
Re: Has anyone made their own serial over ethernet converter?
« Reply #2 on: September 01, 2019, 03:46:56 am »
Latency will be determined by the packet routing and normal network stuff, maximum baud rate comes down to the end points, and how congested your links are, e.g. what happens when a packet goes missing, what happens when they arrive out of order, and if it responds differently to what you expect midway through you sending the next command, how do you handle this?

I was thinking of a dedicated point to point ethernet link.
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4700
  • Country: au
  • Question Everything... Except This Statement
Re: Has anyone made their own serial over ethernet converter?
« Reply #3 on: September 01, 2019, 03:53:16 am »
same wire, or through a switch / router?
 

Offline SparkyFX

  • Frequent Contributor
  • **
  • Posts: 676
  • Country: de
Re: Has anyone made their own serial over ethernet converter?
« Reply #4 on: September 01, 2019, 03:59:57 am »
No need to reinvent the wheel:
https://www.lantronix.com/products/xport/

Questions for latency and bandwidth: depends on application. Usually UART and interrupts limit realtime capabilities of e.g. RS232 serial connections as well.

Should you intend to packetize the whole serial protocol with handshakes and such... i kind of doubt it works the way you think, because of flow control, frame sizes and checksums.
Support your local planet.
 

Online NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9238
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Has anyone made their own serial over ethernet converter?
« Reply #5 on: September 01, 2019, 04:13:51 am »
Trivial to do with a microcontroller that has Ethernet. But if a dedicated point to point link over twisted pair is all you're looking for, why not use RS485 or RS422?
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline e100Topic starter

  • Frequent Contributor
  • **
  • Posts: 605
Re: Has anyone made their own serial over ethernet converter?
« Reply #6 on: September 01, 2019, 05:09:30 am »
Trivial to do with a microcontroller that has Ethernet. But if a dedicated point to point link over twisted pair is all you're looking for, why not use RS485 or RS422?

Because I have an ethernet network.
 

Offline GeorgeOfTheJungle

  • Super Contributor
  • ***
  • !
  • Posts: 2699
  • Country: tr
Re: Has anyone made their own serial over ethernet converter?
« Reply #7 on: September 01, 2019, 07:42:12 am »
Interesting question. For minimum latency you want small packets and no delay. For maximum throughput you want them large => buffering + delays. And for flow control you need the ability to buffer at both ends and a sort of side channel. You've got to choose between TCP for ease/comfort and UDP for speed. Choose UDP and you've got to handle out of order and dropped packets, errors and retransmissions. Ouch! What at first glance seemed simple, becomes a rather complicated thing.

In my to-do list is a TTL serial port to WiFi with an ESP-01 that I can connect to with a netcat. Progress is being slow, though.

https://youtu.be/Q0C7FKYk2aM

« Last Edit: September 01, 2019, 07:55:03 am by GeorgeOfTheJungle »
The further a society drifts from truth, the more it will hate those who speak it.
 

Offline tszaboo

  • Super Contributor
  • ***
  • Posts: 7948
  • Country: nl
  • Current job: ATEX product design
Re: Has anyone made their own serial over ethernet converter?
« Reply #8 on: September 01, 2019, 07:48:48 am »
Trivial to do with a microcontroller that has Ethernet. But if a dedicated point to point link over twisted pair is all you're looking for, why not use RS485 or RS422?

Because I have an ethernet network.
So you have a network, or do you have a dedicated cable?
Please make up your mind.
If it is a dedicated cableyou can just connect whatever signals you want on an ethernet cable. I've run 1KM long CAN bus on regular CAT6 cabling.
 

Offline German_EE

  • Super Contributor
  • ***
  • Posts: 2399
  • Country: de
Re: Has anyone made their own serial over ethernet converter?
« Reply #9 on: September 01, 2019, 08:10:35 am »
Exactly. An RJ45 plug gives you eight pins to play with so wire a DB9 (without the Ring Indicator pin) to a patch plug at each end and send RS232 over your cables. You will probably go via at least one patch panel but this isn't a problem, just connect port A directly to port B without going through your network switch.
Should you find yourself in a chronically leaking boat, energy devoted to changing vessels is likely to be more productive than energy devoted to patching leaks.

Warren Buffett
 

Offline 2N3055

  • Super Contributor
  • ***
  • Posts: 7276
  • Country: hr
Re: Has anyone made their own serial over ethernet converter?
« Reply #10 on: September 01, 2019, 08:25:12 am »
What people allready said .
For converter you have X-port and ready made devices that are not so expensive if you shop around a bit.
They will be fast enough. Latencies are more of a problem over Internet or complicated network with lot of routers..

If you have CAT6 cable point to point, that is what RS485 and RS422 are made for..
You can get ready made RS485 really cheap, and also can make them quite easily..
If you have cable go RS485 way.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf