BPI R3 can't set eth1 (SFP) autoneg off 1000 full duplex

Hi,

Trying again, hopefully someone can help. Using latest OpenWRT snapshot r24002-e3559fb445.

My ISP has no autonegotiation enabled on FttH link: image

I like to use BPI-R3 directly connected to FTU as I do now with my Ubiquiti ER-X-SFP running an older OpenWRT release - which is capable of setting fixed speed settings on SFP port.

When I try to fix speed settings using ethtool, I receive this output:

root@OpenWrt:/# ethtool -s eth1 autoneg off[ 2193.509145] sfp sfp-1: Unable to ascertain link mode
 speed 1000 dupl[ 2193.514493] mtk_soc_eth 15100000.ethernet eth1: selection of interface failed, advertisement 0000000,00000000,00006400
ex full
Cannot set new settings: Invalid argument
  not setting speed
  not setting duplex
  not setting autoneg

If I use ethtool to set settings individually - which does seem to push without errors - it ends up also in a non-functional state:

root@OpenWrt:/# ethtool -s eth1 autoneg off
root@OpenWrt:/# ethtool -s eth1 speed 1000
root@OpenWrt:/# ethtool -s eth1 duplex full
root@OpenWrt:/# ethtool eth1
Settings for eth1:
        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: No
        Advertised FEC modes: Not reported
        Speed: Unknown!
        Duplex: Unknown! (255)
        Port: FIBRE
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: off
        Current message level: 0x000000ff (255)
                               drv probe link timer ifdown ifup rx_err tx_err
        Link detected: yes

Any help would be greatly appreciated.

Removed ethtool, installed ethtool-full. Received no error on command line, but also no change in behavior:

root@OpenWrt:/sys/class/net/eth1# ethtool -s eth1 speed 1000 duplex full autoneg
 off
root@OpenWrt:/sys/class/net/eth1# ethtool eth1
Settings for eth1:
        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: No
        Advertised FEC modes: Not reported
        Speed: Unknown!
        Duplex: Unknown! (255)
        Auto-negotiation: off
        Port: FIBRE
        PHYAD: 0
        Transceiver: internal
        Current message level: 0x000000ff (255)
                               drv probe link timer ifdown ifup rx_err tx_err
        Link detected: yes

Please post “ethtool -m eth1” output so that we know the exact model of your sfp. Eth1 is always 2.5g, so if your sfp is lower speed it needs to detect a phy or handling it without reporting the correct speed (with IPG)

These Unknown are to be expected but doesn’t mean it is not working.

Link detected: yes Actually is good news, your link is up and running. Looks like you need to see what else is going wrong, if there is anything wrong here.

Is it a sfp-module provided by KPN or did you buy one yourself? (the green color is a bit familiar)

Due to my active internet I have reproduced the issue on a cisco switch which has the other Ubiquiti UF-SM-1G-S SFP module inserted, they come as a pair.

In autoneg, it works - get ip on interface set in different vlan. However, fixed settings it doesn’t. Unlucky me that my ISP doesn’t do autoneg.

