[BPI-R3] Which GPON ONU is working?

no i’m connected to the bpi-r3 with serial, and ethtool is not in the firmware. i need internet on my PC with another router to speak with you

Ok then it’s probably the module compatibility with the bpi-r3. I’ll write a new fixup for the quirk.

i just tested the trick with ‘fw_setenv asc0 1’ on the MA5671A and for this module it doesn’t change anything unlike the G-010S-P, there is still the message about “slow responding”.

I need to add the slow boot quirk

stupid question maybe…but what is a “Quirk” ??

It’s a special (no-standard) handling of anything (here sfp) depending on recognized values (here vendor and serial read from eeprom of the sfp).

So sfp-code reads vendor and serial and if your values are detected some extra code is executed…e.g. to disable the standard tx-fault behaviour or adding some delay to give the embedded system to start before next access is tried

In code this looks like this:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/phy/sfp.c#n441

1 Like

ok, understood. but this will be something specific to me, this won’t help other people with other sfp brands ?

This will be special for your sfp…if anyone else has the same it helps him too

but this will never go in official bpi-r3 openwrt firmware ?

They accept sfp quirks there, so it might

well, that’s strange that we need Quirks, while in debian it works without anything special… i used the image here : https://wiki.banana-pi.org/Banana_Pi_BPI-R3#Debian

As daniel already told you they made the sfp dump by ignoring all features. Why it is pingable i don’t know,but it is not debian…it is the vendor kernel. Maybe @dale can look if it contains already a quirk for this sfp

I see an alcatel and an huaweis but have not compared with the values above.

Seems both sfp already having a quirk in mainline and vendor-code has no differences here (except the different structure).

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/phy/sfp.c#n441

Maybe they were added later and not backported to openwrt?

yes looks like they are here !

What about throwing in all quirks/fixups, just to see if we get something going on, can remove later, once it works.


static void my_quirk(const struct sfp_eeprom_id *id,
				unsigned long *modes,
				unsigned long *interfaces)
{
	pr_info("MY QUIRK IS BEING APPLIED!\n");

	/* Ensure that the MAC does not try to use inband-neg which probably fails */
	linkmode_clear_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, modes);

	linkmode_set_bit(ETHTOOL_LINK_MODE_2500baseX_Full_BIT, modes);
	__set_bit(PHY_INTERFACE_MODE_2500BASEX, interfaces);
}

static void my_fixup(struct sfp *sfp)
{
	pr_info("MY FIXUP IS BEING APPLIED!\n");

	sfp->module_t_start_up = T_START_UP_BAD_GPON;
	sfp->tx_fault_ignore = true;
	sfp->state_hw_mask &= ~(SFP_F_TX_FAULT | SFP_F_LOS);
}

	SFP_QUIRK("ALCATELLUCENT", "G010SP", my_quirk, my_fixup),

T_START_UP_BAD_GPON means better to wait 60 seconds before tryong to ping.

I was also wondering how the IP setup should be on an ONU, since I do not have one and cannot really use one either.

Is it reachable by ssh on the ip added with ip addr add ..... eth1 ?

Or is the module reachable by ssh under some fixed (programmable) ip? Should we then need to ip addr add ..... eth1 under the same subnet a different number?

My guess is that it has it’s own ip number right?

So ip addr add 162.168.20.1 and the module is programmed at 162.168.20.10?

Oops typo 192 of course :wink:

I also read somewhere, that some of them are only reachable if also the fiber is plugged in and has a signal. https://github.com/hwti/G-010S-A/issues/24

they are reachable by SSH, yes. sometimes by telnet too. So from there you can set the ip/mask/gateway you want.

in my case they are both reachable even if there is no fiber cable connected, i tested with the media converter.

if you want to know more about ONT GPON, here is the bible : https://hack-gpon.org/

Is it set at 2.5Gbps? What speed does your mediaconverter use?

it is limited to 1Gbps

Kernel log:

But the module is set at 1Gbps? That does not sound right…

the module is 2.5g/1g i guess there is auto negotiation

i was answering to this question :

What speed does your mediaconverter use?

the media converter is limited to 1G. The module is 2.5G/1G.