Kitz Forum

Broadband Related => Broadband Hardware => Topic started by: roseway on June 19, 2009, 10:29:22 AM

Title: Tweaking Broadcom based routers
Post by: roseway on June 19, 2009, 10:29:22 AM
Warning: this note describes an experimental hack, which as far as I know is not officially documented anywhere. Try it at your own risk!

Broadcom-based routers can be tweaked to change the target noise margin set in the exchange, using the adslctl command in telnet. With Netgear routers, the DGTeam firmware makes it possible to perform the same tweak in the web interface. But in either case the tweak is limited to about - 5.5 dB in the downward direction, so if your target noise margin has been increased to 15 dB you won't be able to get it down to less than about 9.5 dB using documented methods. Note that, without the DGTeam firmware, this tweak doesn't survive a re-boot. So if you power down the router or re-boot you'll have to enter the command again.

The normal form of the adslctl noise margin tweak command is

adslctl configure --snr N

or

adsl configure --snr N

Some firmwares use adsl, some use adslctl. I will use adslctl for the rest of this note.

where N should be between 1 and 200. The default value is 100. Lower values reduce the target noise margin, and a value of 1 reduces it by about 5.5 dB. To reduce it further you would need to use negative values of N, but the command rejects negative values. This is where the hack comes in: internally, the value of N is stored as a 16-bit signed integer (supports values between -32768 and +32767) and we can trick the command into accepting negative values by using high positive values. Values between about 65400 and 65535 would be possible; this is equivalent to a range between -136 and -1.

To give a specific example. My current router is a D-Link 2740B which has been converted to a DG834N using this method. (http://www.adsl2forum.co.uk/showthread.php?t=10651) My target noise margin is 15 dB (again) as a result of an intermittent line fault, and using the DGTeam web interface I had tweaked it down to 9.5 dB. In telnet I issued this command:

adslctl configure --snr 65480

The router immediately dropped the connection and reconnected with a noise margin of 5.6 dB, and a correspondingly higher connection speed. This pretty well matched up to expectation. So we can give a rough table of noise margin change against values of N:

N          Change in target noise margin (dB)

100            0
50             -3
1               -5.5
65500      -9
65450     -12

If you go too far, the connection will become unstable, and this may have other undesirable consequences, so do this with great care, and a little at a time.


Credits

I didn't discover this hack myself. There are several references to it on the net (try searching for adslctl tweak ) and it's not clear who found it first. So, whoever it was, I duly acknowledge them.

[Edit, thanks to b4dger comment below: this hack won't work with recent Thomson/Speedtouch firmware, because the adslctl command has been disabled.]

[Edit 2, Added reference to the fact that some firmwares use the command 'adsl', not 'adslctl'. Thanks to Solstice for drawing my attention to this.]
Title: Re: Tweaking Broadcom based routers
Post by: b4dger on June 19, 2009, 01:55:11 PM
Hi roseway,
Am I right in thinking that you have to also be on a 'tweakable' firmware? i.e. It's not all Broadcom based routers?

I thought that later version Speedtouch 585v6 etc. have had this command removed.

All interesting reading though  :)
Title: Re: Tweaking Broadcom based routers
Post by: Azzaka on June 19, 2009, 03:20:22 PM
Hi roseway,
Am I right in thinking that you have to also be on a 'tweakable' firmware? i.e. It's not all Broadcom based routers?

I thought that later version Speedtouch 585v6 etc. have had this command removed.

All interesting reading though  :)

Thats the v7 of the Thomsons.
Title: Re: Tweaking Broadcom based routers
Post by: roseway on June 19, 2009, 03:29:35 PM
I thought I'd already replied to b4dger, but it looks as though I had a senior moment and forgot to save it. Yes, I'm sure you're right, and I've edited the message to add a comment to that effect.
Title: Re: Tweaking Broadcom based routers
Post by: Azzaka on June 19, 2009, 03:51:11 PM
i've had one of those days mate...
Title: Re: Tweaking Broadcom based routers
Post by: kitz on June 20, 2009, 03:19:27 PM
Thank you very much eric for bringing this info to our attention.
Main site amended accordingly :)

