Broadcom Chipset Modem Test Results

Connection issues, drop outs or speed related faults for ADSL and ADSL2+ services
Post Reply
Dazzled
Volunteer Site Admin
Posts: 6003
Joined: Mon Nov 13, 2006 1:16 pm
Location: Sydney

Broadcom Chipset Modem Test Results

Post by Dazzled » Wed Dec 11, 2013 5:28 pm

This post is a fork of a very long thread where a user obtained the line characteristics from his Broadcom chipset modem, and I included in that thread a few sample outputs from my own tool, which incidentally emulates the most useful functions of the well-known DMT tool (without the reams of C). I don't know why manufacturers are so quiet on this topic.

The script I used is as provided below, and was used most recently on some TP-Link and Dynalink units, is quite brief (aka Q&D) and does the job. Coded for personal use, it is not "industrial strength" as in its present form it must run from its own folder, doesn't catch any errors etc. It may need small adjustments for slightly differing modem commands, slower telnet responses etc. The command adsl may be found for example as adslcfg in some models, though arguments are usually unchanged. Because of inbuilt waits it takes about 6 seconds to produce the charts. This code does not write config data to the modem.

I would appreciate if readers who find it useful would post back with improvements, or changes for a particular modem, or superior graphics. Needless to add, there are no guarantees.

This is a Tcl expect script. Bash users may need to install expect. Gnuplot does the drawing.

adsltool.sh:

Code: Select all

#!/usr/bin/expect
#-------------------------------------------------------------------
# Chart Hlog, QLN and SNR arrays from Broadcom chip modems 
# (TP-Link, Dynalink, etc) - Dazzled 2013
#------------------------------------------------------------------- 
set untitled 1
set timeout 1               
log_user 0                 
spawn telnet "192.168.1.1"
expect "Login name: "  {send "admin\r"}
expect "Password: "    {send "admin\r"}
foreach cmd  {"--QLN" "--SNR" "--Hlog" "--Bits"} outf {"qln.dat" "snr.dat" "hlg.dat" "bit.dat"} {
   set fp  [open "$outf" w]
   expect "> " {send "adsl info $cmd\r"}
   expect "\n" {set buf "$expect_out(buffer)"; puts -nonewline $fp "$buf"; exp_continue}
   close $fp
   if {$untitled} {set header [exec sed -n "/Channel/p" "$outf"]; set untitled 0 } 
   exec sed --in-place "1, 5d" "$outf" 
  }
expect ">" {send "logout\r"}

exec echo -e "set title \"$header\"" > plot1.cmd
exec gnuplot -persist plot.cmd
exit
plot.cmd:

Code: Select all

#-------------------------------------------------------------------
#plot commands called by adsltool.sh -- Dazzled 2013
#------------------------------------------------------------------- 
set term wxt title "Modem Line Test"
set lmargin 5
set rmargin 5
set grid x front
set mxtics 5
set xlabel "Tone No"
set xrange [:511]
#--------------------lower plot--------------
set multiplot layout 2, 1
set origin 0, 0
set x2range [0:2208]
set x2tics nomirror out ("142 kHz" 142,"500" 500,"750" 750,"1000" 1000,"1250" 1250,"1500" 1500,"2000 kHz" 2000)
set ylabel "Hlog, QLN dB"
set ytics nomirror
set y2label "SNR dB"
set y2tics nomirror
plot "qln.dat" using 1:2 with lines   axis x1y1 title "QLN",  \
     "hlg.dat" using 1:2 with lines   axis x1y1 title "Hlog", \
     "snr.dat" using 1:2 with histeps axis x1y2 title "SNR"
#--------------------upper plot-------------
load "plot1.cmd"
set origin 0, .5
unset x2tics
unset xlabel
set grid x y front
set ylabel "Bits"
set y2label "Bits"
set style fill solid
plot "bit.dat" using 1:2 with boxes title "BPT"
unset multiplot
Attachments
adsl line test.png
Sample line, with a few problems to address
adsl line test.png (41.18 KiB) Viewed 48461 times

dsc68
Posts: 110
Joined: Tue Jan 03, 2006 5:01 pm
Location: Lower Beechmont, Qld

Re: Broadcom Chipset Modem Test Results

Post by dsc68 » Thu Apr 03, 2014 4:01 pm

Check out DSLStats http://www.s446074245.websitehome.co.uk/
DSLstats is a DSL monitoring program for Linux and Windows.

The purpose of this program is to monitor the state of an ADSL or VDSL2 connection. It works with DSL routers using Broadcom chipsets which have a fully functional telnet interface with access to the Broadcom CLI. It also supports some Thomson/Technicolor routers via their custom CLI, but some of the features of the program are not available for these models. All of the data is obtained from the CLI via telnet.

Dazzled
Volunteer Site Admin
Posts: 6003
Joined: Mon Nov 13, 2006 1:16 pm
Location: Sydney

Re: Broadcom Chipset Modem Test Results

Post by Dazzled » Thu Apr 03, 2014 5:35 pm

Thanks for the reply.

I was aware of DSLstats, which when you look at the code is attacking a quick job the long way. I think I recommended it to someone here once. That comment applies to DMTtool as well, and its C open source equivalent.

I'm not burdened by the shell limits of a common OS, so when scripting can do something easily I tend to choose that path, as short scripts are easily maintained or improved. Could some other scripters give us their versions?

Dazzled
Volunteer Site Admin
Posts: 6003
Joined: Mon Nov 13, 2006 1:16 pm
Location: Sydney

Re: Broadcom Chipset Modem Test Results

Post by Dazzled » Thu Apr 03, 2014 8:13 pm

I'll add this post for completeness' sake. There are many requests to alter the SNR margin in these Broadcom routers to gain a little speed, or more rarely, to improve stability. Lowering the margin for speed is risking dropouts, which occur whenever the margin is insufficient for the noise on the line.

Billion models give a config item in the browser interface, but most makes don't.

The telnet interface is used again. The common command used is adsl, although adslcfg is found in some routers. The full command is adsl configure --SNR <number>

The trick is to calculate the number, N, which, if we seek to change SNR by dB, can be found (Fortran style) by
N = NINT ((dB + 6) / 0.06).
So, to change the margin by +6 dB, N = 200. If we want to lower the margin by -2 dB, N = 67. N = 0 is meaningless, use 1.

It gets tricky when N goes negative - if you are silly enough to want -12dB, N = -100. The limited router interface wasn't designed to do negative arithmetic, so we fake the binary value. Subtract the unsigned abs value of N from 65536. 65536 - 100 = 65436 and use this <number> in the command.

The command then requires a reboot to take effect when the modem retrains. If you have an excessively reduced margin you may not even get a new connection. If you can't fix it on telnet (you should be able) then do a factory reset to reload the default state.

dsc68
Posts: 110
Joined: Tue Jan 03, 2006 5:01 pm
Location: Lower Beechmont, Qld

Re: Broadcom Chipset Modem Test Results

Post by dsc68 » Thu Apr 03, 2014 10:12 pm

I have an old D-Link DSL-502T which uses the GlobeSpan GS7070 chipset. The BPT, QLN and SNR numbers are available by telneting in and looking in /proc/avalanche. The data does however need a bit of trickery pokery to get it in a readable format for gnuplot.

Post Reply