Issue with BPI-R4 and XGSPON SFP+ Module

Hi there. I have a strange issue and as newcomer here in OpenWrt I can't solve it by myself. I have Banana Pi BPI-R4 with latest OpenWrt on it (24.10), and on this version ethtool shows just a bunch of hex bytes that I can't read, but device information is parsed and formatted properly with preinstalled version of OpenWrt. But even on preinstalled version of OpenWrt I have an issue with XGSPON SFP+ stick, ethtool eth2 reports Link detected: no what probably can be the reason of 0 packets rx/tx. My provider uses VLAN 35 (I found that on their website and also provided ONT shows the same).

Thanks in advance for any advices.

Here is the full report of ethtool and syslogs about sfp/eth2:

Identifier                                : 0x03 (SFP)
Extended identifier                       : 0x04 (GBIC/SFP defined by 2-wire interface ID)
Connector                                 : 0x01 (SC)
Transceiver codes                         : 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Encoding                                  : 0x06 (64B/66B)
BR, Nominal                               : 9900MBd
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                          : 1270nm
Vendor name                               : SourceDoing
Vendor OUI                                : 00:00:00
Vendor PN                                 : 1325-00051
Vendor rev                                : V1.0
Option values                             : 0x10 0x1a
Option                                    : RX_LOS implemented
Option                                    : TX_FAULT implemented
Option                                    : TX_DISABLE implemented
Option                                    : Paging implemented
BR margin, max                            : 0%
BR margin, min                            : 0%
Vendor SN                                 : **HIDDEN**
Date code                                 : 230113
Optical diagnostics support               : Yes
Laser bias current                        : 0.000 mA
Laser output power                        : 0.0001 mW / -40.00 dBm
Receiver signal average optical power     : 0.0456 mW / -13.41 dBm
Module temperature                        : 34.84 degrees C / 94.70 degrees F
Module voltage                            : 3.3281 V
Alarm/warning flags implemented           : Yes
Laser bias current high alarm             : Off
Laser bias current low alarm              : On
Laser bias current high warning           : Off
Laser bias current low warning            : On
Laser output power high alarm             : Off
Laser output power low alarm              : On
Laser output power high warning           : Off
Laser output power low warning            : On
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   : 110.000 mA
Laser bias current low alarm threshold    : 5.000 mA
Laser bias current high warning threshold : 100.000 mA
Laser bias current low warning threshold  : 10.000 mA
Laser output power high alarm threshold   : 6.5463 mW / 8.16 dBm
Laser output power low alarm threshold    : 1.9952 mW / 3.00 dBm
Laser output power high warning threshold : 6.5463 mW / 8.16 dBm
Laser output power low warning threshold  : 2.5118 mW / 4.00 dBm
Module temperature high alarm threshold   : 95.00 degrees C / 203.00 degrees F
Module temperature low alarm threshold    : -30.00 degrees C / -22.00 degrees F
Module temperature high warning threshold : 85.00 degrees C / 185.00 degrees F
Module temperature low warning threshold  : -20.00 degrees C / -4.00 degrees F
Module voltage high alarm threshold       : 3.6300 V
Module voltage low alarm threshold        : 2.9700 V
Module voltage high warning threshold     : 3.4650 V
Module voltage low warning threshold      : 3.1350 V
Laser rx power high alarm threshold       : 0.3161 mW / -5.00 dBm
Laser rx power low alarm threshold        : 0.0010 mW / -30.00 dBm
Laser rx power high warning threshold     : 0.1994 mW / -7.00 dBm
Laser rx power low warning threshold      : 0.0014 mW / -28.54 dBm


Settings for eth2.35:
        Supported ports: [ MII ]
        Supported link modes:   100baseT/Full
                                1000baseT/Full
                                10000baseKR/Full
                                1000baseX/Full
                                10000baseCR/Full
                                10000baseSR/Full
                                10000baseLR/Full
                                10000baseLRM/Full
                                10000baseER/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  100baseT/Full
                                1000baseT/Full
                                10000baseKR/Full
                                1000baseX/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: 10000Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        Link detected: no


