Anime4000 / RTL960x

Hacking RTL960x based xPON ONU Stick to suite your Universal OLT
The Unlicense
657 stars 111 forks source link

UFiber UF-Instant management interface appears to go down shortly after reaching O5 state #309

Closed zhongfu closed 3 months ago

zhongfu commented 3 months ago

I've got a UF-Instant running:

It's installed in a SFP+ port on a CCR2004-1G-12S+2XS.

After configuring the UF-Instant to match my ISP's Huawei HG8240T5 ONR and rebooting, it seems like the management interface goes down and the UF-Instant stops responding to pings or telnet to 192.168.1.1.

Removing the fiber cable and rebooting allows the stick to be reachable again, while inserting the fiber cable causes it to become unreachable shortly after the ONU state reaches O5 (as seen with while sleep 1; do diag gpon get onu-state; done).

This leads me to suspect that it's because of something being pushed from my ISP through OMCI, though the nature of the issue makes it quite difficult to debug.

Is there a way to... prevent this from happening, somehow? Thanks!

Anime4000 commented 3 months ago

To diagnose this issue, you'll need to dump the OMCI log and identify which MIB is causing the problem.

For instance, the D-Link DPN-FX3060V (RTL9607DQ) has an ISP-specific OMCI MIB 517 that impacts the /bin/startup script:

 iVar2 = read_pid("/var/run/boa.pid");
 if (iVar2 < 0) {
   iVar2 = mib_get(0x205,&local_10);
   if (iVar2 == 0) {
     uVar1 = va_niced_cmd(&WEBSERVER,0,0);
     local_c = local_c | uVar1;
   }
   else if (local_10 == 1) {
     uVar1 = va_niced_cmd(&WEBSERVER,1,0,"-n");
     local_c = local_c | uVar1;
   }
   else if (local_10 == 2) {
     uVar1 = va_niced_cmd(&WEBSERVER,1,0,"-s");
     local_c = local_c | uVar1;
   }
   else {
     uVar1 = va_niced_cmd(&WEBSERVER,0,0);
     local_c = local_c | uVar1;
   }
 }

In this case, the OLT pushes MIB 517, causing the WebGUI to be killed.

It's possible that your OLT is doing something similar. Alternatively, MIB 171 might be causing the SFP stick to be disabled. This can happen for two reasons:

  1. The OLT pushes MIB 171 at ME Point UNI LAN 1, instructing br0 to remove eth0, as the SFP interface is bound to br0, not eth0.
  2. The OLT pushes MIB 171 at ME Point UNI LAN 2 or another port, causing the SFP to lose connectivity to the SFP host because the SFP interface is only mapped to UNI LAN 1. This behavior is similar to the MA5671a.

Identifying the specific MIB being pushed will help in determining the root cause and finding a solution.

zhongfu commented 3 months ago

Is it possible to have omci_app not apply the configs pushed via OMCI, so I can stay connected to the SFP stick and pull the OMCI dumps?

It doesn't seem like the OMCI logfile path is configurable (possibly hardcoded in /lib/libomci_mib.so, so I can't log to e.g. /var/config and pull the OMCI dump after a reboot.

I've also tried running brctl addif br0 eth0 on a loop shortly before plugging the fiber cable in, but that doesn't change anything (connectivity is still lost until a reboot), so I guess that rules # 1 above out.

Anime4000 commented 3 months ago

I see, it's better buy other stick instead like ODI or V2801F, no more headache about proprietary OMCI

zhongfu commented 3 months ago

Yeah, I have one of the ODIs on the way -- I was just trying to get it up and running in the meantime with one of my UF-Instants, since the shipping is gonna take a really long time :)

So anyway, I spent a bit more time messing around with it, and here's what I found out:

So with all of these caveats in mind... I'd just recommend that you not use a UF-Instant, especially if you're planning on using it with an SFP+ port on a Mikrotik router (and even if you aren't). For now, I've managed to get it working though, so there's that.