>> i've had one of those days mate...

Yeah me too - must be something in the air  :D
Title: Re: Tweaking Broadcom based routers
Post by: rmccardal on July 28, 2009, 01:26:32 PM
Hi there  :),

I have been using this tweek as I also had a t-snr of 15. Unfortunately the setting reverts after a reboot of my DG834.
I changed FW to the DGTeam (0850) at the weekend, but it still doesn't seem to save the command after a reboot of the router.

Any ideas how I can make the setting 'stick'?
Title: Re: Tweaking Broadcom based routers
Post by: roseway on July 28, 2009, 02:11:34 PM
Hi and welcome

Sorry, I didn't really make this clear. If you tweak the noise margin in the DGTeam web interface the setting is saved when you click 'Apply'. But if you do it from the telnet command line it isn't saved, and I don't know of any way to save it. What I've done is to use the web interface with the slider set at minimum, which reduces the target noise margin to about 9.5 dB, and also tweak it in the command line to get it down to 6 dB. If the router is rebooted it goes back to 9.5 dB until I tweak it manually again, but not too much is lost.
Title: Re: Tweaking Broadcom based routers
Post by: Solstice on November 03, 2009, 01:31:28 AM
hello

first off, thankyou so much for posting this! I am on Orange and they have set my Target snr to 15db which means I usually sync at between 1800 & 2500 Kbps :(

I just used this trick on my BT Voyager 2110 router (via telnet) I've never used telnet before and Im a total noob at this type of thing but now my router is connected at 3776Kbps :)

I just wanted to know..when you say the setting isn't saved after reboot, does "reboot" mean turning the router off then back on? or does it just mean if the router drops connection because of instability, the next time it connects it will connect at 15db again?

Is this true even if I use the "save" command in telnet?

Also..I used the dmt tool and I see that after connecting at 3776 Kbps my SNRM is just 3.4db which Im guessing won't be stable for very long..(I live in the countryside and we get alot of crackles/noise on the line sometimes especially during high winds/ rain etc)

I used the command "adsl configure --snr 65450" (because "adslctl configure --snr 65450" didn't work, I don't know why)
immediately followed by the "save" command

how flexible are those numbers if I want to experiment with different ones? ie.. could I input "adsl configure --snr 65473"? or do I go up in increments of 10 or 20 for example?

thanks for any advice :)
Title: Re: Tweaking Broadcom based routers
Post by: roseway on November 03, 2009, 07:37:53 AM
'Reboot' means a full restart of the router, normally by switching it off and on again. The tweak remains in place if the router simply drops the connection and reconnects. One thing I haven't checked is what happens if you order a 'warm' reboot of the router from the web interface, so I don't know if the tweak survives this.

With the router I was using (DG834GT) I couldn't find any command to save the tweak, but there are differences between firmwares on different makes of router, so it may be the case that some have a command which saves the tweak.

You can use any whole number (within the sensible range of course) - there are no specific increments.

Your comment about adsl / adslctl is valid. As I've recently come to realise, some firmwares use one version, and some use the other. I'll edit the original message to reflect this.
Title: Re: Tweaking Broadcom based routers
Post by: Solstice on November 03, 2009, 02:13:19 PM
Ok thankyou for everything, you've been very helpfull  ;D been connected now for 13 hours at 3776 with no disconnections!
Title: Re: Tweaking Broadcom based routers
Post by: roseway on November 03, 2009, 03:00:49 PM
You're very welcome. Here's hoping that your faster connection holds up. :thumbs:
Title: Re: Tweaking Broadcom based routers
Post by: kenboon on November 25, 2009, 05:51:03 PM
Thanks alot for the guide :) I have finally synced at 4mb again :)

Thanks again

Ken
Title: Re: Tweaking Broadcom based routers
Post by: Griffy on December 03, 2009, 09:38:57 PM
This doesn't work on the DG834G v3 router, as its not Broadcomm chipset, but the AR7?

If so, is there any way I can tweak my target margin with an AR7 chip? 
Title: Re: Tweaking Broadcom based routers
Post by: roseway on December 03, 2009, 10:48:14 PM
Quote
If so, is there any way I can tweak my target margin with an AR7 chip?

