Eeprom dump SFP 2.5G

I need eeprom dump from SFP 2.5G modules on RTL8221B chip, because I accidentally damaged the eeproms in my SFP :wink:

An example reading as below will be OK, thank you :slight_smile:

rafal@Ubuntu:~/openwrt$ sudo ethtool -m sfp2 hex on
Offset		Values
------		------
0x0000:		08 00 27 f4 de 65 00 00 ff ff 00 00 00 00 00 00 
0x0010:		00 00 00 00 08 44 1e 00 86 80 0e 10 86 80 40 30 
0x0020:		00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
0x0030:		00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
0x0040:		00 00 61 70 0c 28 c8 00 c8 00 00 00 00 00 00 00 
0x0050:		00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 06 
0x0060:		00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
0x0070:		00 00 00 00 00 00 00 00 00 00 00 00 00 00 2f 3b

hello, i have a tp-link TL-SM410U, Is this the eeprom dump you’re looking for ? How do i know the chip used by my transceiver ?

I opened the SFP and saw to the inside but I would appreciate any eeprom with SFP that works properly with bananapi bpi-r3 :wink: Inside sfp

It really depends on which sfp model/brand. There are very different models with rtl8221b inside…

If you don’t know, output of these could help: Set the right port ofcourse.

i2cdetect -y 0
i2cdump -y 0 0x50
i2cdump -y 0 0x51
i2cdump -y 0 0x56

looks like access to the eeprom is not supported on my transceiver

root@OpenWrt:~# ethtool -e sfp2
Cannot get EEPROM data: Not supported
root@OpenWrt:~#

ethtool -m sfp2 hex on
root@OpenWrt:~# ethtool -m sfp2 hex on
Offset          Values
------          ------
0x0000:         03 04 07 00 00 00 00 00 00 40 00 01 1f 00 00 00
0x0010:         00 00 00 00 54 50 2d 4c 49 4e 4b 20 20 20 20 20
0x0020:         20 20 20 20 00 00 00 00 54 4c 2d 53 4d 34 31 30
0x0030:         55 20 20 20 20 20 20 20 32 2e 30 20 00 00 00 74
0x0040:         00 18 00 00 31 32 32 43 33 30 34 30 30 31 33 37
0x0050:         32 20 20 20 32 32 31 32 32 38 20 20 00 00 00 85
0x0060:         10 00 1c 00 ff ff ff ff ff ff ff ff ff ff ff ff
0x0070:         ff ff ff ff ff ff ff ff 53 46 50 2d 54 0c 64 ff
0x0080:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x0090:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00a0:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00b0:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00c0:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00d0:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00e0:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00f0:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
root@OpenWrt:~#

so this is the dump for this transceiver : https://www.aliexpress.com/item/1005003922625830.html

thanks @ericwoud for the correct command line

Thank you, I will check later and write if my SFP has started correctly

Here is mine, TP-LINK TL-SM410U, I have never tried 1G with it, I am happy at 2.5G

root@OpenWrt:~# ethtool -e eth1
Cannot get EEPROM data: Not supported

root@OpenWrt:~# ethtool -e sfp2
Cannot get EEPROM data: Not supported
root@OpenWrt:~# ethtool -m sfp2 hex on
Offset          Values
------          ------
0x0000:         03 04 07 00 00 00 00 00 00 40 00 01 1f 00 00 00
0x0010:         00 00 00 00 54 50 2d 4c 49 4e 4b 20 20 20 20 20
0x0020:         20 20 20 20 00 00 00 00 54 4c 2d 53 4d 34 31 30
0x0030:         55 20 20 20 20 20 20 20 32 2e 30 20 00 00 00 74
0x0040:         00 18 00 00 31 32 33 36 31 4e 31 30 30 30 31 37
0x0050:         31 20 20 20 32 33 30 36 32 30 20 20 00 00 00 8a
0x0060:         10 00 db 00 ff ff ff ff ff ff ff ff ff ff ff ff
0x0070:         ff ff ff ff ff ff ff ff 53 46 50 2d 54 0c 64 ff
0x0080:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x0090:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00a0:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00b0:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00c0:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00d0:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00e0:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00f0:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

Dump from @Rooot is better than nothing but SFP I have to pull it out and plug it back in to have the connected ethernet cable recognized, it also takes longer to establish a connection via gpon/pppoe. On your dump eeprom, it connects, on mine I had to disconnect from the SFP socket, so it is a little better

Settings for sfp2:
        Supported ports: [ FIBRE ]
        Supported link modes:   2500baseX/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  2500baseX/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Speed: 2500Mb/s
        Duplex: Full
        Auto-negotiation: on
        Port: FIBRE
        PHYAD: 0
        Transceiver: internal
        Supports Wake-on: d
        Wake-on: d
        Link detected: no
root@OpenWrt:/# [  349.719868] sfp sfp-2: module transmit fault indicated
[  349.725026] sfp sfp-2: module removed
[  352.928487] sfp sfp-2: module TP-LINK          TL-SM410U        rev 2.0  sn 122C304001372    dc 221228
[  358.489196] mt7530-mdio mdio-bus:1f sfp2: Link is Up - 2.5Gbps/Full - flow control off
[  358.497302] br-lan: port 5(sfp2) entered blocking state
[  358.502526] br-lan: port 5(sfp2) entered forwarding state

root@OpenWrt:/# ethtool sfp2
Settings for sfp2:
        Supported ports: [ FIBRE ]
        Supported link modes:   2500baseX/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  2500baseX/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Speed: 2500Mb/s
        Duplex: Full
        Auto-negotiation: on
        Port: FIBRE
        PHYAD: 0
        Transceiver: internal
        Supports Wake-on: d
        Wake-on: d
        Link detected: yes

More from mine, TP-LINK TL-SM410U

ethtool --driver sfp2
driver: dsa
version: 5.15.137
firmware-version: N/A
expansion-rom-version:
bus-info: platform
supports-statistics: yes
supports-test: yes
*supports-eeprom-access: no*
*supports-register-dump: no*
*supports-priv-flags: no*