hwti / G-010S-A

All about Nokia G-010S-A GPON SFP
186 stars 34 forks source link

Access to the sfp module #28

Open llaforest opened 1 year ago

llaforest commented 1 year ago

Hello, sorry if my question looks basic but I'm not yet an expert...

1- I would love someone to explain to me how to access the sfp module that is connected in port 10 of my UDM. I know I might need to add an IP or route I checked but I have no clue how to gain access to it.

2- My UDM has subnet 192.168.1.0/24, for now it has a Huawei sfp module provided by Bell Canada for 1.5gig package. I would love to try to replace it by a Ubiquity sfp module and program it to talk Huawei protocol and copy the serial of the Bell sfp module. Is this possible?

3- If this work, I have another installation I have done, it's a UDM with subnet 192.168.1.6/0 with a Nokia/Lucent/Alcatel sfp module connected to Nokia switches at Bell Canada. This is the one that really needs a solution because this sfp module make my UDM crash at boot time 2/3 of the time. So most of the time when there is power failure, the internet does not come back. We need to shut down, remove sfp module, let the UDM boot and then insert back the sfp module and it usually work. Not very great. I asked to be changed to Huawei switch for this installation too but there aren't any Huawei ports in the box where I'm connected in the backstreet. So if I could use a Ubiquiti sfp module (or any other), program it to talk Nokia protocol, and copy the serial of the Nokia sfp module, maybe I could resolve the compatibility issue between the Nokia sfp module and UDM?

Does this make sense?

hwti commented 1 year ago

There is no "Nokia protocol" or "Huawei protocol", there is an OMCI standard, which has sometimes compatibility issues and/or proprietary extensions.

The Ubiquity SFP module is limited to 1Gbps, and is officially only compatible with the Ubiquity OLTs.

Which model of Nokia SFP do you have ? G-010S-A, or something else ? I suppose that by default your UDM would isolate LAN and WAN, but I don't know how to configure it : you need to both be in the right subnet, and also to access the WAN port.

llaforest commented 1 year ago

Ok, I will try to find a way to connect to my SFP module... I suppose the wan is isolated from lan but I have read someone talking about adding an IP on the wan interface in the range of the SFP module and adding a static route to use it to connect to the sfp module. I can't find this post anymore and I'm missing some knowledge to reproduce this with what I know on my UDM

Yeah, it's a Lucent/Alcatel G-010S-P and it seems to be incompatible with the UDM Pro or SE. So, if I could use another SFP module, get into it to set its id to Bell's SFP Module and set its mode to be compatible with the Nokia switch Bell CO is using, maybe I would get a more stable system that handle reboots. IMG_3771

Your site is by far the most advanced SFP module customisation procedure I have seen, so I thought you may be able to tell me if this seems feasible.

hwti commented 1 year ago

I wonder what makes the UDM crash at boot with the G-010S-P. The G-010S-P is very similar to the Huawei MA5671A (Is it this one on the other installation ?), there are people who cross-flash between them, or with a Carlitoxx firmware.

llaforest commented 1 year ago

This is very interesting! I had a remote session with Ubiquiti but once the tech found out it was my SFP module that was causing an interruption of the boot sequence, he stopped there, and they did not want to do more to find out what was the issue. Finally, it's Bell tech that agreed to try with different hardware and it worked at my place because the box in the backstreet had Huawei ports, so he switched me there. For my other install, there is no Huawei port so I cannot swap the SFP Modules.

If I were to try the Huawei SFP but I was still connected to the Nokia switch on Bell's side, are they similar enough it would work out of the box, or would I need to enter the SFP module and do some magic?

On the UDM, finding what causes the crash is feasible... I have the full support archive generated when I booted with no SFP module. Then I inserted the SFP module, and the system crashed the same way it does when I booted with SFP module. I generated the full support archive at that point too. So, in theory, a diff somewhere along the hundreds of log files should show what happened on the UDM.

I'm not good enough and I tried but could not isolate the issue except in journalclt when I can see the difference when the system crashed or not crashed... This diff is good but there are so many things and I do not know where to look... image

llaforest commented 1 year ago

Here is the picture of my Huawei SFP module... IMG_3821

llaforest commented 1 year ago

I have managed to access the sfp module through ssh with user root and pass admin123. Once in there, the commands I can run are really limited. Mainly: lanpsg gtop otop show_version.sh display_version Configuration Version, reboot Status dmesg

When runnig dmesg, I can see at the end [onu] serial number: HWTCXXXXXXXX

I have no clue how I could change this value. 'set' command seems to be there but I do not know how to change it. As soon as I try any other command I see, i get 'Do not support the command'...

It's very limited, anyone knows how the serial can be changed?

tdmadam commented 1 year ago

Huawei's original shell is very limited. Therefore, people are hacking this module to access the full shell to change the serial number, which is BASE64 encoded in one of the U-Boot's variables. This is a long process described in the links below.

https://hack-gpon.github.io/ont-huawei-ma5671a-root/

https://forum.openwrt.org/t/support-ma5671a-sfp-gpon/48042/25

llaforest commented 1 year ago

Ok, so that's the way... I'm not ready to do this. Will leave it as is. So basically, from the minishell, you can check stuff but cannot modify anything is that right?

tdmadam commented 1 year ago

So basically, from the minishell, you can check stuff but cannot modify anything is that right?

Aside from checking various stuff, Dying Gasp is the only setting that can be turned on or off from the user level on this limited minishell.