OpenWrt Two: test its Ethernet Cables?

We spend a great deal of time discussing how fast a router can move packets. But when a connection starts dropping, negotiates at the wrong speed, or refuses to come up, wouldn’t it be useful for the router to help answer a simpler question: what is wrong with the connection?

That is a capability I would like to see considered for OpenWrt Two: physical-link diagnostics, covering both Ethernet cable testing on its copper ports and optical-transceiver monitoring on any SFP/SFP+ ports.

Copper ports: is something wrong with the cable?

For the RJ45 ports, I would like support for ethtool --cable-test, ideally with a straightforward interface in LuCI eventually.

I am not suggesting that a router should replace a professional cable-certification instrument. But being able to identify an open or shorted pair—and, where supported, estimate the distance to the fault—would be genuinely useful. For someone troubleshooting a cable running through a wall, that could be more valuable than another increment in headline throughput.

My understanding is that this is not simply a matter of including ethtool in the firmware. The Ethernet PHYs need the appropriate capabilities, and their Linux drivers need to expose them. That makes this worth considering while hardware choices can still be influenced, rather than discovering afterward that an otherwise excellent design cannot provide it.

Optical ports: is enough light getting through?

For any SFP/SFP+ ports, why not also make the diagnostics available from supported optical transceivers accessible to the user?

I mean the digital optical monitoring information available through ethtool -m: transmit and receive optical power, module temperature, laser bias current, and relevant warning or alarm thresholds.

This is a different capability from copper cable testing. I would not expect an ordinary optical transceiver to locate a fiber break or replace an OTDR. But there is a considerable difference between being told “the link is down” and being able to see that the receiver is getting very little light—or that the module is reporting an abnormal condition.

If the module already provides that information, shouldn’t an official OpenWrt router make it easy to see?

OpenWrt: Setting the Gold Standard

What better place to make these capabilities accessible than an official OpenWrt device? A router designed around openness and user control seems like a natural place to give users better visibility into the physical connections their network depends on.

I recognize that cost, component availability, and development time all matter. Command-line support would be a perfectly reasonable starting point. A LuCI “Test cable” button, with a warning about any temporary connection interruption, and an optical-diagnostics page could come later. Clear documentation of supported ports and module-dependent limitations would also be valuable.

Are these capabilities already being considered for OpenWrt Two? If the Ethernet hardware has been selected, do its PHYs and Linux drivers provide a practical path to cable testing? And could supported optical-transceiver diagnostics be exposed alongside it?

These may not be the features that sell a router on a specification sheet—but they could be the features someone most appreciates when their network stops working.

To put some perspective, I assume this is the functionality you are speaking to:

root@WRT1900ACS-AP:~# ethtool --cable-test lan4
#       Lan4 Port Open
Cable test started for device lan4.
Cable test completed for device lan4.
Pair A code Open Circuit
Pair B code Open Circuit
Pair C code Open Circuit
Pair D code Open Circuit
Pair A, fault length: 8.00m
Pair B, fault length: 10.40m
Pair C, fault length: 6.40m
Pair D, fault length: 9.60m

root@WRT1900ACS-AP:~# ethtool --cable-test lan1
#       Lan1 Port - faulty patch cable
Cable test started for device lan1.
Cable test completed for device lan1.
Pair A code OK
Pair B code OK
Pair C code Open Circuit
Pair D code Open Circuit
Pair C, fault length: 1.60m
Pair D, fault length: 1.60m

root@WRT1900ACS-AP:~# ethtool --cable-test lan1
#       Lan1 Port - good patch cable
Cable test started for device lan1.
Cable test completed for device lan1.
Pair A code OK
Pair B code OK
Pair C code OK
Pair D code OK

root@WRT1900ACS-AP:~# ethtool --cable-test lan4
#       Lan4 Port - finding cable length for known 25' Cat5E cable
Cable test started for device lan4.
Cable test completed for device lan4.
Pair A code Open Circuit
Pair B code Open Circuit
Pair C code Open Circuit
Pair D code Open Circuit
Pair A, fault length: 10.40m
Pair B, fault length: 10.40m
Pair C, fault length: 10.40m
Pair D, fault length: 12.80m

And here you can find what I think is the definitive conversation regarding this capability: Ethernet cable test with raw TDR data reporting bug fix - testers needed - #36 by TimSmall

I do own a high-end TDR/TDM meter and while I know how the technology works, I am way out of my league when it comes to actually interpreting much of the thread content. It does though seem to indicate most consumer plastic routers OpenWrt supports are few and far between:

root@RuralRoots:/tmp# ethtool --cable-test eth1
#       OpenWrt One
netlink error: PHY driver does not support cable testing
netlink error: Not supported

Yes, that's exactly the feature I am talking about. And yes, it does not seem to be common in most routers, which is a shame.. It seems like for a relatively cheap cost, we could have real cable diagnostic capability, and save much time troubleshooting complex cable networks.

On snapshot we already have luci-app-sfp-info:

Managed switches usually handle this.
I would suppose because you can look at devices attached to home routers but switches are usually out of site with devices at long distances.

Both of these wishes depend on the host SOC and switch - and their drivers, it's nothing specific to the hypothetical OT. While I understand your desire, it's nothing the OT proponents can promise or deliver at this point - that's assuming that the OT is even on the plate at all.

or add it to the Realtek switch thread.

Now that I think about it, I presume they have discussed it.

and the 88E1111 phy driver support shown in that thread is now part of Linux/Openwrt, and therefore available by default with every(?) cheap 1G copper SFP.

Here shown with a XikeStor SKS8300-8X switch:

root@OpenWrt:~# ethtool --show-phys lan4
 
PHY for lan4:
PHY index: 1
Driver name: Marvell 88E1111
PHY device name: smbus:sfp-p4:16
Upstream type: mac
Upstream SFP name: sfp-p4
root@OpenWrt:~# ethtool --cable-test lan4
Cable test started for device lan4.
Cable test completed for device lan4.
Pair A code Open Circuit, source: TDR
Pair A, fault length: 0.11m, source: TDR
Pair B code Open Circuit, source: TDR
Pair B, fault length: 0.91m, source: TDR
Pair C code Open Circuit, source: TDR
Pair C, fault length: 0.91m, source: TDR
Pair D code Open Circuit, source: TDR
Pair D, fault length: 0.11m, source: TDR

In the mean time, you can install ethtool.

'ethtool eth0' details

'ethtool eth0 | grep Link' status only

edit

I do not know what ethtool-full does. try it, Mikey, and tell me.

Yes, of course. It comes down to the SOC, switch, and drivers.