I'm afraid not, sorry.
Title: Re: Tweaking Broadcom based routers
Post by: Griffy on December 03, 2009, 11:04:11 PM
Ok so I also have a Belkin N1 vision, it has gigabit network ports and a good spec, yet it connects slower than my Netgear DG834g v3
I thought the Belkin was also on a broadcom chipset? and is it hackable in the same way?

On another note, I have another modem/router  ???  A Linksys WAG320G  and I can't be sure, but I think this is also broadcom based? It seems to have better functions than the other 2, but connects at a slower speed than the old netgear (netgear is only G wireless performance and not good wireless coverage either)


Title: Re: Tweaking Broadcom based routers
Post by: roseway on December 04, 2009, 07:37:10 AM
I'm afraid that I don't know what chipset those routers have, but you won't do any harm by seeing if it's possible to connect to them by telnet and than type the command adslctl info or adsl info to see if it recognises one of those commands.

By the way - are you sure about the WAG320G? Google hasn't even heard of it.
Title: Re: Tweaking Broadcom based routers
Post by: waltergmw on December 04, 2009, 09:23:14 PM
The DG834 V3 is, I believe, a TI AR7 chipset which is known to perform quite well on poor lines.
It's the same chipset used in the BT Business hub i.e. 2Wire HGV2700.
It can have problems in the 834 if your firmware hasn't been upgraded to the latest version so it's well worth upgrading if you haven't.
That might well be a good modem to retain for optimum performance on a poor line.

Kind regards,
Walter
Title: Re: Tweaking Broadcom based routers
Post by: roseway on December 04, 2009, 10:12:44 PM
Quote
It's the same chipset used in the BT Business hub i.e. 2Wire HGV2700

I think you may be mistaken there - as far as I know, the 2700HGV uses a custom 2-wire chipset. But you're right to say that the DG834 V3 uses the AR7 chipset, and has a well-deserved reputation for good performance on long lines.
Title: Re: Tweaking Broadcom based routers
Post by: Griffy on December 04, 2009, 11:02:01 PM
Just to confirm I do have a Dg834G v3 running ok on my system
My other 'stuff' includes a Belkin Vision N1 and a Linksys WAG320N modem/router.  Hard to find any info about the WAG320N online, maybe its crap!
Title: Re: Tweaking Broadcom based routers
Post by: waltergmw on December 05, 2009, 01:19:53 AM
@ Roseway,

Thanks for your caution. I stand corrected; they are a bit shy as to their components but state:-

ADSL Modem
• ADSL1, ADSL2, ADSL2+
• DSLAM interoperability: Alcatel, Lucent AnyMedia,
Lucent Stinger, Cisco, AFC, Adtran, Catena, ECI, Copper
Mountain, Nokia
• ANSI and ETSI loops

and 

The Modem Replacement
Models with an ADSL1/2/2+ broadband interface include advanced modem technology unique to 2Wire, raising the bar on modem performance. The 2Wire designed modem technology takes advantage of an extremely low noise, high linearity ADSL Analog Front End (AFE) and digital echo canceller, providing excellent long loop and bridge tap performance. Translation: The 2Wire design provides superior modem training capabilities; particularly important to subscribers at the edge of the DSL coverage area, or for whom you want to provide increased speed.

See also

http://www.dslreports.com/forum/remark,14233982

Another quotation states:-

Since 2Wire's business model is not to supply to end users, there is no way for an end user to get a full manual going in to all of this.
There is no public information on the processor or memory inside the device, again, this is not something that end users typically need. As is well known, the chipset inside the 2Wire is custom silicon.

For any really keen people prepared for electronic suicide:-

https://forum.openwrt.org/viewtopic.php?pid=98038

2Wire 2700HG-D

FCCID: PGR2W2700RD
Chipset: Atheros AR2413A
Flash: ST NAND128W3A2BN6 (16MB?)
Ram: NANYA NT5DS16M16CS-5T (64MB?)

If anybody is interested I've found quite a bit more information but it's too far off topic here.

