LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 04-15-2012, 03:50 AM   #1
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
ethernet NIC AS a serial port


Would it be possible with today's crop of ethernet NICs to use then as serial ports for plain point-to-point communications, without the 14 byte header (e.g. just start sending the data payload)? This would mean any bit states would be possible in the space normally used for ethernet headers, sending and receiving. I'd also like to send rather large frames. I know there are jumbo frames being done now, so how far can that go when done in the raw?

Also, how tightly can I send multiple frames back-to-back where the physical layer is operating in full duplex (e.g. 100 mbps ethernet's physical layer)?
 
Old 04-15-2012, 06:06 AM   #2
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766
Blog Entries: 23

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411
Not possible, and not very productive. Consider that a NIC adheres to the OSI standard, where the hardware (the physical layer as it is called) plays an important role in the communications.

What keeps you from using the serial port as it is? Unless your box does'nt have it (anymore)...

I think that it would'nt be worth the effort...honestly.

Thor
 
Old 04-15-2012, 06:16 AM   #3
uhelp
Member
 
Registered: Nov 2011
Location: Germany, Bavaria, Nueremberg area
Distribution: openSUSE, Debian, LFS
Posts: 205

Rep: Reputation: 43
you can do that.
Just implement a TCP/IP stack on your own.

Hint: First three layers should be enough.
Design carefully the interface between layer three and four.

Last edited by uhelp; 04-15-2012 at 06:17 AM.
 
Old 04-15-2012, 07:13 AM   #4
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766
Blog Entries: 23

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411
Quote:
you can do that.
Just implement a TCP/IP stack on your own.
Hmm, would'nt that boil down to re-inventing sliced bread? I fail to see the usefullness...but, an interesting topic, I'm convinced.
 
Old 04-15-2012, 07:30 AM   #5
uhelp
Member
 
Registered: Nov 2011
Location: Germany, Bavaria, Nueremberg area
Distribution: openSUSE, Debian, LFS
Posts: 205

Rep: Reputation: 43
That's for sure, Thor_2.0

But consider:
If people developing things like that, they are not likely to spoil real networks.
 
Old 04-15-2012, 07:56 AM   #6
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766
Blog Entries: 23

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411
Quote:
If people developing things like that, they are not likely to spoil real networks.
Touché

I'm interested to see where OP ends up with that...more in particular: the code (if any)...
 
Old 04-15-2012, 12:08 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
Easier to use slip.
 
Old 04-15-2012, 12:19 PM   #8
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by Thor_2.0 View Post
Not possible, and not very productive. Consider that a NIC adheres to the OSI standard, where the hardware (the physical layer as it is called) plays an important role in the communications.

What keeps you from using the serial port as it is? Unless your box does'nt have it (anymore)...
Not fast enough. I want to do up to 100 mbps (and more at some point). And how do you put it in a laptop?

Quote:
Originally Posted by Thor_2.0 View Post
I think that it would'nt be worth the effort...honestly.
The separate serial port would not be worth the effort. Besides, I don't know of any that can approach the 92 mbps I can get out of 100 mbps ethernet.

If the ethernet NIC can be made to not send those 14 bytes, or send them with my data instead, and receiving accordingly, then it simplifies my project. If not, then I waste 14 bytes in transmission bandwidth and have to make sure the other end won't cough on whatever is sent there. I'm hoping raw mode can somehow do this. If not, then I'll try it some other way.

Last edited by Skaperen; 04-15-2012 at 12:36 PM.
 
Old 04-15-2012, 12:27 PM   #9
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by jefro View Post
Easier to use slip.
So the SLIP developers have figured out how to tell the 100 mbps NIC card to skip sending and receiving the 14 byte IEEE 802.3 headers? All I need to do is look at the SLIP source and see how they get the NIC to do that?
 
Old 04-15-2012, 12:33 PM   #10
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by Thor_2.0 View Post
Hmm, would'nt that boil down to re-inventing sliced bread? I fail to see the usefullness...but, an interesting topic, I'm convinced.
I'm not specifically trying to use TCP/IP, although if I can make this work, I might try some form of point-to-point IP-over-thisweirdthing. What I'm trying to do is avoid wasting 112 bits that are useless for this, so that the ethernet point can be used as a framed serial link. Then it would be a matter of setting up a proper driver for it and create a device node so I don't have to pretend it's a network when it isn't.
 
Old 04-15-2012, 12:43 PM   #11
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766
Blog Entries: 23

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411
Quote:
Not fast enough. I want to do up to 100 mbps (and more at some point). And how do you put it in a laptop?
Hmm, okay, now I'm getting an interesting picture. My bad, I did'nt know just what the goal was here....lemme think out loud here, but, is a 1000Mb/s card an option? I'd even dare to look into FDDI cards...fiber, ya know.

Edit
It can be done...if you'd write directly into the memory map of the card...but this would involve some machine code, a bit of protocolling from your part...and some time. But, now I do see some sunlight...am I allowed to "meditate" along side with you?

Thor

Last edited by ButterflyMelissa; 04-15-2012 at 12:46 PM.
 
Old 04-15-2012, 04:56 PM   #12
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by Thor_2.0 View Post
Hmm, okay, now I'm getting an interesting picture. My bad, I did'nt know just what the goal was here....lemme think out loud here, but, is a 1000Mb/s card an option? I'd even dare to look into FDDI cards...fiber, ya know.
100mb/s is sufficient for now. Ethernet parallels over 4 twisted pairs with half-duplex for 1000mb/s. The 100mb/s is one pair for one direction, another pair for another direction.

But the big questions are:

1. Cost. A 100 mb/s serial card is likely intended for serial connectors and other things like getting clocking from a modem. Serial tends to not come self-clocked.

2. Doing it on a laptop.

Quote:
Originally Posted by Thor_2.0 View Post
Edit
It can be done...if you'd write directly into the memory map of the card...but this would involve some machine code, a bit of protocolling from your part...and some time. But, now I do see some sunlight...am I allowed to "meditate" along side with you?
Sure, mediate.

I'm just seeing a cheap way to serialize data using twisted pair ethernet. It would be cleaner if I can get rid of those 14-byte headers, too. Otherwise I'd have to put something in there that always works no matter where connected, and that can be hard, too. For example should I read in promiscuous mode? Send with broadcast addresses to be sure the other end will get it?

I THINK this is just a case of trying to get the PHY layer by itself.

I'm wanting to explore how I can make devices that need a lot of data and connect them into computers. I really don't want the mess that is USB or the mess that is Firewire (I was kinda expecting someone to suggest USB in this thread). I'm thinking about some audio and/or video devices.

But I did also think of trying raw IPv6 over this, too, on a point-to-point basis. Since this would not be ethernet, anymore, the IPv6-over-ethernet rules won't apply. There would be no IPv6 type code this way ... it would just be assumed IPv6. And that could only work point-to-point since a switch would not handle it (unless I redesigned the switch firmware to become an IPv6 router).

What's interesting is that no one really uses what ethernet was designed for on a physical basis, anymore. We simulate a bus network with hubs and switches.
 
Old 04-16-2012, 04:24 PM   #13
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
That small amount of overhead is nothing.

If you knew enough about a specific card and you also knew that you could write a new driver that did what you want, you then might be able to get it to allow you to write some new network stack or add to a stack to allow this.

You will never get this working since you ask. I played with this a very long time ago and I can assure you there is a lot going on.

I suggested the most easy solution. Use slip.

The second most easy way is to get a specialized card. These cards are like universal communication cards. They tend to be a very specialized device for some special uses. One buys this card and then programs it to do what they want. We used to have small 386 processors on the board that would basically be a small embedded OS. Then you selected the communication method, you then connected the special connector to the back to allow the correct pigtails. IBM and some other companies have made them.
 
Old 04-16-2012, 11:00 PM   #14
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by jefro View Post
That small amount of overhead is nothing.
Agreed. But it's the principle of the thing. If it CAN bey removed, I want to.

Quote:
Originally Posted by jefro View Post
If you knew enough about a specific card and you also knew that you could write a new driver that did what you want, you then might be able to get it to allow you to write some new network stack or add to a stack to allow this.
How about just my specific data stream? Maybe I don't want to do a network stack.

Quote:
Originally Posted by jefro View Post
You will never get this working since you ask. I played with this a very long time ago and I can assure you there is a lot going on.
What about forcing specific header contents? Maybe I can't set the source MAC, but can set the destination MAC to some arbitrary bit pattern?

Quote:
Originally Posted by jefro View Post
I suggested the most easy solution. Use slip.
SLIP over ethernet? What's that get me?

Quote:
Originally Posted by jefro View Post
The second most easy way is to get a specialized card. These cards are like universal communication cards. They tend to be a very specialized device for some special uses. One buys this card and then programs it to do what they want. We used to have small 386 processors on the board that would basically be a small embedded OS. Then you selected the communication method, you then connected the special connector to the back to allow the correct pigtails. IBM and some other companies have made them.
Ethernet is ubiquitous. It's commodity. And it's built in, in so many places. Anything else is just too expensive (whether I can get those 14 bytes out or not).
 
Old 04-17-2012, 04:09 PM   #15
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
Forget slip. It is backwards from what you want.

Peek that this for some clues. http://electronics.stackexchange.com...with-no-encaps

Last edited by jefro; 04-17-2012 at 04:13 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can i bridge a connecting being received on a wireless nic to an Ethernet nic baronobeefdip Linux - Wireless Networking 3 01-16-2012 08:02 PM
Is a USBtty (USB serial port) treated the same as tty (normal serial port) in C? spudgunner Programming 1 11-12-2010 01:19 PM
linux serial port to router console port connection? frankie_fix Linux - General 3 02-26-2007 09:32 PM
Parallel Port & Serial Port device identification helpmeforlinux Linux - Hardware 3 01-02-2007 01:15 AM
Using serial port card(PCMCIA) with IPAQ running Linux, can't find ttyS0 port d2army Linux - Laptop and Netbook 0 11-12-2005 08:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration