Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
   Glossary   Glossary
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: 1 2 [3] 4

Author Topic: ZyXEL Modems - eg VMG1312-B10A - Custom Firmware MTU 1508 Maintenance  (Read 3785 times)

Weaver

  • Addicted Kitizen
  • *****
  • Posts: 6572
  • Retd sw dev; A&A; 4 7km ADSL2; IPv6; Firebrick
Re: ZyXEL Modems - eg VMG1312-B10A - Custom Firmware MTU 1508 Maintenance
« Reply #30 on: June 30, 2018, 05:08:33 PM »

Many thanks !  ;D  Much appreciated
Logged

Weaver

  • Addicted Kitizen
  • *****
  • Posts: 6572
  • Retd sw dev; A&A; 4 7km ADSL2; IPv6; Firebrick
Re: ZyXEL Modems - eg VMG1312-B10A - Custom Firmware MTU 1508 Maintenance
« Reply #31 on: July 06, 2018, 02:38:18 PM »

A couple of feasibility questions:

1. there is some magic incantation that will make the modem reconnect at a reduced downstream target SNRM, an override. I wonder if there might be some way of storing a setting persistently, in non-volatile storage, so that whenever the modem connects it could use this override parameter to set the initial downstream SNRM according to that value?

2. I wonder if the same tweak could be applied to the upstream direction? Perhaps this is impossible for some reason because one end (relatively) always controls this. I am not aware of the existence of any CLI command for an upstream SNRM override.

An upstream tweak down from 6dB to 3dB would help me enormously as I do struggle with upstream throughput of only 1.1 Mbps. This has got worse since I changed to the ZyXEL modems too, by about 12%. On my iPad uploading backups to the iCloud, sending files via iMessage and uploading photos is a real pain and it is the bottleneck for Facetime conversations.
Logged

johnson

  • Reg Member
  • ***
  • Posts: 540
Re: ZyXEL Modems - eg VMG1312-B10A - Custom Firmware MTU 1508 Maintenance
« Reply #32 on: July 30, 2018, 02:03:17 AM »

1. there is some magic incantation that will make the modem reconnect at a reduced downstream target SNRM, an override. I wonder if there might be some way of storing a setting persistently, in non-volatile storage, so that whenever the modem connects it could use this override parameter to set the initial downstream SNRM according to that value?

Yet another thing that I think about and would love to be able to do, however from my pokings around I have yet to find anywhere one could easily insert the magic "xdslctl configure --snr" to be executed every time the modem tries to sync. I have thought that maybe decoding and modifying the stored configuration on the persistent data partition in the file "psi" as per these posts: https://forum.kitz.co.uk/index.php/topic,21936.msg378071.html#msg378071 could lead to something... but I guess the same could be achieved by uploading a modified xml config. Maybe there is some kind of bodge to be done by inserting the extra "--snr" switch at the end of another field thats read from the config and passed to xdslctl when bringing the connection up. But one would think there should be some validation logic ensuring sane values are read from the config that needs to be bypassed, but who knows.


Quote
2. I wonder if the same tweak could be applied to the upstream direction? Perhaps this is impossible for some reason because one end (relatively) always controls this. I am not aware of the existence of any CLI command for an upstream SNRM override.

An upstream tweak down from 6dB to 3dB would help me enormously as I do struggle with upstream throughput of only 1.1 Mbps. This has got worse since I changed to the ZyXEL modems too, by about 12%. On my iPad uploading backups to the iCloud, sending files via iMessage and uploading photos is a real pain and it is the bottleneck for Facetime conversations.

As the proud owner of a VDSL connection sporting 26mbps up and 1.17mbps down, I would love this to be possible and feel your pain... this kind of asymmetry means any use of the upstream has a direct impact on the downstream as a full speed set of TCP streams is close to saturating the uplink on its own. I often also have 7db of margin on the US, could easily be dropped a few db for an invaluable increase in throughput. Alas I have no recollection of being able to mess with US SNR even with ADSL1, and assume its totally out of the control of end user equipment.

Are you using "xdslctl configure --snr" on any of your lines currently Weaver? I recall reading in another post that your DS is running at 1.5db or so, is this by design or maybe due to the recent storms?
Logged

banger

  • Reg Member
  • ***
  • Posts: 777
  • Uno comms 80/20
Re: ZyXEL Modems - eg VMG1312-B10A - Custom Firmware MTU 1508 Maintenance
« Reply #33 on: July 30, 2018, 03:06:19 AM »

