Anime4000 / RTL960x

Hacking V2801F, TWCGPON657 & DFP-34X-2C2 GPON ONU SFP Stick to suite your ISP Fiber
The Unlicense
621 stars 110 forks source link

DFP-34X-2C2 uplink poor performance #58

Closed dexxter00 closed 2 years ago

dexxter00 commented 2 years ago

Hi! Another successful story, but with some problems! I'm using DFP-34X-2C2 with 220414 firmware. The SPF is plugged into Broadcom(BCM57810S) PCI-E card and the router is running OpenWRT! So far so good. The problem is no matter what I do, the uplink is limited to 10Mbps and it should be 60 Mbps. Downlink is okay, running at 95Mbps as with the original ONT. What I've tried OMCI_FAKE_OK = 0 and 1 - same OMCI_TM_OPT = 0 - net not working, 1 - same, 2 - same OMCI_VEIP_SLOT_ID = 255 - same, 11 - same PON_MODE = 1 - same, 3 - not working FIBER_MODE = 0, 1, 2, 3 - same LAN_SDS_MODE = 1 - same, 3 - same

same = DOWN - 95Mbit, UP - 10Mbit

Anime4000 commented 2 years ago

have you tried to change OMCC_VER ? default is 0x80 (128)

dexxter00 commented 2 years ago

have you tried to change OMCC_VER ? default is 0x80 (128)

Yes, OMCC_VER = 0x80 and 0x81 net is working, but same result. OMCC_VER = 0xB3 net is not working at all

What to try next? I'm in bridge mode, OMCI is provisioning 3 VLANs (NET, VOIP, TV). On Huawei ONT net working without bridge only on port 1 (OMCI is provisioning there).

Anime4000 commented 2 years ago

do you have other SFP host device to test?

dexxter00 commented 2 years ago

do you have other SFP host device to test?

What do you mean? I have only one SFP stick and the Huawei ONT from my provider.

Or you asking about another router? This same router was working in the same config, but from the stock ONT in bridge mode.

tdmadam commented 2 years ago

If you have VoIP and Internet, then usually the traffic is mapped to different upstream queues. Can you try on your router to test the Internet traffic with different 0-7 priority bits set?

dexxter00 commented 2 years ago

Can you try on your router to test the Internet traffic with different 0-7 priority bits set?

I have tried (ingress and egress) 0:0 0:1 0:3 Not helping. Anything else? Where do I find such info? Maybe in original ONT? Or in OMCI info?

tdmadam commented 2 years ago

What is the model number of your Huawei ONT? How many ethernet ports does it have? Do you have another router where you could insert SFP? Just trying to eliminate SFP+BCM57810S combo as the reason.

Collect all configuration information about bridges, queues, vlans from SFP

for ME in 00002 00005 00006 00007 00011 00024 00045 00047 00049 00050 00052 00078 00079 00083 00084 00089 00130 00131 \
00133 00134 00136 00137 00148 00157 00158 00171 00240 00244 00245 00248 00249 00250 00253 00255 00256 00257 00262 00263 \
00264 00266 00267 00268 00272 00273 00274 00277 00278 00280 00281 00284 00287 00296 00298 00307 00308 00309 00310 00311 \
00312 00321 00322 00329 00330 00334 00340 00341 65282 65294 65408 65527 65528 65529 65530 65531 74; do echo -e "\n\nMIB:" \
$ME"\n\n";omcicli mib get $ME; done;

If you decide to publish this, remove the serial number from ME6 and ME256.

Check the port status of the SFP # diag

RTK.0> port get status port all

Check how many flows in upstream and downstream.

RTK.0> gpon show us-flow
RTK.0> gpon show ds-flow
dexxter00 commented 2 years ago

HG8145V5, 4 eth ports At the moment, I don't have another router. The best is to try with Mikrotik but don't have one! This is message I get in the log when SFP port is up kern.info kernel: [12581.781063] bnx2x 0000:01:00.0 eth2: NIC Link is Up, 1000 Mbps full duplex, Flow control: ON - receive & transmit Upstream is exactly 10mbit, very simmilar to a NIC in 10mbit mode.

Here is first command output: pastebin

RTK.0> port get status port all
Port Status Speed    Duplex TX_FC RX_FC
---- ------ -----    ------ ----- -----
0    Up     1000M    Full   En    En   
2    Up     1000M    Full   Dis   Dis

RTK.0> gpon show us-flow
============================================================
    GPON ONU MAC U/S Flow Status
Flow ID | GEM Port | Type | TCont
      0 |      267 |  ETH |     0
      1 |      395 |  ETH |     1
      2 |     2699 |  ETH |     2
     64 |       11 | OMCI |    16
============================================================
RTK.0> gpon show ds-flow
============================================================
     GPON ONU MAC D/S Flow Status
Flow ID | GEM Port | Type | Multicast | AES
      0 |     4095 |  ETH |         * |    
      1 |      267 |  ETH |           |   *
      2 |      395 |  ETH |           |   *
      3 |     2699 |  ETH |           |   *
     64 |       11 | OMCI |           |   *
============================================================
tdmadam commented 2 years ago

The traffic descriptor confirms your report. The three GEM ports 267, 395, and 2699 have the upstream rate limit of 1342177 Bytes/s = 10.24Mbps

# omcicli mib get 280

MIB: 00280
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
TrafficDescriptor
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
=================================
EntityId: 0x0001
CIR: 1342177
PIR: 1342177
CBS: 0
PBS: 0
ColourMode: 0
IngressColourMarking: 0
EgressColourMarking: 0
MeterType: 0
=================================
=================================
EntityId: 0x0002
CIR: 1342177
PIR: 1342177
CBS: 0
PBS: 0
ColourMode: 0
IngressColourMarking: 0
EgressColourMarking: 0
MeterType: 0
=================================
=================================
EntityId: 0x0003
CIR: 1342177
PIR: 1342177
CBS: 0
PBS: 0
ColourMode: 0
IngressColourMarking: 0
EgressColourMarking: 0
MeterType: 0
=================================

As a test, I tried changing the OMCI_TM_OPT on my stick from 2 (Priority and rate controlled) to 0 (Priority controlled). It accepted the change, but the rate was still within the limits of whatever was assigned to the ONT. Are the hardware version and equipment ID confirmed as valid strings?

dexxter00 commented 2 years ago

Are the hardware version and equipment ID confirmed as valid strings?

# flash get HW_HWVER HW_HWVER=15AD.A # flash get GPON_ONU_MODEL GPON_ONU_MODEL=HG8145V5 OMCI_OLT_MODE =21 so I can set OMCI_SW_VER1 and OMCI_SW_VER2 They're copied from provider's ONT, but may not be sent by the stick properly, who knows? Maybe try othe SW ver? I have tried to change HW_HWVER to some random string, I still have internet, the speed is still the same.

tdmadam commented 2 years ago

Too many uknowns. It would be useful to have the original values to be sure. But it might as well be the fault of hardware that is not fully compatible with Huawei OLT. I wonder if MA5671A would work better since it has Huawei specific extensions.

I noticed a small typo in the script above that did not display the VendorID for the OLT. It is now correct. What is the brand of your OLT?

# omcicli mib get 131

