Hi everybody,
my router has an SFP cage which I populated with a 1Gbase-BX module, that per manufacturer's specs is DOM capable. How do I access the DOM information?
The generic way to do that seems to involve the ethtool command line tool. However, it appears, OpenWRT only has a crippled version of it (as so often, see nc for another sad case ) that has essential functionality removed. Instead of a fully decoded DOM info, like this from a server running Ubuntu (shortened)
# ethtool -m enp1s0f0
Identifier : 0x03 (SFP)
Extended identifier : 0x04 (GBIC/SFP defined by 2-wire interface ID)
Connector : 0x07 (LC)
Transceiver codes : 0x10 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00
Transceiver type : 10G Ethernet: 10G Base-SR
Transceiver type : Ethernet: 1000BASE-SX
Encoding : 0x06 (64B/66B)
BR, Nominal : 10300MBd
Rate identifier : 0x02 (8/4/2G Rx Rate_Select only)
Length (SMF,km) : 0km
Length (SMF) : 0m
Length (50um) : 80m
Length (62.5um) : 30m
Length (Copper) : 0m
Length (OM3) : 300m
Laser wavelength : 850nm
Vendor name : Intel Corp
...
Optical diagnostics support : Yes
Laser bias current : 6.020 mA
Laser output power : 0.4739 mW / -3.24 dBm
Receiver signal average optical power : 0.6010 mW / -2.21 dBm
Module temperature : 28.13 degrees C / 82.64 degrees F
Module voltage : 3.3061 V
Alarm/warning flags implemented : Yes
Laser bias current high alarm : Off
Laser bias current low alarm : Off
...
all I get is a raw data dump:
# ethtool -m eth0
Offset Values
------ ------
0x0000: 03 04 07 00 00 00 40 00 00 00 00 01 0d 00 14 c8
0x0010: 00 00 00 00 46 53 20 20 20 20 20 20 20 20 20 20
0x0020: 20 20 20 20 00 64 9d 99 53 46 50 2d 47 45 2d 42
0x0030: 58 20 20 20 20 20 20 20 20 20 20 20 05 1e 20 37
0x0040: 20 0a 00 00 47 32 32 33 30 30 38 38 34 31 36 20
0x0050: 20 20 20 20 32 32 30 38 30 39 20 20 68 90 01 81
...
0x01f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
The reason appears to be
# ethtool --version
ethtool version 6.11 (pretty dumps disabled)
Somebody seems to have thought pretty dumps are bloat that can be removed. Well, it isn't.
Is there a build variant of ethtool with pretty dumps enabled that I can install? How to do that (there seems to be no other package with 'ethtool' in the name in the opkg packet database)? Or is there another way of accessing the DOM data, or another way to decode the raw data dumped by ethtool?
Cheers Peter