Kind regards,
Walter
Title: Re: Tweaking Broadcom based routers
Post by: jeffbb on December 05, 2009, 03:06:34 PM
Hi
quote Hard to find any info about the WAG320N online

@Griffy
see this link >http://www.linksysbycisco.com/UK/en/support/WAG320N

For help ,support, manuals

Regards Jeff :)
Title: Re: Tweaking Broadcom based routers
Post by: adslgeek on December 24, 2009, 09:50:05 AM
Hey Roseway,

Well impressed with the tweak!

Given that a lot the routers use BusyBox or other Linux based operating system, surely it would be possible to put a script into the bootup sequence?

Just a thought - I will scurry away and try to ask a real geek that might know how it could be done.

($respect4roseway = $respect4roseway +10) :-)

Cheers,
Title: Re: Tweaking Broadcom based routers
Post by: ubasti on February 22, 2010, 03:12:49 PM
Just like to say thanks for this tweak.  The ability to control SNR margin has completely transformed my connection.  Before it was usually bordering on the 1.5-1.75 bRAS profile, sometimes getting up to 2mb before frustratingly resyncing lower shortly afterwards.  Even at a SNR target margin of 15db, I'd never stay synced for more than a week. 

Bizzarely, with my SNR margin now forced to around 3db, my line is if anything more stable than before and seems to resync less!  I now get a solid 2.5mb from a rural line with 62db attenuation, always syncing around the 3000k mark.  My hardware is a DG834g v4 with DGteam firmware, and I'm on 20cn AAISP.

Both lowering the SNR target margin and turning off interleaving have really helped performance, and these were changes that I honestly didn't really believe my line would be able to handle before I made them - I was simply so bloody fed up that I thought what the hell.  I now have a 20ms ping to UK addresses and a steady 300k/s max download rate, better than I thought possible living in an isolated village in the NE of England.

This is a great site & forum, I've learned a lot here.
Title: Re: Tweaking Broadcom based routers
Post by: tuftedduck on February 22, 2010, 03:41:59 PM
Hello, ubasti, and welcome to the forum.  :)

I'm so glad that the site and the forum have proved helpful to you... :thumbs:.........and I hope to hear from you again.
Title: Re: Tweaking Broadcom based routers
Post by: strontium90 on March 27, 2010, 06:35:03 PM
Thanks a lot for this tweak...it has saved me months waiting for my snr to drop from 21dB :)
Title: Re: Tweaking Broadcom based routers
Post by: roseway on March 27, 2010, 06:38:31 PM
You're welcome :)
Title: Re: Tweaking Broadcom based routers
Post by: y4mz on May 11, 2010, 12:12:19 AM
Sorry, I didn't really make this clear. If you tweak the noise margin in the DGTeam web interface the setting is saved when you click 'Apply'. But if you do it from the telnet command line it isn't saved, and I don't know of any way to save it. What I've done is to use the web interface with the slider set at minimum, which reduces the target noise margin to about 9.5 dB, and also tweak it in the command line to get it down to 6 dB. If the router is rebooted it goes back to 9.5 dB until I tweak it manually again, but not too much is lost.

I've just discovered that on DGTeam (DG834GT version 1.03.22_1014_adsldrv023o at least), setting the target SNR with the command nvram set adsl_snr=N allows values greater than the web interface does (e.g. nvram set adsl_snr=65450), which persist after a reboot.

I think you'll have to re-run the command any time changes are made to the 'Advanced ADSL settings' web interface page though.
Title: Re: Tweaking Broadcom based routers
Post by: roseway on May 11, 2010, 06:56:08 AM
Thanks for that information y4mz. I'm not in a position to test it at the moment, because my current target noise margin isn't high enough, but if (when) I get bumped up to 15 dB again I'll give it a try.
Title: Re: Tweaking Broadcom based routers
Post by: backtogeek on January 14, 2011, 11:19:33 AM
I know this is very old but for anyone who comes accross this the same way I did you can change it via telnet then add the command e.g. adslctl configure --snr 65450 in to the DGTeam firmware cutom startup scripts via the web interface.

