Serial Data Over LAN Cable

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
Post Reply
User avatar
Octacone
Member
Member
Posts: 1138
Joined: Fri Aug 07, 2015 6:13 am

Serial Data Over LAN Cable

Post 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.
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
nullplan
Member
Member
Posts: 1766
Joined: Wed Aug 30, 2017 8:24 am

Re: Serial Data Over LAN Cable

Post 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.
Carpe diem!
User avatar
iansjack
Member
Member
Posts: 4685
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Serial Data Over LAN Cable

Post 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.
User avatar
Octacone
Member
Member
Posts: 1138
Joined: Fri Aug 07, 2015 6:13 am

Re: Serial Data Over LAN Cable

Post 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?
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
User avatar
eekee
Member
Member
Posts: 872
Joined: Mon May 22, 2017 5:56 am
Location: Kerbin
Discord: eekee
Contact:

Re: Serial Data Over LAN Cable

Post 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.
Kaph — a modular OS intended to be easy and fun to administer and code for.
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie
User avatar
Octacone
Member
Member
Posts: 1138
Joined: Fri Aug 07, 2015 6:13 am

Re: Serial Data Over LAN Cable

Post 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.
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
Post Reply