Settings for eth2:
        Supported ports: [ MII ]
        Supported link modes:   100baseT/Full
                                1000baseT/Full
                                10000baseKR/Full
                                1000baseX/Full
                                10000baseCR/Full
                                10000baseSR/Full
                                10000baseLR/Full
                                10000baseLRM/Full
                                10000baseER/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  100baseT/Full
                                1000baseT/Full
                                10000baseKR/Full
                                1000baseX/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: 10000Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        Current message level: 0x000000ff (255)
                               drv probe link timer ifdown ifup rx_err tx_err
        Link detected: no


[    2.598565] sfp sfp@0: Host maximum power 3.0W
[    2.603022] sfp sfp@0: tx disable 1 -> 1
[    2.606949] sfp sfp@0: SM: enter empty:detached:down event insert
[    2.613034] sfp sfp@0: SM: exit probe:detached:down
[    2.618075] sfp sfp@0: SM: enter probe:detached:down event dev_attach
[    2.624509] sfp sfp@0: SM: exit probe:down:down
[    2.629166] sfp sfp@1: Host maximum power 3.0W
[    2.633613] sfp sfp@1: tx disable 1 -> 1
[    2.637660] sfp sfp@1: SM: enter empty:detached:down event dev_attach
[    2.644091] sfp sfp@1: SM: exit empty:down:down
[    2.915488] sfp sfp@0: SM: enter probe:down:down event timeout
[    2.932449] sfp sfp@0: module SourceDoing      1325-00051       rev V1.0 sn **HIDDEN**    dc 230113
[    2.941924] sfp sfp@0: sfp: support mode 00,00000000,00006040
[    2.957136] sfp sfp@0: SM: exit error:down:down
[   35.301045] sfp sfp@1: SM: enter empty:down:down event dev_up
[   35.306794] sfp sfp@1: SM: exit empty:up:down
[   35.429211] sfp sfp@0: SM: enter error:down:down event dev_up
[   35.434966] sfp sfp@0: SM: exit error:up:down
[  255.165518] sfp sfp@1: SM: enter empty:up:down event dev_down
[  255.171289] sfp sfp@1: SM: exit empty:down:down
[  255.409536] sfp sfp@0: SM: enter error:up:down event dev_down
[  255.415335] sfp sfp@0: SM: exit error:down:down
[  257.377252] sfp sfp@1: SM: enter empty:down:down event dev_up
[  257.383002] sfp sfp@1: SM: exit empty:up:down
[  257.479278] sfp sfp@0: SM: enter error:down:down event dev_up
[  257.485028] sfp sfp@0: SM: exit error:up:down
[  281.509848] sfp sfp@1: SM: enter empty:up:down event dev_down
[  281.515632] sfp sfp@1: SM: exit empty:down:down
[  281.741576] sfp sfp@0: SM: enter error:up:down event dev_down
[  281.747398] sfp sfp@0: SM: exit error:down:down
[  283.689655] sfp sfp@1: SM: enter empty:down:down event dev_up
[  283.695408] sfp sfp@1: SM: exit empty:up:down
[  283.792226] sfp sfp@0: SM: enter error:down:down event dev_up
[  283.797978] sfp sfp@0: SM: exit error:up:down

ifconfig up?

1 Like

there are two versions of ethtool - you might need the package "ethtool-full" to get more infos?

2 Likes

I did that but it doesn't help.
And thanks, ethtool-full now shows more information about SFP+ stick even on 24.10, so firmware version is not the issue anymore, but it's still doesn't do anything and still 0 packets. When I try manually request IP with DHCP it does 3 tries and fails.

Settings for eth2.35:
        Supported ports: [ MII ]
        Supported link modes:   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
        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: No
        Advertised FEC modes: Not reported
        Speed: 10Mb/s
        Duplex: Half
        Auto-negotiation: off
        Port: MII
        PHYAD: 0
        Transceiver: internal
        Link detected: no
eth2      Link encap:Ethernet  HWaddr 86:26:B5:EB:8C:B2
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:106