Weavers case is ADSL which the SNR tweak works but I dont know if weaver is using it. As of VDSL I think it is set on the DSLAM and cannot be overridden by end user.
Logged
Tim
www.uno.net.uk & freenetname
Asus DSL-N55U and ZyXEL VMG1312-B10A Bridge on 80 Meg TTB Fibre

https://www.thinkbroadband.com/speedtest/1502566996147131655

Weaver

  • Addicted Kitizen
  • *****
  • Posts: 6572
  • Retd sw dev; A&A; 4 7km ADSL2; IPv6; Firebrick
Re: ZyXEL Modems - eg VMG1312-B10A - Custom Firmware MTU 1508 Maintenance
« Reply #34 on: July 30, 2018, 04:12:09 AM »

I have tried the tweak with impressive results.

I am wondering though if it is pushing things too far, so I ought to find out what the ratio of corrupt to total packets received is. Not sure how to do that. Could either look at modem stats, but not exactly sure, or look for L4 retx but then the packet loss or timeout that causes them could very well be for other reasons than corruption, and interpreting long periods of packet cap action with the tools that I have is a pain, hurts the brain.

With the DLink modems the downstream SNRM was usually that anyway, so perhaps they had a built-in naughty tweak factor. It would sometimes drop to 0.6-0.8dB downstream and stay there. With the old modems, each one would resync after a week or so. With the ZyXELs you never ever see resyncs.

I am thinking that the lightning might have pushed the noise floor up too much so that more FEC bits were needed. Or noise spikes could have overwhelmed the system, and it would have had to be set up with more overhead to have the required level of robustness to cope with sporadic errors of such a magnitude. I am assuming that it does not normally have to cope with spikes because there is no electrical activity of any kind near the line, no humans, no houses, no neighbours, apart from long-distance RF from: known broadcast audio RF transmitters, fish-finders, airport equipment at Tiree airport possibly, weather and marine safety info data broadcasting. If Aiseag airport by the beach at Aiseag Maol Ruibhe, between Broadford and the Skye Bridge gets going [if only!] then the level of noise might shoot up knocking out certain frequencies completely and might stuff my 5GHz WLAN channels ≥ 100.
Logged

Weaver

  • Addicted Kitizen
  • *****
  • Posts: 6572
  • Retd sw dev; A&A; 4 7km ADSL2; IPv6; Firebrick
Re: ZyXEL Modems - eg VMG1312-B10A - Custom Firmware MTU 1508 Maintenance
« Reply #35 on: July 30, 2018, 07:27:32 AM »

Regarding the thing about adding the tweak command at a suitable point. I assume that that command brings the link down first, then brings it up again with the new values. And bringing it down is not what we want, so unfortunately it means a nightmare of digging, trying to find where the system initially gets certain crucial values from when it synchs for the very first time and every subsequent time. I suppose digging to find out where the magic invocation command stores the given tweak value would be a start. That location would be read on every subsequent synch.
Logged

johnson

  • Reg Member
  • ***
  • Posts: 540
Re: ZyXEL Modems - eg VMG1312-B10A - Custom Firmware MTU 1508 Maintenance
« Reply #36 on: August 18, 2018, 05:41:29 AM »

So it turned out to be easy to get persistent storage of any tweak commands you like. Once I found out that commands issued with "xdslctl configure" stick between resyncs from the thread about line capping, its just a matter of having them run once on boot, no need to try and find a way to have them run every time the modem syncs.

So one line in /etc/profile to run a script (and detach it), and a file in the /data partition and away you go. Unfortunately the way the modem flashes itself there doesnt seem to be way to build files into the firmware that get extracted to the data partition, so the script thats run at boot needs to be written manually, but its only a few lines, for example:

Code: [Select]
sleep 30

xdslctl configure --maxDataRate 25000 1500 27000

Had to add the sleep as it seems /etc/profile gets run before everything is in place for xdslctl to work, don't worry its not blocking so shouldn't increase the boot time at all.

Have made a firmware for a 1312 & 8324 and I'l test it with my line in a bit, let me know if anyone is interested in having the functionality.

Logged

Weaver

  • Addicted Kitizen
  • *****
  • Posts: 6572
  • Retd sw dev; A&A; 4 7km ADSL2; IPv6; Firebrick
Re: ZyXEL Modems - eg VMG1312-B10A - Custom Firmware MTU 1508 Maintenance
« Reply #37 on: August 18, 2018, 08:38:15 AM »

Certainly am! Brilliant stuff.
Logged

johnson

  • Reg Member
  • ***
  • Posts: 540