Tested and verified.
Title: Re: Tweaking Broadcom based routers
Post by: jeffbb on January 15, 2011, 12:48:59 PM
Hi
@strotium90
quote Thanks a lot for this tweak...it has saved me months waiting for my snr to drop from 21dB

That SNR margin is extremely high .The normal maximum Target SNR margin is 15db .

 see this  SNR explanation   (http://www.kitz.co.uk/adsl/linestats.htm#SNR) for more info

Regards Jeff
Title: Re: Tweaking Broadcom based routers
Post by: GunJack on January 27, 2011, 03:01:59 AM
read this thread several times, interesting stuff - even prompted me to try telnet for the first time ever. Handy thing to keep in back pocket for routers that DMT won't work with......which got me thinking (dangerous I know ;) )....

is there an easy way to find out what chipset a particular router is running, or is it a case of trawling through the tech specs of each one to find out ??
Title: Re: Tweaking Broadcom based routers
Post by: roseway on January 27, 2011, 07:09:44 AM
Strangely, most manufacturers seem to be a bit unwilling to publicise what chipsets they use, so you probably won't find the information in their user manuals. In many cases people have only found out what they use by dismantling the routers and looking at what's inside. Sometimes you can get the information from the telnet interface by guessing what the commands do, but not all routers have any telnet capability.

What I'm saying in a long-winded way is that there's no simple answer. :)
Title: Re: Tweaking Broadcom based routers
Post by: waltergmw on January 27, 2011, 09:23:09 AM
Hi GJ,

E.g.

http://www.dslreports.com/forum/remark,16134181

http://www.modem-help.co.uk/2Wire/chipset.types/DMT-Controller.html

You can also get hints from system logs, but a little knowledge is a dangerous thing, ....

In this case I believe the 2Wire is custom manufacture but possibly based upon a name mentioned below:-

INF
P0000-00-00T00:00:00
nand:  Samsung NAND 32MiB 3,3V, size: 33554432
INF
P0000-00-00T00:00:04
scc:  SCC DMA started
INF
P0000-00-00T00:00:05
wave:  Atheros driver version: 2.0.0
INF
P0000-00-00T00:00:08
initd:  ---------------------------------------------
INF
P0000-00-00T00:00:10
cm:  cm initialized
INF
P0000-00-00T00:00:10
initd:  libcm initialized
INF
P0000-00-00T00:00:10
ulib:  System clock initialized to Tue Jan 13 12:57:22 2009
INF
P0000-00-00T00:00:10
ulib:  Board serial number: 270919036080
INF
P0000-00-00T00:00:10
ulib:  Board product name: BT2700HGV

Kind regards,
Walter
Title: Re: Tweaking Broadcom based routers
Post by: GunJack on January 30, 2011, 10:43:17 AM
Strangely, most manufacturers seem to be a bit unwilling to publicise what chipsets they use, so you probably won't find the information in their user manuals. In many cases people have only found out what they use by dismantling the routers and looking at what's inside. Sometimes you can get the information from the telnet interface by guessing what the commands do, but not all routers have any telnet capability.

What I'm saying in a long-winded way is that there's no simple answer. :)


shame really, it would make the process of choosing a new router far easier for those of us who need a tweak here & there :(

walter, I completely agree that a little knowledge is dangerous...hell, look at me ;)


Ah well, I've got 4 good 2640B's to keep me going for a good while yet, as long as ipv6 doesn't get in the way......
Title: Re: Tweaking Broadcom based routers
Post by: waltergmw on January 30, 2011, 11:12:02 AM
Hi GJ,

It's not just you - we're all learning the hard way (I certainly am) because of the dysfunctional and obfuscational methods employed some times.

I was asked to help a lady in a nearby village who was distraught after being without service for over a month. She had made 33 calls to India, had 6 BT O visits and 5 new modems.
I arrive with my 2700 HGV and confirm (just as the BT Openreach engineers had probably done) that her sync speed was absolutely first class - one of the best I've seen.

BT O engineers are performance managed and get into significant trouble if they take longer that the, sometimes quite ridiculous, time limit of 90 minutes.
Little wonder then that they clear down a fault in this case probably in say 5 minutes. Tick the box - more brownie points etc. etc.