MA5671A Supported MEs ``` Found 124 Managed Entities in the MIB: +----------+----------------+-------------------------------------------------- | Class id | Instance id | Class name +----------+----------------+-------------------------------------------------- | 2 | 0 (0x0000) | ONU data | 5 | 384 (0x0180) | Cardholder | 5 | 65281 (0xff01) | Cardholder | 6 | 384 (0x0180) | Circuit pack | 6 | 65281 (0xff01) | Circuit pack | 7 | 0 (0x0000) | Software image | 7 | 1 (0x0001) | Software image | 11 | 257 (0x0101) | PPTP Ethernet UNI | 83 | 257 (0x0101) | PPTP LCT UNI (hidden) | 131 | 0 (0x0000) | OLT-G | 133 | 0 (0x0000) | ONU power shedding | 134 | 0 (0x0000) | IP host config data | 158 | 0 (0x0000) | ONU remote debug (hidden) | 160 | 0 (0x0000) | Equipment extension pkg | 256 | 0 (0x0000) | ONU-G | 257 | 0 (0x0000) | ONU2-G | 262 | 32768 (0x8000) | T-CONT | 262 | 32769 (0x8001) | T-CONT | 262 | 32770 (0x8002) | T-CONT | 262 | 32771 (0x8003) | T-CONT | 262 | 32772 (0x8004) | T-CONT | 262 | 32773 (0x8005) | T-CONT | 262 | 32774 (0x8006) | T-CONT | 262 | 32775 (0x8007) | T-CONT | 263 | 32769 (0x8001) | ANI-G | 264 | 257 (0x0101) | UNI-G | 277 | 128 (0x0080) | Priority queue | 277 | 129 (0x0081) | Priority queue | 277 | 130 (0x0082) | Priority queue | 277 | 131 (0x0083) | Priority queue | 277 | 132 (0x0084) | Priority queue | 277 | 133 (0x0085) | Priority queue | 277 | 134 (0x0086) | Priority queue | 277 | 135 (0x0087) | Priority queue | 277 | 32768 (0x8000) | Priority queue | 277 | 32769 (0x8001) | Priority queue | 277 | 32770 (0x8002) | Priority queue | 277 | 32771 (0x8003) | Priority queue | 277 | 32772 (0x8004) | Priority queue | 277 | 32773 (0x8005) | Priority queue | 277 | 32774 (0x8006) | Priority queue | 277 | 32775 (0x8007) | Priority queue | 277 | 32776 (0x8008) | Priority queue | 277 | 32777 (0x8009) | Priority queue | 277 | 32778 (0x800a) | Priority queue | 277 | 32779 (0x800b) | Priority queue | 277 | 32780 (0x800c) | Priority queue | 277 | 32781 (0x800d) | Priority queue | 277 | 32782 (0x800e) | Priority queue | 277 | 32783 (0x800f) | Priority queue | 277 | 32784 (0x8010) | Priority queue | 277 | 32785 (0x8011) | Priority queue | 277 | 32786 (0x8012) | Priority queue | 277 | 32787 (0x8013) | Priority queue | 277 | 32788 (0x8014) | Priority queue | 277 | 32789 (0x8015) | Priority queue | 277 | 32790 (0x8016) | Priority queue | 277 | 32791 (0x8017) | Priority queue | 277 | 32792 (0x8018) | Priority queue | 277 | 32793 (0x8019) | Priority queue | 277 | 32794 (0x801a) | Priority queue | 277 | 32795 (0x801b) | Priority queue | 277 | 32796 (0x801c) | Priority queue | 277 | 32797 (0x801d) | Priority queue | 277 | 32798 (0x801e) | Priority queue | 277 | 32799 (0x801f) | Priority queue | 277 | 32800 (0x8020) | Priority queue | 277 | 32801 (0x8021) | Priority queue | 277 | 32802 (0x8022) | Priority queue | 277 | 32803 (0x8023) | Priority queue | 277 | 32804 (0x8024) | Priority queue | 277 | 32805 (0x8025) | Priority queue | 277 | 32806 (0x8026) | Priority queue | 277 | 32807 (0x8027) | Priority queue | 277 | 32808 (0x8028) | Priority queue | 277 | 32809 (0x8029) | Priority queue | 277 | 32810 (0x802a) | Priority queue | 277 | 32811 (0x802b) | Priority queue | 277 | 32812 (0x802c) | Priority queue | 277 | 32813 (0x802d) | Priority queue | 277 | 32814 (0x802e) | Priority queue | 277 | 32815 (0x802f) | Priority queue | 277 | 32816 (0x8030) | Priority queue | 277 | 32817 (0x8031) | Priority queue | 277 | 32818 (0x8032) | Priority queue | 277 | 32819 (0x8033) | Priority queue | 277 | 32820 (0x8034) | Priority queue | 277 | 32821 (0x8035) | Priority queue | 277 | 32822 (0x8036) | Priority queue | 277 | 32823 (0x8037) | Priority queue | 277 | 32824 (0x8038) | Priority queue | 277 | 32825 (0x8039) | Priority queue | 277 | 32826 (0x803a) | Priority queue | 277 | 32827 (0x803b) | Priority queue | 277 | 32828 (0x803c) | Priority queue | 277 | 32829 (0x803d) | Priority queue | 277 | 32830 (0x803e) | Priority queue | 277 | 32831 (0x803f) | Priority queue | 278 | 65280 (0xff00) | Traffic scheduler | 278 | 65281 (0xff01) | Traffic scheduler | 278 | 65282 (0xff02) | Traffic scheduler | 278 | 65283 (0xff03) | Traffic scheduler | 278 | 65284 (0xff04) | Traffic scheduler | 278 | 65285 (0xff05) | Traffic scheduler | 278 | 65286 (0xff06) | Traffic scheduler | 278 | 65287 (0xff07) | Traffic scheduler | 278 | 65346 (0xff42) | Traffic scheduler | 278 | 65347 (0xff43) | Traffic scheduler | 290 | 257 (0x0101) | Dot1X port ext pkg | 297 | 0 (0x0000) | Port mapping pkg | 336 | 0 (0x0000) | ONU dyn pwr mngmt ctrl | 347 | 1 (0x0001) | IPv6 Host Config data (hidden) | 350 | 0 (0x0000) | hwprivatedata3 | 353 | 2 (0x0002) | xml file image | 370 | 257 (0x0101) | omci hw configuration and | 373 | 0 (0x0000) | hwprivatedata | 376 | 0 (0x0000) | xml table data | 65427 | 350 (0x015e) | hwprivatedata2 | 65427 | 370 (0x0172) | hwprivatedata2 | 65427 | 376 (0x0178) | hwprivatedata2 | 65427 | 65437 (0xff9d) | hwprivatedata2 | 65437 | 0 (0x0000) | transparent channel data | 65456 | 0 (0x0000) | OpticHwExtendInfo | 65530 | 0 (0x0000) | LOID (hidden) +----------+----------------+-------------------------------------------------- ```
dexxter00 commented 2 years ago

