[BPI-R4] and SFP

I did get the following from Russel :

l think you’re suggesting that S.B1312.10.XDL requires autoneg to be disabled. I don’t think that is a property of a BiDi transceiver. All that the transceiver will be doing is converting the electrical signal to an optical signal and at the other end it gets converted back to an electrical signal. There is no “protocol” handling inside the transceivers.

If you need to turn off autoneg, that will be because the remote end also has autoneg disabled.

IEEE 802.3 1000base-X (which is the protocol used over 1000base-LX, -SX, etc) requires the use of autoneg, but we provide the ability to turn it off as you have discovered.

So, disabling autoneg as a property of the SFP transceiver is the wrong thing to do, because one could be using the same SFP transceiver with a remote end that has autoneg enabled… and then having autoneg disabled at the local end will break that setup.

Therefore, I don’t see any issue, and I would say everything is working as it should.

Yes, you will need to manually disable autoneg, but that is because the remote end has autoneg also disabled and this is expected behaviour.

2 Likes

So in this case, best solution is disable autoneg in a startup script?

1 Like

This is what I have in my startup local :

/usr/sbin/ethtool -s eth2 autoneg off duplex full

1 Like

Seems it’s better to use this way to disable autoneg if you are using newest openwrt snapshot: A new dual 10G router based on Filogic 880 (Banana Pi BPi-R4) - #795 by daniel - Hardware Questions and Recommendations - OpenWrt Forum

1 Like

What options should be added to disable “autoneg” in that new way used by @dangowrt?

The above commit makes sure flow control settings are handled by netifd even for SFP devices. You should not use rc.local for this. You may instead add a device section to /etc/config/network:

config device
  option name 'eth1'
  option rxpause '1'
  option txpause '1'

Using the rxpause or txpause option disables flow control autonegotiation, while the pause or asympause control the advertised flow control support.

rxpause/txpause

More information here: Ethernet flow control - Wikipedia

1 Like

Thanks, then the same options used in that example.

I have just updated to latest snapshot (with unattended sysupgrade) to SNAPSHOT r27229-ebe7c5f1a3 LuCi Master 24.212.79282-65b8002 and those options don’t work

Have you tried setting ‘rxpause txpause pause’ all to 0?

Yes I have no difference

Maybe you can try to ask the author? I don’t know why it doesn’t work.

1 Like

Please help me, how to apply this patch from this source - git.openwrt.org Git - openwrt/openwrt.git/commit It’s need for me for creat work sfp dfp-34x-2c2 on bpi-r4

They have this same problem in Turris Omnia with the ODI DFP-34X-2C2 SFP module:

This patch should already included in newest openwrt snapshot version. Have you tried that?

1 Like

No, I haven’t tried it yet, today I’ll install the new version of snapshot, check it and write to you about the result. Thank you very much for your answer!

My test results on latest snapshot for bpi-r4, dfp-34x-2c2 not up connection. I edit dfp-34x-2c2 eeprom, change lan_sds_mode and all my variants without good results. Default, no edited eeprom answer for ethtool eth2:

root@OpenWrt:~# ethtool eth2
 Settings for eth2:
         Supported ports: [ FIBRE ]
         Supported link modes:   1000baseX/Full
         Supported pause frame use: Symmetric Receive-only
         Supports auto-negotiation: Yes
         Supported FEC modes: Not reported
         Advertised link modes:  1000baseX/Full
         Advertised pause frame use: Symmetric Receive-only
         Advertised auto-negotiation: Yes
         Advertised FEC modes: Not reported
         Speed: Unknown!
         Duplex: Unknown! (255)
         Auto-negotiation: on
         Port: FIBRE
         PHYAD: 0
         Transceiver: internal
         Current message level: 0x000000ff (255) 
                                drv probe link timer ifdown ifup rx_err tx_err
         Link detected: no

Default, not edited eeprom answer for ethtool -m eth2:

root@OpenWrt:~# ethtool -m eth2
Identifier                                : 0x03 (SFP)
Extended identifier                       : 0x04 (GBIC/SFP defined by 2-wire interface ID)
Connector                                 : 0x01 (SC) 
Transceiver codes                         : 0x00 0x00 0x00 0x02 0x22 0x00 0x01 0x00 0x00
Transceiver type                          : Ethernet: 1000BASE-LX
Transceiver type                          : FC: intermediate distance (I)
Transceiver type                          : FC: Longwave laser (LC)
Transceiver type                          : FC: Single Mode (SM) 
Encoding                                  : 0x01 (8B/10B)
BR, Nominal                               : 1300MBd
Rate identifier                           : 0x00 (unspecified)
Length (SMF,km)                           : 20km
Length (SMF)                              : 20000m
Length (50um)                             : 0m
Length (62.5um)                           : 0m
Length (Copper)                           : 0m 
Length (OM3)                              : 0m
Laser wavelength                          : 1310nm
Vendor name                               : OEM 
Vendor OUI                                : 00:00:00 
Vendor PN                                 : STICK 
Vendor rev                                :
Option values                             : 0x00 0x1a 
Option                                    : RX_LOS implemented 
Option                                    : TX_FAULT implemented
Option                                    : TX_DISABLE implemented
BR margin, max                            : 0% 
BR margin, min                            : 0%
Vendor SN                                 : XPON23021675
Date code                                 : 230222

Edited eeprom answer for ethtool eth2:

ethtool eth2
Settings for eth2:
Supported ports: [ MII ]
10baseT/Half 10baseT/Full
                                 100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
                                 10000baseT/Full 
                                 2500baseX/Full
                                 1000baseKX/Full 
                                 10000baseKX4/Full
                                 10000baseKR/Full 
                                 1000baseX/Full 
                                 10000baseCR/Full 
                                 10000baseSR/Full
                                 10000baseLR/Full 
                                 10000baseLRM/Full
                                 10000baseER/Full
                                 2500baseT/Full
                                 5000baseT/Full
         Supported pause frame use: Symmetric Receive-only
         Supports auto-negotiation: Yes\cf1
         Supported FEC modes: Not reported
         Advertised link modes:  10000baseT/Full
                                 10000baseKX4/Full
                                 10000baseKR/Full
                                 10000baseCR/Full
                                 10000baseSR/Full
                                 10000baseLR/Full
                                 10000baseLRM/Full
                                 10000baseER/Full
         Advertised pause frame use: Symmetric Receive-only
         Advertised auto-negotiation: Yes
         Advertised FEC modes: Not reported
         Speed: Unknown! 
         Duplex: Unknown! (255)
         Auto-negotiation: on
         Port: MII
         PHYAD: 0
         Transceiver: internal
         Current message level: 0x000000ff (255)
                                drv probe link timer ifdown ifup rx_err tx_err
         Link detected: no

Edited eeprom answer for ethtool -m eth2:

root@OpenWrt:~# ethtool -m eth2
Identifier                                : 0x03 (SFP)
Extended identifier                       : 0x04 (GBIC/SFP defined by 2-wire interface ID)
Connector                                 : 0x01 (SC)
Transceiver codes                         : 0x00 0x00 0x00 0x00 0x22 0x00 0x01 0x00 0x00
Transceiver type                          : FC: intermediate distance (I)
Transceiver type                          : FC: Longwave laser (LC)
Transceiver type                          : FC: Single Mode (SM)
Encoding                                  : 0x01 (8B/10B)
BR, Nominal                               : 3100MBd
Rate identifier                           : 0x00 (unspecified)
Length (SMF,km)                           : 20km
Length (SMF)                              : 20000m
Length (50um)                             : 0m
Length (62.5um)                           : 0m
Length (Copper)                           : 0m
Length (OM3)                              : 0m
Laser wavelength                          : 1310nm
Vendor name                               : OEM
Vendor OUI                                : 00:00:00
Vendor PN                                 : STICK
Vendor rev                                :
Option values                             : 0x00 0x1a
Option                                    : RX_LOS implemented 
Option                                    : TX_FAULT implemented
Option                                    : TX_DISABLE implemented
BR margin, max                            : 0%
BR margin, min                            : 0%
Vendor SN                                 : XPON23021675
Date code                                 : 230222

Edit: moderated…please use code tags and use preview function

Does modified eeprom work on r3+23.05?

1 Like

At the moment I can’t test the functionality of the dfp-34x-2c2 with changes in eeprom on the bpi-r3, since I don’t have it.

1 Like

And also, I remembered, earlier when I had bpi-r3 dfp-34x-2c2 worked fine, but eeprom was unchanged.

1 Like

I guess it is possible that openwrt snapshot has some patch that broke sfp support, but I need a compare test to make sure.:thinking:

1 Like