Re: ZyXEL Modems - eg VMG1312-B10A - Custom Firmware MTU 1508 Maintenance
« Reply #38 on: August 21, 2018, 01:18:31 AM »

Got around to trying it on my line with my 8324, works great although I needed the sleep duration increased a little, guess the 8324 takes longer to boot.

Also refined it a little to avoid any confusion over file names, this is the only change to the firmware - added to /etc/profile:

Code: [Select]
if [ ! -f /data/boot-cmds.sh ];
then
 echo "Creating initial boot-cmds.sh"
 echo "#!/bin/bash" > /data/boot-cmds.sh
 echo "" >> /data/boot-cmds.sh
 echo "sleep 30" >> /data/boot-cmds.sh
 echo "" >> /data/boot-cmds.sh
 echo "# Place any commands here to run at boot" >> /data/boot-cmds.sh
 echo "# eg:" >> /data/boot-cmds.sh
 echo "" >> /data/boot-cmds.sh
 echo "#xdslctl configure --maxDataRate 25000 2000 27000" >> /data/boot-cmds.sh
 chmod +x /data/boot-cmds.sh
else
 echo "Running custom boot commands"
 /data/./boot-cmds.sh &
fi

So it tests if the file exists and creates a placeholder if not for you to edit. Editing does require using vi, which may be slightly uncomfortable if you have not used it before:

Login as supervisor or if just normal admin user then issue this to gain proper shell:
Code: [Select]
xtm && sh

Change to the data directory and edit using vi:
Code: [Select]
cd /data
vi boot-cmds.sh

Key "i" to enter insert mode and either uncomment the example line or write your own, eg:

Code: [Select]
xdslctl configure --snr 75
or
xdslctl configure --maxDataRate 25000 2000 27000

Escape key to exit insert mode and ":x" to save and quit. You can test to see if the command works as expected by:

Code: [Select]
./boot-cmds.sh

Wait 30 seconds then check for your changed settings with:

Code: [Select]
xdslctl info --cfg

For example my line now capped shows:
Code: [Select]
adslAnnexAParam:        00000980
adslTrainingMarginQ4:   -1
adslShowtimeMarginQ4:   -1
adslLOMTimeThldSec:     -1
adslDemodCapMask:       00000000
adslDemodCapValue:      00000000
adsl2Param:             00000000
adslPwmSyncClockFreq:   0
adslHsModeSwitchTime:   0
adslDemodCap2Mask:      00000000
adslDemodCap2Value:     00000000
vdslParam:              007f00ff
vdslParam1:             00000000
xdslAuxFeaturesMask:    00000000
xdslAuxFeaturesValue:   00000000
vdslCfgFlagsMask:       00000000
vdslCfgFlagsValue:      00000000
xdslCfg1Mask:   00000000
xdslCfg1Value:  00000000
xdslCfg2Mask:   00000000
xdslCfg2Value:  00000000
xdslCfg3Mask:   00000000
xdslCfg3Value:  00000000
xdslCfg4Mask:   00000000
xdslCfg4Value:  00000000
maxDsDataRateKbps:      20000
maxUsDataRateKbps:      2000
maxAggrDataRateKbps:    25000
xdslMiscCfgParam:       00000000
AFE_ID:                 10608700 00000000

Should do all this with the modem disconnected from the line to avoid causing several resyncs. Now reboot the modem and check again with "xdslctl info --cfg" to make sure its applied at boot.

I have tried putting faulty commands in the boot-cmds.sh file and no harm done to the boot, so unless you put something seriously bad like "reboot" in there I cant see any issues. If you wish to disable it just comment everything in the file out or just delete it, another placeholder will be made after a reboot with nothing but the sleep command in.

As always disclaimer that even though I have tested on several modems you are flashing at your own risk etc etc.

With just the jumboframes patches and this addition for the VMG1312-B10A:
https://www.dropbox.com/sh/vs35ss2pptlfm36/AABZkf219xF7M73dOTevx8ZBa?dl=0

If anyone is interested in this for an 8324/8924 just ask and I will make one (the one I made for my 8324 has the x1 adsl_phy etc).
 
Logged

banger

  • Reg Member
  • ***
  • Posts: 777
  • Uno comms 80/20
Re: ZyXEL Modems - eg VMG1312-B10A - Custom Firmware MTU 1508 Maintenance
« Reply #39 on: August 21, 2018, 01:46:36 AM »

