Go-Fibereasy SFP module i2c/eeprom investgation (on Bpi-R4)

This thread is intended more as a work log than a request for help.

Scenario: I have a Banana Pi BPi-R4, and 3 SFP (possibly SFP+) to RJ45 modules from seller Go-Fibereasy on Aliexpress, with various incorrect eeprom data. They’re

Printed Label Vendor PN Transceiver type Connector Works?
GSFP-1G-TX SFP-1G-T Ethernet: 1000BASE-SX LC No
GSFP-2.5G-T SFP-2.5G-T FC: Twisted Pair (TP) LC 1G, 2.5G
GSFP-10G-TX SFP-10G-T 10G Ethernet: 10G Base-SR LC No

Full ethtool –module-info https://gist.github.com/moreati/662e2adba947eb5ce54f42c523578ca8. The working module appears to auto-negotiate speed, despite declaring it can’t.

First I’ll try to change the tranceiver type, using i2csfp

Progress with GSFP-1G-TX

  • I changed the reported Tranceiver type from Ethernet: 1000BASE-SX → Ethernet: 1000BASE-T
  • The change persisted - it survived unplugging/replugging the SFP module
  • This did result in a working link

Details

Bytes at offsets 3 - 10, 36, and 62 (of address 0xA0) specify “Tranceiver type” as reported by ethtool -–module-info. AFAICT these same offsets and values are in the output of ethtool -–module-info… hex on and section 0x50 of the output of i2csfp sfp2 eepromdump.

To interpret the values use table 5-3 of specification SFF-8472 and table 4-6 of SFF-8024. As shipped my GSFP-1G-TX showed

root@OpenWrt:~# head -n3 SFP-1G-T.ethtool.module-info.hex
Offset          Values
------          ------
0x0000:         03 04 00 00 00 00 01 00 00 00 00 01 0d 00 00 00
root@OpenWrt:~# cat SFP-1G-T.ethtool.module-info
        Identifier                                : 0x03 (SFP)
        Extended identifier                       : 0x04 (GBIC/SFP defined by 2-wire interface ID)
        Connector                                 : 0x00 (unknown or unspecified)
        Transceiver codes                         : 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00
        Transceiver type                          : Ethernet: 1000BASE-SX
...

byte offset 6 had the value 0x01 - meaning 1000BASE-SX according to table 5-3. Using i2csfp sfp2 byte write 80 6 8 (N.B, numbers in command are decimal, 80 == 0x50) I changed byte offset 6 to the value 0x80 - meaning 1000BASE-T. I then removed the exlcusive access that used with i2csfp restore.

So now I have

root@OpenWrt:~# ethtool --module-info sfp-lan hex on | head -n3
Offset          Values
------          ------
0x0000:         03 04 00 00 00 00 08 00 00 00 00 01 0d 00 00 00
root@OpenWrt:~# ethtool --module-info sfp-lan
        Identifier                                : 0x03 (SFP)
        Extended identifier                       : 0x04 (GBIC/SFP defined by 2-wire interface ID)
        Connector                                 : 0x00 (unknown or unspecified)
        Transceiver codes                         : 0x00 0x00 0x00 0x08 0x00 0x00 0x00 0x00 0x00
        Transceiver type                          : Ethernet: 1000BASE-T
...

Unfortunately the module still doesn’t detect/establish a link (atleast automatically). I may poke at it a bit more.

Notes

On the BPi-R4 the SFP designationss are

ethtool i2csfp
sfp-lan sfp2
sfp-wan sfp1