×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Ethernet length estimate via software

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

RE: Ethernet length estimate via software

Gurgle.. Why not just get a TDR tool? The parts to do that are about $5 so a tool can't be very expensive.

Case-in-point

Keith Cress
kcress - http://www.flaminsystems.com

RE: Ethernet length estimate via software

(OP)
The Ethernet cable in question is between our sensor and the controller. A customer wants to use the cable length to control another setting automatically (on the rare occasion that they change the cable length...).

Z

RE: Ethernet length estimate via software

(OP)
Actually, I think that the cable length falls out of part of the 803.3 100 Mb standard for determining loss parameters. I just need to read through the 5600 pages of 802.3 to find it...

It also appears it may be up to how an individual PHY implements it.

Z

RE: Ethernet length estimate via software

I just can't see how any of that could be worth a valid dang since there's crummy/good cable and crummy/good power indications that I feel, at best, are useful only for relative adjustments. Knowing you though you'll probably pull it off somehow. I look forward to hearing of any success.

Keith Cress
kcress - http://www.flaminsystems.com

RE: Ethernet length estimate via software

(OP)
So far it looks like it is up to the PHY, as indicated by this TI DB83640 datasheet:



There must be some underlying IEEE 802.3 magic in there somewhere...

Z

RE: Ethernet length estimate via software

The part you cited uses TDR, per its dataheet: 5.3.8.3 TDR Cable Diagnostics pg.37 https://www.ti.com/lit/ds/symlink/dp83640.pdf
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

(OP)
I finally found a non-TDR example for length estimation. Texas Instruments 'AN-1508 DP83849 Cable Diagnostics' (snla085a.pdf) gives on oversight of how a 100Mb link calculates cable length:

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

I recall a MOBO I once had it in BIOS with the length of each I/O port in high resolution. I never calibrated it for accuracy.

RE: Ethernet length estimate via software

(OP)
We need the length for absolutely nothing to do with Ethernet communication! (even though the PHY is calculating it for equalization and error correction) We run an optical fiber along with the Ethernet cable. This pair can have various lengths and are changeable in the field. If a customer changes a fiber/cable set, there is some manual optical-tuning that they have to do before they can continue to use their system. If we can automatically detect the cable length, we can automatically tune the optics. If this has the resolution I need, it seems like a very reliable way to determine the length without adding hardware.

Z

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close