Page 1 of 1

Serial Data Over LAN Cable

Posted: Sun Jul 07, 2019 4:08 pm
by Octacone
I've got an idea, what if there was a way to use a LAN cable for communication between two computers?
I want to communicate between my old computer (running my OS) and my modern computer (running Linux).
Is there a way to send serial data from my old computer to my new computer?
This would make an excellent debugger.

Re: Serial Data Over LAN Cable

Posted: Sun Jul 07, 2019 10:20 pm
by nullplan
Maybe I'm misunderstanding, but I thought communication is what LAN cables are all about.

As to your question, I see two solutions: Either buy a USB-to-serial adapter for the modern computer, or a network card for the old one. If you can get a 10Mbps Ethernet line running, then you can debug using TCP.

I have in the past hacked Ethernet cables apart to turn them into serial cables (they are arbitrarily long eight-conductor cables, after all), but this only works if both sides can use serial.

BTW, my OS uses serial as a console. Serial is very easy to use in write-only poll mode.

Re: Serial Data Over LAN Cable

Posted: Mon Jul 08, 2019 1:14 am
by iansjack
You can send any data that you like over the LAN connection via ethernet packets. All you have to do is write drivers for the NICs in both computers and then you can interpret the data in the packets however you like. It's fairly trivial to encapsulate data, and read it back, in an ethernet packet.

Re: Serial Data Over LAN Cable

Posted: Mon Jul 08, 2019 7:12 am
by Octacone
Oh, I forgot to mention, both of my computers have a network card. Realtek 8139C and Intel I219-V
Are they a tough nut to crack?
So basically I need two simple network drivers that send packets around?

Re: Serial Data Over LAN Cable

Posted: Mon Jul 08, 2019 4:47 pm
by eekee
8139 doesn't have a good reputation, but I think that may have been due to bugs in revision B rather than C. RTL8139C was very popular, whatever faults it may or may not have.

Re: Serial Data Over LAN Cable

Posted: Thu Jul 11, 2019 9:24 am
by Octacone
We shall see. Looks like there are some useful Wiki pages, for both of my cards, yay!
Networking isn't something high on my priority list doe.