RTL960x icon indicating copy to clipboard operation
RTL960x copied to clipboard

TWCGPON657 bandwidth limit to 30Mbps

Open ccy opened this issue 3 years ago • 51 comments

My ISP is Maxis 100Mbps package.

I am using TWCGPON657 SFP stick. I flash the firmware to C00R657V2801F_V1.9.0-220404.tar.

I also follow the instruction perform necessary setup for the SFP stick. I am able to connect to the ISP via PPPoE.

However, when perform speedtest. The download speed cap at 30Mbps and upload is below 1Mbps.

Plug the fiber cable back to original Maxis/TM GPON, the speed is usual 100M/50M.

I also make sure the SFP port of network switch is set to 1000M.

This is the Chipset of the GPON stick:

# cat /proc/cpuinfo
system type             : RTL8672
processor               : 0
cpu model               : 56322
BogoMIPS                : 112.23
tlb_entries             : 64
mips16 implemented      : yes

Any steps I didn't do right?

ccy avatar May 13 '22 10:05 ccy

oh that's very odd...

have you copy old ONU into to new stick? clone OMCI info to trick OLT,

also, can you print and paste your bandwidth status like this https://github.com/Anime4000/RTL960x/blob/main/Docs/DIAG.md#bandwidth

Anime4000 avatar May 13 '22 15:05 Anime4000

I only copy the PLOAM password over. Is it enough?

# cat /etc/version
V1.9.0-220404 -- Sun Apr 03 17:05:04 UTC 2022

# diag
RTK.0> bandwidth get egress port all
port: 0  rate:1048568
         queue: 0  apr-index: 0
         queue: 1  apr-index: 0
         queue: 2  apr-index: 0
         queue: 3  apr-index: 0
         queue: 4  apr-index: 0
         queue: 5  apr-index: 0
         queue: 6  apr-index: 0
         queue: 7  apr-index: 0
port: 2  rate:4194296
         queue: 0  apr-index: 0
         queue: 1  apr-index: 0
         queue: 2  apr-index: 0
         queue: 3  apr-index: 0
         queue: 4  apr-index: 0
         queue: 5  apr-index: 0
         queue: 6  apr-index: 0
         queue: 7  apr-index: 0
RTK.0> bandwidth get ingress port all
port: 0 rate:1048568
port: 2 rate:4194296
RTK.0> port get status port all
Port Status Speed    Duplex TX_FC RX_FC
---- ------ -----    ------ ----- -----
0    Up     1000M    Full   Dis   Dis
2    Up     1000M    Full   Dis   Dis

ccy avatar May 14 '22 04:05 ccy

bandwidth is fine...

With TM fiber, you need correct Hardware Version, then OLT give correct OMCI Parameters

Unifi HG8240H5 ONU Hardware Version:

flash set HW_HWVER 168D.A

since you using V2801F firmware on TWCGPON657, you need generate VS_AUTH_KEY

give me your ONU Model, Stick MAC Address, I make one

Anime4000 avatar May 14 '22 09:05 Anime4000

This is my current setting:

# flash get HW_HWVER
HW_HWVER=168D.A
# flash get GPON_ONU_MODEL
GPON_ONU_MODEL=HG8240H5
# flash get ELAN_MAC_ADDR
ELAN_MAC_ADDR=6cefc6bed812
# flash get VS_AUTH_KEY
VS_AUTH_KEY=7e,c8,c9,dc,c0,23,54,85,1d,c2,32,80,36,8f,2f,af,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00

After reboot, my GPON stick will enter O5 state, so I assume it works.

However, my download/upload bandwidth still cap at 30M/1M

ccy avatar May 14 '22 09:05 ccy

try this:

flash set GPON_ONU_MODEL HG8240H5
flash set GPON_SN HWTC12345678
flash set PON_VENDOR_ID HWTC
flash set OMCI_SW_VER1 V5R019C00S125
flash set OMCI_SW_VER2 V5R019C00S125
flash set OMCI_OLT_MODE 1
flash set OMCI_FAKE_OK 1
flash set HW_CWMP_MANUFACTURER 'Huawei Technologies Co., Ltd'
flash set HW_CWMP_PRODUCTCLASS HGU
flash set HW_HWVER 168D.A
flash set ELAN_MAC_ADDR 6cefc6bed812
flash set VS_AUTH_KEY 7EC8C9DCC02354851DC23280368F2FAF

This should work with TM, this making your stick like Huawei ONU, Allo and TIME Fiber just works

Anime4000 avatar May 14 '22 09:05 Anime4000

No luck after execute your script. I assume these two lines has typo mistake:

flash get OMCI_OLT_MODE 1
flash get OMCI_FAKE_OK 1

I have changed to set when executing.

ccy avatar May 14 '22 09:05 ccy

my bad...

after enter these flash set have you tried to reboot?

Anime4000 avatar May 14 '22 09:05 Anime4000

Yes, I reboot before I try after execute those flash set command.

ccy avatar May 14 '22 10:05 ccy

I also try to plug the GPON stick to another old model L2 switch, still the same.

ccy avatar May 14 '22 10:05 ccy

that's very odd, what kind of switch are you using?

Anime4000 avatar May 14 '22 10:05 Anime4000

S5860-20SQ DGS-1210-20

ccy avatar May 14 '22 12:05 ccy

V2801F using 1000baseX it's works well with RB3011 and Fortigate but not RB5009

have other SFP host or PCIe SFP to test?

Anime4000 avatar May 14 '22 20:05 Anime4000

I don't have RB3011 and Fortigate. Is MikroTik ok?

ccy avatar May 14 '22 21:05 ccy

Yes, Mikrotik RB5009 is currently I using with ODI DFP-34X-2C2 (TM-Maxis 500/100 Plan) IMG20220515153225

RB3011 + TWCGPON657 now at my friend home, TIME 500mbps IMG20220510030034

Anime4000 avatar May 15 '22 07:05 Anime4000

I have CRS326-24G-2S+. Will try tomorrow.

ccy avatar May 15 '22 08:05 ccy

Yes, PON Stick have limited SFP Host support, RTL960x firmware kind picky which router and switch

Anime4000 avatar May 15 '22 08:05 Anime4000

I have test all other switches I have.

Fail to detect the GPON stick:

These switches can ping to the GPON stick but fail to ping once plug in TM fiber cable:

These switches can ping to GPON Stick, can establish PPPoE connection, can serve Internet but limited to 30Mbps down/1Mbps up:

Do you face the same problem on TWCGPON657?

ccy avatar May 16 '22 04:05 ccy

wow, you have a lot of switches...

What I know, RTL9601B, RTL9601CI, RTL9601D has 1000base-T LAN_SDS_MODE 0 and 1000base-X LAN_SDS_MODE 1

Meanwhile other LAN_SDS_MODE value, is SGMII and HiSGMII, which is require SFP to have intermediate MII translation chipset to Ethernet. I afraid that not all Switch and Router support MII

but you can try:

echo 0 > /proc/lan_sds/lan_sds_cfg
echo 2 > /proc/lan_sds/lan_sds_cfg
echo 3 > /proc/lan_sds/lan_sds_cfg

Here my Mikrotik RB5009 + ODI DFP-34X-2C2

# cat /proc/lan_sds/lan_sds_cfg
lan_sds_mode = 3(SGMII MAC)
# flash get LAN_SDS_MODE
LAN_SDS_MODE=0

Value are not match, ODI DFP-34X-2C2 can auto nego with host with appropriate mode

However, you can buy this as MII translation: Hellotek T8501S image

Or buy ODI DFP-34X-2C2 with Mikrotik CRS305-1G-4S+IN or CCR2004-1G-12S+2XS, 100% compatible including 2.5Gb support!!!

Anime4000 avatar May 16 '22 10:05 Anime4000

I prefer direct plug the GPON stick to my L2/L3 switch so I reduce a 12VDC power adapter to power the external device like TM's Huawei GPON.

ccy avatar May 16 '22 10:05 ccy

I understand, I just to make sure that TWCGPON657 have an issue or something else, I afraid TWCGPON657 that you have is different hardware revision...

Mikrotik Router CCR2004-1G-12S+2XS and CRS305-1G-4S+IN Switch currently full supported, it has Port Extender which can support various MII (SGMII & HiSGMII) and base-X

meantime, try this command if got any different

echo 0 > /proc/lan_sds/lan_sds_cfg
echo 2 > /proc/lan_sds/lan_sds_cfg
echo 3 > /proc/lan_sds/lan_sds_cfg

Anime4000 avatar May 16 '22 12:05 Anime4000

How to identify the hardware of my GPON stick?

ccy avatar May 16 '22 12:05 ccy

How to identify the hardware of my GPON stick?

this you need disassemble and compare

Anime4000 avatar May 16 '22 16:05 Anime4000

I try these command:

echo 0 > /proc/lan_sds/lan_sds_cfg
echo 2 > /proc/lan_sds/lan_sds_cfg
echo 3 > /proc/lan_sds/lan_sds_cfg

Once execute, the GPON stick immediately freeze and no response. Need to unplug and plug to reboot.

This is the default value:

# cat /proc/lan_sds/lan_sds_cfg
lan_sds_mode = 1(Fiber 1G)

ccy avatar May 17 '22 00:05 ccy

I bought a new ODI DFP-34X-2C2 GPON stick

$ cat /proc/cpuinfo
system type             : RTL8672
processor               : 0
cpu model               : 56322
BogoMIPS                : 299.00
tlb_entries             : 64
mips16 implemented      : yes

# cat /etc/version
V1.0-220304 --  Fri Mar 4 11:22:18 CST 2022

I didn't patch the firmware and direct enter my PLOAM password. I get connect to internet but the speed still remain at 30M download / 0.5M upload.

Should I patch the firmware? Which firmware should I patch?

ccy avatar May 24 '22 14:05 ccy

oh, you also bought ODI Stick which is using RTL9601D, where TWCGPON657 using RTL9601CI

both produce slow and odd speed.

there are no firmware to fix it, it seem your SFP host having compatibility issues with Realtek SGMII.

alternatively get MA5671a stick with OpenWRT, but I no guarantee compatible with your existing device, but can try

Anime4000 avatar May 24 '22 16:05 Anime4000

since you have ODI Stick, try changing LAN_SDS_MODE

0 = 1GbaseT 1 = 1GbaseX 2 = SGMII PHY 3 = SGMII MAC

Anime4000 avatar May 24 '22 16:05 Anime4000

Try these modes and same issue too:

flash set LAN_SDS_MODE 0
reboot

flash set LAN_SDS_MODE 1
reboot

flash set LAN_SDS_MODE 2
reboot

flash set LAN_SDS_MODE 3
reboot

And I found that I can't change OMCI_SW_VER1 and OMCI_SW_VER2:

# flash get OMCI_SW_VER1
OMCI_SW_VER1=V1.0-220304
# flash get OMCI_SW_VER2
OMCI_SW_VER2=V1.0-210702

ccy avatar May 25 '22 04:05 ccy

if 0 until 3 produce same effect, highly chance that SFP Host having issue,

I have no idea how fix it 😅

yea, ODI have hard coded sw version, for Telekom Malaysia OLT, doesn't care about it, only care HW Ver,

it will get O5 no matter what, since stock ISP ONU have own provisioning,

Anime4000 avatar May 25 '22 05:05 Anime4000

Even if I use different HW_HWVER, I still can get O5 and connect to internet.

ccy avatar May 25 '22 06:05 ccy

I further debug the issue. I found out the GPON ignore my value set to LAN_SDS_MODE. It will also reset to 1.

# flash get LAN_SDS_MODE
LAN_SDS_MODE=2

# cat /proc/lan_sds/lan_sds_cfg
lan_sds_mode = 1(Fiber 1G)

And this is the /proc/kmsg output:

