Ethernet length estimate via software
Ethernet length estimate via software
(OP)
Anyone know of good techniques to get an estimate/verify in software of the Ethernet cable length between two ports? IEEE 1588 PTP looks like it has the proper parameters to get a ballpark estimate, if that data is available above the PHY.
A few years back I was working with a Fluke tester that could do it, but I believe that was a full TDR. I vaguely recall some NICs would show cable length.
I saw a website hinting that you could pull the length out of the Forward Error Correction parameters, but again I don't know if that data is available above the PHY, and FEC might only be for the faster communication speeds. I'll probably be running 100 Mb.
Ideally I'd like 1 m resolution, but that's only about 5 ns delay so that is pushing it... Worse resolution that lets me discern a 30 meter cable from a 15 meter cable is still worthwhile.
Z
A few years back I was working with a Fluke tester that could do it, but I believe that was a full TDR. I vaguely recall some NICs would show cable length.
I saw a website hinting that you could pull the length out of the Forward Error Correction parameters, but again I don't know if that data is available above the PHY, and FEC might only be for the faster communication speeds. I'll probably be running 100 Mb.
Ideally I'd like 1 m resolution, but that's only about 5 ns delay so that is pushing it... Worse resolution that lets me discern a 30 meter cable from a 15 meter cable is still worthwhile.
Z
RE: Ethernet length estimate via software
Case-in-point
Keith Cress
kcress - http://www.flaminsystems.com
RE: Ethernet length estimate via software
Z
RE: Ethernet length estimate via software
It also appears it may be up to how an individual PHY implements it.
Z
RE: Ethernet length estimate via software
Keith Cress
kcress - http://www.flaminsystems.com
RE: Ethernet length estimate via software
There must be some underlying IEEE 802.3 magic in there somewhere...
Z
RE: Ethernet length estimate via software
That seems to be the norm: 3.7.1 TDR pg. 19 https://www.ti.com/lit/ds/symlink/tlk100.pdf
TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! https://www.youtube.com/watch?v=BKorP55Aqvg
FAQ731-376: Eng-Tips.com Forum Policies forum1529: Translation Assistance for Engineers Entire Forum list http://www.eng-tips.com/forumlist.cfm
RE: Ethernet length estimate via software
100MB cable length is a linear function of the Analog (AEQ) and Digital (DEQ) equalization coefficient
values in the linked state.
if (AEQ == 0) Length = (A1 × DEQ) + B1
if (AEQ == 1) Length = (A2 × DEQ) + B2
and so on ...
The algorithm for computing the electrical cable length is depicted above. The constants {A1, A2, ... } &
{B1, B2, ... } are determined by statistical study of various typical case cables. The computation is
completely handled in hardware. The resultant cable length is available using a simple register read.
With the caveat that this is only good for about +-10m accuracy.
There's a similar technique in the 802.3 standard for GigE too. This link shows that some PHY pass this info all the way to the OS - https://superuser.com/questions/1491654/how-does-d...
Z
RE: Ethernet length estimate via software
Keith Cress
kcress - http://www.flaminsystems.com
RE: Ethernet length estimate via software
RE: Ethernet length estimate via software
Z
RE: Ethernet length estimate via software
Keith Cress
kcress - http://www.flaminsystems.com