root@OpenWrt:/# ethtool -m eth1
        Identifier                                : 0x03 (SFP)
        Extended identifier                       : 0x04 (GBIC/SFP defined by 2-wire interface ID)
        Connector                                 : 0x07 (LC)
        Transceiver codes                         : 0x00 0x00 0x00 0x40 0x00 0x00 0x00 0x00 0x00
        Transceiver type                          : Ethernet: BASE-BX10
        Encoding                                  : 0x01 (8B/10B)
        BR, Nominal                               : 1300MBd
        Rate identifier                           : 0x00 (unspecified)
        Length (SMF,km)                           : 3km
        Length (SMF)                              : 3000m
        Length (50um)                             : 0m
        Length (62.5um)                           : 0m
        Length (Copper)                           : 0m
        Length (OM3)                              : 0m
        Laser wavelength                          : 1310nm
        Vendor name                               : UBNT
        Vendor OUI                                : 00:00:00
        Vendor PN                                 : UF-SM-1G-S
        Vendor rev                                :
        Option values                             : 0x20 0x0a
        Option                                    : RX_LOS implemented
        Option                                    : TX_FAULT implemented
        Option                                    : Power level 3 requirement
        BR margin, max                            : 0%
        BR margin, min                            : 0%
        Vendor SN                                 : FT16101506897
        Date code                                 : 161019
        Optical diagnostics support               : Yes
        Laser bias current                        : 17.130 mA
        Laser output power                        : 0.2000 mW / -6.99 dBm
        Receiver signal average optical power     : 0.2311 mW / -6.36 dBm
        Module temperature                        : 20.89 degrees C / 69.61 degrees F
        Module voltage                            : 3.2758 V
        Alarm/warning flags implemented           : Yes
        Laser bias current high alarm             : Off
        Laser bias current low alarm              : Off
        Laser bias current high warning           : Off
        Laser bias current low warning            : Off
        Laser output power high alarm             : Off
        Laser output power low alarm              : Off
        Laser output power high warning           : Off
        Laser output power low warning            : Off
        Module temperature high alarm             : Off
        Module temperature low alarm              : Off
        Module temperature high warning           : Off
        Module temperature low warning            : Off
        Module voltage high alarm                 : Off
        Module voltage low alarm                  : Off
        Module voltage high warning               : Off
        Module voltage low warning                : Off
        Laser rx power high alarm                 : Off
        Laser rx power low alarm                  : Off
        Laser rx power high warning               : Off
        Laser rx power low warning                : Off
        Laser bias current high alarm threshold   : 100.000 mA
        Laser bias current low alarm threshold    : 0.000 mA
        Laser bias current high warning threshold : 90.000 mA
        Laser bias current low warning threshold  : 0.100 mA
        Laser output power high alarm threshold   : 0.6310 mW / -2.00 dBm
        Laser output power low alarm threshold    : 0.1000 mW / -10.00 dBm
        Laser output power high warning threshold : 0.5012 mW / -3.00 dBm
        Laser output power low warning threshold  : 0.1259 mW / -9.00 dBm
        Module temperature high alarm threshold   : 90.00 degrees C / 194.00 degrees F
        Module temperature low alarm threshold    : -45.00 degrees C / -49.00 degrees F
        Module temperature high warning threshold : 85.00 degrees C / 185.00 degrees F
        Module temperature low warning threshold  : -40.00 degrees C / -40.00 degrees F
        Module voltage high alarm threshold       : 3.8000 V
        Module voltage low alarm threshold        : 2.7000 V
        Module voltage high warning threshold     : 3.7000 V
        Module voltage low warning threshold      : 2.8000 V
        Laser rx power high alarm threshold       : 1.0000 mW / 0.00 dBm
        Laser rx power low alarm threshold        : 0.0040 mW / -23.98 dBm
        Laser rx power high warning threshold     : 0.7943 mW / -1.00 dBm
        Laser rx power low warning threshold      : 0.0050 mW / -23.01 dBm

KPN doesn’t offer separate modules afaik. KPN CEP devices are usually all-1-one.

Because the link is reported as detected (perhapse only on sfp module), it may be worth checking how the mac is configured.

Do you have some dmesg output?

The Ubiquiti ER-X-SFP only has a 1Gbps sfp port, so only has sgmii mode.

It may be so that the mac of the R3 stays in the mode set in the devicetree phy-mode = "2500base-x"; if there is no inband negotiation.

I’m not sure how you change it in openwrt to phy-mode = "sgmii"

If using kernel 6.1 here:

1 Like

Changed to 6.1 kernel… which works. Thanks! Didn’t have to alter phymode. Problem apparantly exists in 5.15 target config.

root@OpenWrt:/# ethtool eth1
Settings for eth1:
        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: No
        Advertised FEC modes: Not reported
        Speed: 1000Mb/s
        Duplex: Full
        Auto-negotiation: off
        Port: FIBRE
        PHYAD: 0
        Transceiver: internal
        Current message level: 0x000000ff (255)
                               drv probe link timer ifdown ifup rx_err tx_err
        Link detected: yes
root@OpenWrt:/# ifconfig br-lan2.1
br-lan2.1 Link encap:Ethernet  HWaddr EE:A1:83:33:2B:0D
          inet addr:10.0.1.206  Bcast:10.0.1.255  Mask:255.255.255.0
          inet6 addr: fe80::eca1:83ff:fe33:2b0d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:33725 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2252 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:5411730 (5.1 MiB)  TX bytes:185969 (181.6 KiB)