eth2.35   Link encap:Ethernet  HWaddr 86:26:B5:EB:8C:B2
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
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 0x00 0x00 0x00 0x00 0x00
        Encoding                                  : 0x06 (64B/66B)
        BR, Nominal                               : 9900MBd
        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                          : 1270nm
        Vendor name                               : SourceDoing
        Vendor OUI                                : 00:00:00
        Vendor PN                                 : 1325-00051
        Vendor rev                                : V1.0
        Option values                             : 0x10 0x1a
        Option                                    : RX_LOS implemented
        Option                                    : TX_FAULT implemented
        Option                                    : TX_DISABLE implemented
        Option                                    : Paging implemented
        BR margin, max                            : 0%
        BR margin, min                            : 0%
        Vendor SN                                 : **Hidden**
        Date code                                 : 230113
        Optical diagnostics support               : Yes
        Laser bias current                        : 0.000 mA
        Laser output power                        : 0.0001 mW / -40.00 dBm
        Receiver signal average optical power     : 0.0464 mW / -13.33 dBm
        Module temperature                        : 39.18 degrees C / 102.52 degrees F
        Module voltage                            : 3.3281 V
        Alarm/warning flags implemented           : Yes
        Laser bias current high alarm             : Off
        Laser bias current low alarm              : On
        Laser bias current high warning           : Off
        Laser bias current low warning            : On
        Laser output power high alarm             : Off
        Laser output power low alarm              : On
        Laser output power high warning           : Off
        Laser output power low warning            : On
        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   : 110.000 mA
        Laser bias current low alarm threshold    : 5.000 mA
        Laser bias current high warning threshold : 100.000 mA
        Laser bias current low warning threshold  : 10.000 mA
        Laser output power high alarm threshold   : 6.5463 mW / 8.16 dBm
        Laser output power low alarm threshold    : 1.9952 mW / 3.00 dBm
        Laser output power high warning threshold : 6.5463 mW / 8.16 dBm
        Laser output power low warning threshold  : 2.5118 mW / 4.00 dBm
        Module temperature high alarm threshold   : 95.00 degrees C / 203.00 degrees F
        Module temperature low alarm threshold    : -30.00 degrees C / -22.00 degrees F
        Module temperature high warning threshold : 85.00 degrees C / 185.00 degrees F
        Module temperature low warning threshold  : -20.00 degrees C / -4.00 degrees F
        Module voltage high alarm threshold       : 3.6300 V
        Module voltage low alarm threshold        : 2.9700 V
        Module voltage high warning threshold     : 3.4650 V
        Module voltage low warning threshold      : 3.1350 V
        Laser rx power high alarm threshold       : 0.3161 mW / -5.00 dBm
        Laser rx power low alarm threshold        : 0.0010 mW / -30.00 dBm
        Laser rx power high warning threshold     : 0.1994 mW / -7.00 dBm
        Laser rx power low warning threshold      : 0.0014 mW / -28.54 dBm

Check kmod-phy- package, maybe one has your sfp written on it.

I got WAS-110 XGSPON SFP+ which generally works fine. However, the module takes a long time to boot (longer than the R4) which means that the link is not ready by the time the R4 has completed to boot.
In order to trigger the module into a state which allows you to connect to the web UI despite the PON link not being up (eg. due to missing credentials) you have to toggle the link up and down a couple of times. Then it comes up and you can access the webui.

Note that I also had to disable the serial console to not have OpenWrt/Linux see loss-of-link events because the UART uses some SFP pins typically used for RX_LOS and TX_FAULT.

All XGSPON SFP modules are complex embedded Linux system by themselves. Most of them are managed in-band via a Web UI or Telnet and you do not need a PHY driver on the R4 for it to work.

This kinda smells bad, because this instructs Linux to take RX_LOS into account instead of relying on in-band status...

Hi Daniel. Thanks for the answer. Now I have 1 more XGSPON SFP+ module from FS.com, XGS-ONU-25-20NI. Looks like I should be able to replace my current ISP's module with this one, but at first I need to figure out how can I connect to it with telnet. I will try when I have time and tell.
Interesting thing is that currently ISP's device KAON PG5298A is using OpenWRT as well, but custom, old and heavily modified version to run their own module. I found a way to turn on SSH there but 22 port anyway blocked by OpenWRT firewall so it's currently impossible to connect. As a last resort I can disassemble ISP's ONU and connect to UART, but it's not needed for now. Now I just need to connect via telnet to my new SFP+ module and spoof ISP's module data there.

i had the same with my Zaram module. added a Ip adres to the sfp-wan
After that i could ssh into the module from the router.
If you want to log into it thru the network you have to make a rule from lan to wan to allow it. works over here