Brilliant.  :)
Logged
Tim
www.uno.net.uk & freenetname
Asus DSL-N55U and ZyXEL VMG1312-B10A Bridge on 80 Meg TTB Fibre

https://www.thinkbroadband.com/speedtest/1502566996147131655

stranky

  • Just arrived
  • *
  • Posts: 2
Re: ZyXEL Modems - eg VMG1312-B10A - Custom Firmware MTU 1508 Maintenance
« Reply #40 on: August 23, 2018, 12:32:40 AM »

wow yes please for the 8324!

great work though, thanks for your effort doing this :)



Quote

If anyone is interested in this for an 8324/8924 just ask and I will make one (the one I made for my 8324 has the x1 adsl_phy etc).
« Last Edit: August 23, 2018, 12:35:11 AM by stranky »
Logged

LordSven

  • Member
  • **
  • Posts: 26
Re: ZyXEL Modems - eg VMG1312-B10A - Custom Firmware MTU 1508 Maintenance
« Reply #41 on: August 23, 2018, 04:47:53 PM »

Thank you so much for your hard work! And likewise for the 8924 please if differing in any way from the 8324. Do you see any benefit from the x1 adsl_phy for VDSL FTTC, approx 450m from Huawei cab? Solid 80/17.5 speeds on stock v18 firmware. No ipv6 though (as per normal with BT Infinity and the 8324/8924 I believe). Cheers!
Logged
BT FTTC 79/18 from Huawei Cab - Zyxel VMG8924-B10A - LordSven on MDWS via DslStats

j0hn

  • Kitizen
  • ****
  • Posts: 2002
Re: ZyXEL Modems - eg VMG1312-B10A - Custom Firmware MTU 1508 Maintenance
« Reply #42 on: August 23, 2018, 05:10:37 PM »

Thank you so much for your hard work! And likewise for the 8924 please if differing in any way from the 8324. Do you see any benefit from the x1 adsl_phy for VDSL FTTC, approx 450m from Huawei cab? Solid 80/17.5 speeds on stock v18 firmware. No ipv6 though (as per normal with BT Infinity and the 8324/8924 I believe). Cheers!

This is for bridge mode. 1508 MTU can be done without this when using as a router.
I don't believe this firmware makes the changes persistent when used as a router and a command needs issued unless that has been resolved.

The newer adsl_phy seems to corect some Vectoring bugs but no other obvious performance improvements.
Logged
Plusnet FTTC 80/20 -  ECI now Huawei cab
Zyxel VMG1312-B10A bridge mode with 1508 MTU + Asus RT-AC68U running Asuswrt-Merlin

johnson

  • Reg Member
  • ***
  • Posts: 540
Re: ZyXEL Modems - eg VMG1312-B10A - Custom Firmware MTU 1508 Maintenance
« Reply #43 on: August 23, 2018, 11:36:52 PM »

wow yes please for the 8324!

great work though, thanks for your effort doing this :)

Sure thing, I'l make one for the 8924/8324.

Just for clarity, this latest feature for running commands on boot is only really useful if you wish to apply a cap to your line in a persistent way or as in Weavers case, for applying target SNR changes to an ADSL line.


Thank you so much for your hard work! And likewise for the 8924 please if differing in any way from the 8324. Do you see any benefit from the x1 adsl_phy for VDSL FTTC, approx 450m from Huawei cab? Solid 80/17.5 speeds on stock v18 firmware. No ipv6 though (as per normal with BT Infinity and the 8324/8924 I believe). Cheers!

Several people tried the x1 version, it did not appear to offer any increase in speed or stability on either VDSL or ADSL, its only benefit was fixing an odd bug that I have experience on a vectored line. Of course you are welcome to test on your line but from others experience its unlikely to improve things and adds another variable to any troubleshooting you may be doing.

This is for bridge mode. 1508 MTU can be done without this when using as a router.
I don't believe this firmware makes the changes persistent when used as a router and a command needs issued unless that has been resolved.

Indeed, this change only allows the execution of commands on boot, the 1508 commands that need to be run when using these devices in router mode have to be applied to the interfaces that are brought up once a ppp session has been made.
Logged

Weaver

  • Addicted Kitizen
  • *****
  • Posts: 6572
  • Retd sw dev; A&A; 4 7km ADSL2; IPv6; Firebrick
Re: ZyXEL Modems - eg VMG1312-B10A - Custom Firmware MTU 1508 Maintenance
« Reply #44 on: August 24, 2018, 02:47:57 AM »

It is I hope clear just how much we all appreciate your hard work.
Logged
Pages: 1 2 [3] 4