# cat /proc/kmsg
al: 8250/16550 driver, 1 ports, IRQ sharing disabled
<6>serial8250: ttyS0 at MMIO 0x0 (irq = 49) is a 16550A
<6>8686 Ethernet driver v0.0.1 (Feb 17, 2012)[Dual Band Disable]
<4>TX[1024,64,64,64,64] , RX[256,32,32,32,64,64]
<6>eth0 (): not using net_device_ops yet
<6>eth0: RTL-8686 at 0xb8012000, 00:00:00:01:00:02, IRQ 26
<6>eth0.2 (): not using net_device_ops yet
<6>eth0.2: RTL-8686 at 0xb8012000, 00:00:00:01:00:02, IRQ 26
<6>eth0.3 (): not using net_device_ops yet
<6>eth0.3: RTL-8686 at 0xb8012000, 00:00:00:01:00:02, IRQ 26
<6>nas0 (): not using net_device_ops yet
<6>nas0: RTL-8686 at 0xb8012000, 00:00:00:01:00:02, IRQ 26
<4>>>>> Set nas0 carrier off !!!
<6>pon0 (): not using net_device_ops yet
<6>pon0: RTL-8686 at 0xb8012000, 00:00:00:01:00:02, IRQ 26
<4>RTL8686 GMAC Probing..
<4>first entry: 0, portmask 127, rx: 80232f6c
<4>nas0 -> 0x4
<4>Init RTK Driver Module....*** [RT_DBG] drivers/net/rtl86900/sdk/src//dal/rtl9602c/dal_rtl9602c_classify.c:3567: In function 'dal_rtl9602c_classify_unmatchAction_set' action 2
<4>
<4>OK
<4>Init RTK Core Dev Module....OK
<4>
<4> rtdrv_init !!! for netfilter
<4>pkt_redirect_init complete
<5>interrupt broadcaster init ok!
<4>u32 classifier
<4>nf_conntrack version 0.5.0 (479 buckets, 1916 max)
<6>ip_tables: (C) 2000-2006 Netfilter Core Team
<6>TCP cubic registered
<6>NET: Registered protocol family 17
<5>Bridge firewalling registered
<6>Ebtables v2.0 registered
<6>802.1Q VLAN Support v1.8 Ben Greear <[email protected]>
<6>All bugs added by David S. Miller <[email protected]>
<4>Realtek GPIO Driver for Flash Reload Default
<5>physmap platform flash device: 0b000000 at 14000000
<4>Luna SPI NOR FLASH G3 driver-C22017/MMIO16-1 <5>master->name physmap-flash
<5>cmd: cmdlinepart
<5>14 cmdlinepart partitions found on MTD device physmap-flash
<5>Creating 14 MTD partitions on "physmap-flash":
<5>0x000000000000-0x000000040000 : "boot"
<5>0x000000040000-0x000000042000 : "env"
<5>0x000000042000-0x000000044000 : "env2"
<5>0x000000044000-0x000000080000 : "config"
<5>0x000000080000-0x0000001cc000 : "k0"
<5>0x0000001cc000-0x000000440000 : "r0"
<5>0x000000440000-0x00000058c000 : "k1"
<5>0x00000058c000-0x000000800000 : "r1"
<5>0x000000000000-0x000000001000 : "Partition_008"
<5>0x000000000000-0x000000001000 : "Partition_009"
<5>0x000000000000-0x000000001000 : "Partition_010"
<5>0x000000000000-0x000000001000 : "Partition_011"
<5>0x000000080000-0x0000001cc000 : "linux"
<5>0x0000001cc000-0x000000440000 : "rootfs"
<4>VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
<6>Freeing unused kernel memory: 100k freed
<4>re8670_open 3341
<4>omci platform attached!
<4>*** [RT_ERR] drivers/net/rtl86900/sdk/src//dal/rtl9602c/dal_rtl9602c_ponmac.c:1039: In function '_rtl9602c_ponMacGponModeV2_set'
<4>             Error Code: 0x8848
<4>
<4>*** [RT_DBG] drivers/net/rtl86900/sdk/src//dal/rtl9602c/dal_rtl9602c_classify.c:3567: In function 'dal_rtl9602c_classify_unmatchAction_set' action 1
<4>
<4>*** [RT_DBG] drivers/net/rtl86900/sdk/src//dal/rtl9602c/dal_rtl9602c_classify.c:3567: In function 'dal_rtl9602c_classify_unmatchAction_set' action 1
<4>
<3>register_gpon_evt_state: register gpon event state Successfully !
<4>priority: 0, portmask 127, rx: 80232f6c
<4>insert here, priority: 7, portmask 255, rx: c026b34c
<4>change mode to 2(SGMII PHY)
<4>port 2 assign to pon0
<4>pon0 -> 0x4
<4>priority: 7, portmask 255, rx: c026b34c
<4>priority: 0, portmask 127, rx: 80232f6c
<4>insert here, priority: 4, portmask 4, rx: 80173ca4
<4>write watchdog_flag to 0x00000001
<4>[Kthread : watchdog ] init complete!
<4>************ Watchdog Setting ****************
<4>WDT_E=1, (1-enable, 0-disable)
<4>LX(MHz)=200
<4>WDT_CLK_SC=3
<4>PH1_TO=31
<4>PH2_TO=0
<4>WDT_RESET_MODE=0
<4>**********************************************
<6>device eth0 entered promiscuous mode
<6>br0: port 1(eth0) entering learning state
<4>drivers/net/rtl86900/sdk/src/rtk/pon_led.c:1152 led sw blink init complete!
<6>br0: port 1(eth0) entering forwarding state
<4>omci_set_flow_map_ds_queue: Failed to call rtk_qos_schedulingQueue_get
<4>change mode to 1(Fiber 1G)

There are some error messages, but I am not sure it matter.

ccy avatar May 25 '22 09:05 ccy