Yes, ethtool has these options --cable-test
& --cable-test-tdr
, but I haven't found a device yet, where it works. I usually get something like:
netlink error: PHY driver does not support cable testing
netlink error: Operation not supported
Digging a bit, it seems to be implemented for (some? DSA?) Marvell drivers, and in the rpi4 (https://github.com/torvalds/linux/blob/master/drivers/net/phy/bcm-phy-lib.c) since commit https://github.com/torvalds/linux/commit/11ecf8c55b91806e4dc6a1b9fe7cbf68cdc9b006
Testing on Openwrt complains about missing netlink support in ethtool, which doesn't seem to be an explicit option in the build system, but may be included in ethtool-full
. I'll try that later today.