11

I have a bit of kit with an FPGA on it which includes an ethernet adapter. I'm trying to diagnose why it's not working and while I do that I've noticed that with an ethernet cable connected to my laptop, I see the network coming up and then dropping out again.

How does the hardware detect that the cable is plugged in? Is it watching for a clock sig

JonCage
  • 261
  • 1
  • 3
  • 9

3 Answers3

14

Point to point ethernet (not the old bus types) send link pulses to let the other end know something is connected. These are generated and detected in the phy layer. Ethernet interfaces often have a "link" LED near the connector. These are driven by the phy hardware when it detects link pulses from the other end.

Olin Lathrop
  • 310,974
  • 36
  • 428
  • 915
  • 2
    Your suggestions lead me to some useful information: http://en.wikipedia.org/wiki/Autonegotiation - thanks! – JonCage Jan 18 '12 at 14:37
1

For distance and to avoid noise, also because the data is transmitted without a clock, the data is encoded, for example 8b/10b for every 8 bits of real data 10 bits go on the wire. If you sent many zeros in a row without something like this or one of the other schemes, you might just have no signal, this is bad. So even if you have a lot of zeros or a lot of ones the signal on the wire, pair of wires (differential) is constantly changing. As a result of the signal constantly changing you can easily detect on a receiver if something is there, and get link state and what speed the link is for 10/100/1000 interfaces for example.

This is independent of whether or not a higher protocol level is working. Basically you have a link between the phys on the network cards but then you go to the mac layer and try to talk, then on up through the rest of the network layers. If the phys are not linked though then nothing will happen.

old_timer
  • 8,203
  • 24
  • 33
  • Thankfully wikipedia is in blackout today over SOPA/PIPA, there are hits there, in the mean time http://www.knowledgetransfer.net/dictionary/Storage/en/8b10b_encoding.htm 8b/10b is not used for all ethernet as you get faster there are different sizes but the same concept and reason. Pci uses a different one, etc. Quite common when moving serial, digital, data without a clock between two independent entities wired or wireless, single ended, or differential, to create excess number of state changes for extracting a clock or using a pll on the other end. – old_timer Jan 18 '12 at 18:09
-1

"an ethernet cable connected to my laptop"

Well, I think you need crossover cable to connect them in order for them to talk. If you are using a straight cable, the TX is talking to TX. It won't work.

Consider hooking your device through a router? It should/might work.

smallbee
  • 97
  • 2