I think it's a Huawei OLT. I can't source MA5671A at the moment, nor I will have a chance in the near future. The original values are configured as seen from the WebUI of the ONT. The tests are made with them. Trials are made with other strings as well as OMCI_OLT_MODE=1, but everytime it gives the same results. What can be done, maybe @Anime4000 can have some idea?!?

# omcicli mib get 131 ``` XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX OltG XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ================================= EntityId: 0x00 OltVendorId: 0x48575443 EquipId: Version: 10 ToDInfo: Sequence number of GEM superframe: 0x0 Timestamp: secs 0, nanosecs 0 ================================= ```

EDIT: take a look here #gpon-flow - it also shows 1048568 and 4194296 like in my case!

tdmadam commented 2 years ago

That's the problem with web interfaces. What GUI developers display for users doesn't always match the strings used by engineers to connect.

OltVendorId: 0x48575443 so it is HWTC

it also shows 1048568 and 4194296

These hardcoded ONT values are in Kbps so it is 1Gbps and 4Gbps. They are used to limit the bandwidth per port. As @stich86 pointed out they cause a problem for people who have higher plans and need to be overriten to go above 1Gbps.

The other value (10.24Mbps) must come from the DBA profile assigned by the ISP.

Anime4000 commented 2 years ago

@dexxter00 try do something simple first, since you have tried doing various flash set... have you tried other firmware?

dexxter00 commented 2 years ago

@Anime4000

@dexxter00 try do something simple first, since you have tried doing various flash set... have you tried other firmware?

Yes, first tried with M114_sfp_ODI_Vlan_220414 , then tried with M114_sfp_ODI_hybrid_220527 , now I'm running [M114_sfp_ODI_220304. With 527 - can't seem to bridge port and no internet. With 304 - internet is working, but same speed.

@tdmadam - do you know which commands I can use inside Huawei's shell so I can get real values? I have access to SSH / Telnet of stock ONT.

tdmadam commented 2 years ago

@tdmadam - do you know which commands I can use inside Huawei's shell so I can get real values? I have access to SSH / Telnet of stock ONT.

This command is from my Echolife. Hopefully it is also present in your model.

WAP>omcicmd show log

OLT Type: OTHER OLT

[1970-01-01 00:01:43.200614]OLT->ONT: Priority=1,SN=7, Device ID=0xA
MT=MIB Reset(15), MeID=ONT DATA(2), InstID=0
-----------------------------------------------
80 07 4f 0a 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00

Extract all hex lines from the log Follow my github on how to read this in Wireshark. Use omci.lua from my repository as I started updating this file with missing MEs If anyone wants to write a script to make it simpler, feel free to do so. Tomorrow I leave for a business trip, so my time will be limited. The MEs you want to check first are 6, 7, 256, 257

ToTheCLI commented 2 years ago

Had the same issue fixed it by Setting OMCC Ver to 0xB0 YMMV.

ToTheCLI commented 2 years ago

Try flash set OMCC_VER 176

dexxter00 commented 2 years ago

Try flash set OMCC_VER 176

Already tried all the options in the WebGUI. Apperantly, only 0x80 and 0x81 are working and I'm not getting Internet with others.

dexxter00 commented 2 years ago

Hello again! Today I have tried to manipulate omci provisioned data with no luck. omcicli mib set : set MIB ME attribute {classId, entityId, attrName, attrValue}

Also, stock ONT data verified from CLI, Web Interface does NOT provide wrong data in my case! When OMCI_TM_OPT=0, there's no MIB 280(TrafficDescriptor) provisioned and no ds and us flows but I get O5. Tried changing SW_SWVER and OMCI_SW_VER# to something unreal and same results. So maybe OLT doesn't care about them?

@tdmadam - I have this command on my ONT. Done all the instructions and I've got some data, but in my case MIB 6 is not present and MIB 256, 257 are present, but don't get any usable data (it says change Date & Time on 256).

dexxter00 commented 2 years ago

Thank you all for your help. For some reason, my ISP have changed the OLT to ZTE and now I'm problem free. Now I'm getting OltVendorId: 0x5a544547, upload speed is normal and not getting MIB 280 provisioned.