The next problem is that India is not the UK and their crib sheets have failed to hammer home that an ADSL service requires
a) Synchronisation
and
b) Authentication

Also note that they must be trying to be a co-operative, helpful and polite organisation without a real understanding of the practical situation nor how the repair engineers are controlled

Fortunately I have e-mail contacts in high places and managed to reach the "Director of BT my help".
VERY thankfully she had two senior people spend a bank holiday week-end at the Kingston Upon Thames RAS who then managed to restore the required data.
(There was one extenuating circumstance in that this problem first happened during a power outage just as BT were modifying Kingston)
However I don't think that's a sufficient excuse which was exacerbated by the inevitable riposte that "it's not my department" to my outrage at BT High Level Complaints that this was an example of crass stupidity.

Sorry for the off-topic rant !

Kind regards,
Walter
Title: Re: Tweaking Broadcom based routers
Post by: GunJack on February 05, 2011, 11:39:16 PM
Sorry for the off-topic rant !

Kind regards,
Walter



no probs at all walt :)


slightly back on-topic, I don't know if I'm alone on being concerned that, fibre notwithstanding, a lack of new suitably-tweakable routers will have the likes of me (who use DMT on a permanent basis, have to tweak to get the best out of my line) scrabbling around for older, pre-owned routers and hoping we can still find them as our existing tried-and-tested kit begins to bite the dust :(   Like I said above, I've currently got 4 D-Link 2640Bs, all serviceable, and hope they will last me for years to come......

...but what if they don't ?????   Will I have to settle for sub-standard speeds as the availablity of tweakable kit slowly trickles off to the great WEEE skip in the sky :(   
Title: Re: Tweaking Broadcom based routers
Post by: roseway on February 06, 2011, 07:29:46 AM
I'm not sure that it's true to say that the availability of tweakable routers is reducing. Certainly Thomson have done their best to stop users from tweaking, and ISPs tend to reduce the functionality in their custom firmwares, but there are plenty of alternatives. Netgear routers (for example) all give access to their telnet interface using the hidden 'debug' URL, and their Broadcom-based models are all tweakable. Broadcom chipsets remain very popular, and apart from the exceptions mentioned, most will be tweakable.
Title: Re: Tweaking Broadcom based routers
Post by: GunJack on February 06, 2011, 11:17:06 AM
I'm not sure that it's true to say that the availability of tweakable routers is reducing. Certainly Thomson have done their best to stop users from tweaking, and ISPs tend to reduce the functionality in their custom firmwares, but there are plenty of alternatives. Netgear routers (for example) all give access to their telnet interface using the hidden 'debug' URL, and their Broadcom-based models are all tweakable. Broadcom chipsets remain very popular, and apart from the exceptions mentioned, most will be tweakable.


...and long may it continue :)   I'd settle for a netgear for the tweakable aspect, even if they don't perform as well as D-Links on my line.

When you look at thomson as a good example, they are ACTIVELY reducing the capability, as do, as you quite rightly state, most ISPs. Add to that the Buffalos, newer Lynksys, etc., etc., and it feels like the options for new-build tweakable stuff is reducing..maybe it is just a perception, and one I hope doesn't end up as a future reality :(
Title: Re: Tweaking Broadcom based routers
Post by: GunJack on February 16, 2011, 12:50:40 PM
YeeHaaa!!

after my foray into telnet t'other week, last night I had a sudden thought...wonder if I can now get routerstats running with my 2640B's v4.01 firmware ??

last year john (of routerstats fame) tried to enable a version of rs-lite to work with said fw, but unfortunately he couldn't get it to go. So, last night, armed with my newly-found telnet skills ( ;) ) I tried fiddling with the full version, and bingo !!! I now have it talking to my router and have access to both DMT (tweaked version for the 4.01 fw) AND the full version of Routerstats !!!

You gotta love this forum and the peeps on here :)

*** special thanks to eric for starting this thread off in the first place  ;D ***
Title: Re: Tweaking Broadcom based routers
Post by: roseway on February 16, 2011, 12:57:43 PM
Well done with Routerstats, and thanks for the kind comment. :)