14
votes

Is it possible to read the bits directly off the physical ethernet connection interface from a standard computer ethernet interface?

e.g., suppose I want to use the ethernet jack of a laptop as a differential logic probe(using a standard ethernet cable). Could I just potentially write a driver to get at the bits or is there a limit to how low a driver can go?

Essentially does the physical layer just send the bit stream to the device driver or does it do any decoding which will effect the interpretation of the bits or cause the device to malfunction(such using a different encoding scheme).

I guess what it boils down to, is, can we use the ethernet port as any standard digital differential communications link by writing a suitable driver or are we limited to the the ieee spec(8b/10b, etc...).

2
I'd say, you are much better off with a USB to RS232 adapter, or an Arduino, which you can program to jump through flaming hoops of any kinds in a matter of minutes... Or if something, for (very) low bandwidth, I'd even consider the sound card...ppeterka
@ppeterka It's not low bandwidth and it's not short distances. It's basically digital communications using a different protocol than standard ethernet.jsmdnq
@jsmdq I can read, thanks. Even if what you propose is possible, it would be highly device dependent (not to mention you have to get the documentations for all the devices to even start with it), and would take a whole lot of time. That's why I wrote what I wrote. BTW why do you need this? What is that plain ole Ehternet is not suitable for?ppeterka

2 Answers

3
votes

To answer shortly, probably not.

Here are some of the reason why:

On a hardware link layer, there is actually no electrical connection between the computer and the ethernet cable, it is electrically isolated by small transformer and is current and not voltage driven signal, so this will be the first problem to overcome, as you would have to send a fairly precise current over two lines rather than a voltage on a single line. Ethernet transformers

PHY Hardware Interface: Then the next step, is that this is simply not controlled by the CPU where your code is being executed but by an ethernet PHY Chip interface, and there you have no (easy) way of flashing and controlling it. Some different PHY chip allows you different level of access, but I doubt you would find any that would allow you direct control over the transmission interface and even if it did, it would have to be implemented into the driver which is as well unlikely. Ethernet PHY Controller

Perhaps some other solutions as the comments above, if you want to have direct IO control on a computer, the best solution is over a serial or parallel port, perhaps you can find ethernet to serial or usb to serial port and then play with that but this would be digital signals.

Another thing you may want to use is the microphone input, as this accepts analog signals and you can have direct control over it, though be careful not burning your computer. (I've seen some bank card magnetic band using that on cellphones).

1
votes

You can use libpcap/WinPcap to do this. Nevertheless you are not completely free in the choise of what you write/read on the wire. e.g. preamble and SFD must stil be there. This is so fundamental (because of noise resistance), that typical hardware just does not support anything different.

If you want to control completely everything, go to embedded hardware, find a board that uses a PHY that can give you that information and a processor that is capable of handling the data rates.