18

I have an older Gigabyte Technology GA-MA770T-UD3P motherboard with an on-board network card described like this:

Model: "Gigabyte Onboard Ethernet"
Vendor: pci 0x10ec "Realtek Semiconductor Co., Ltd."
Device: pci 0x8168 "RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller"
SubVendor: pci 0x1458 "Gigabyte Technology Co., Ltd"
SubDevice: pci 0xe000 "Onboard Ethernet"

The BIOS of that board is described like this:

Vendor: "Award Software International, Inc."
Version: "F12"
Date: "03/22/2011"

However that BIOS has an interesting feature: It can determine the length of the wires of a network cable being plugged into the network card (if the other end is "open" (i.e..: not plugged into a switch), and I wonder how that works.

enter image description here

I've seen no other motherboard/networks card/BIOS combination that offers a similar feature, while I wonder: If one network card can do it, aren't all the others able, too?

U. Windl
  • 321
  • 1
  • 8
  • 2
    Many are able, but not all; and the feature might be only available through Windows drivers (especially if it's not an onboard NIC -- and even then, it is rare for BIOSes of that age to have Ethernet support at all). The same feature is also relatively common in managed switches. – user1686 May 06 '21 at 19:01
  • https://www.youtube.com/watch?v=Il_eju4D_TM – AndreKR May 06 '21 at 19:59
  • 1
    TBH, the surprising/unique/interesting part here is not so much that the NIC can do that (TDR for cable fault detection is not an uncommon feature in Ethernet PHY chips) but the fact that BIOS has support for querying that information from the PHY chip. – alex.forencich May 08 '21 at 03:59
  • @alex.forencich It's probably the combination of the NIC being onboard and ethernet being often used for booting. – AndreKR May 08 '21 at 10:23

1 Answers1

34

Many network PHY chips can measure the flight time of a pulse. When a sent pulse is reflected back at the open end and the echo arrives back, the time it took can be used as an approximate estimate of the cable length.

It is called TDR for Time Domain Reflectometry.

Justme
  • 127,425
  • 3
  • 97
  • 261
  • 2
    One place where this is probably explained in detail are Microchip's docs for the KSZ line of phys and switches, where the feature is called LinkMD. I'm only aware it exists, but have not read up on it yet. – jaskij May 06 '21 at 08:29
  • 17
    One place where it's useful (and the reason why it gives you information per-pair, not just for the whole cable) is that it can help you find if there's a break in one of the wires, and if so, approximately where. – hobbs May 06 '21 at 16:49
  • How is it possible for the pulse to be reflected back at the open end? Aren't they literally unattached wires with no electrical connection when they're "open"? – Michael Innes May 07 '21 at 00:11
  • 11
    @Eptin the impedance mismatch between the intact cable and the open end causes the reflection. – Mark Ransom May 07 '21 at 00:15
  • It is the same mechanism that makes sound bounce off a wall - well, not the same, but similar concept. The impedance of air vs wall is very different, so most of the energy bounces back. In the wire, impedance of copper vs air is very different, and something similar occurs. – Vladimir Cravero May 07 '21 at 10:01
  • Just a note - shorted pair and open pair o cables reflect with opposite phases, so the card can (and some do) detect shorts. – Mołot May 07 '21 at 10:17
  • 3
    @Eptin At low-frequencies you are correct in thinking that electricity doesn't flow into an open end. But when you remember there's a speed of light, then you start thinking about the electricity knows not to flow. The answer is it starts flowing anyway, bounces off the end, bounces back "upside-down" off the start, bounces off the end, a bunch of times, and after a few tens of nanoseconds, it settles down into an equilibrium where it's not flowing. but you can't see this unless you can see nanoseconds or you have a really really long cable! Humans have the tech to see nanoseconds now – user253751 May 07 '21 at 10:20
  • 2
    @Eptin the signal reflects from open wires similarly like how waves behave in a diving pool. Waves propagate nicely in the water until they hit the pool wall so they can't continue and get reflected back from pool wall. – Justme May 07 '21 at 10:23
  • 1
    @Eptin: See https://en.wikipedia.org/wiki/Impedance_matching for transmission-line effects including signal reflection. An open circuit is the ultimate mismatch to the twisted-pair "transmission line". (Just some capacitance to ground / free space, and basically no conductance.) – Peter Cordes May 07 '21 at 10:50
  • 1
    @Eptin it gets even better - a certain length (specific to frequency) of open ended cable will look like a dead short.... :) – rackandboneman May 07 '21 at 17:06
  • So the driver software causes the NIC to send out a pulse on each wire separately and capture the response time, converting it to a length? Is there any description of the feature by a hardware vendor? – U. Windl May 21 '21 at 07:12