Getting the DSL linespeed with both current and attainable speed from the Fritz!Box 7360/7590 / 2020-11-28

2020-11-28 Getting the DSL linespeed with both current and attainable speed from the Fritz!Box 7360/7590
I noticed I documented my original script to fetch the upstream and downstream DSL speed from the Fritz!Box 7360 but never documented the additional steps I took later to add the attainable upstream and downstream speeds to the current upstream and downstream speeds.

After switching to the Fritz!Box 7590 I missed my VDSL statistics so I dug up the scripts I had for the 7360 and tested whether they still work. And yes they do, so no changes there. The complete script:
#!/usr/bin/perl -w

use strict;

my ($fritzuser,$fritzpass);


system("wget --user=$fritzuser --password=$fritzpass --post-file=wanifcfgrequest.xml --header=\"Content-Type: text/xml\" --header=\"SOAPAction: \\\"urn:dslforum-org:service:WANDSLInterfaceConfig:1#GetInfo\\\"\" --no-check-certificate -O wanifcfganswer.xml -o getfritz.log");

        if (/(\d+)<\/NewUpstreamMaxRate>/){
                $upstream = $1;
        if (/(\d+)<\/NewDownstreamMaxRate>/){
                $downstream = $1;
        if (/(\d+)<\/NewUpstreamCurrRate>/){
                $upstreamcur = $1;
        if (/(\d+)<\/NewDownstreamCurrRate>/){
                $downstreamcur = $1;

if (defined $upstream and defined $downstream){
        my $line=sprintf("N:%d:%d:%d:%d",$downstream*1000,$upstream*1000,$downstreamcur*1000,$upstreamcur*1000);
        print $line."\n";
This does need the wanifcfgrequest.xml file:
<?xml version="1.0" encoding="utf-8"?>
      <u:GetInfo xmlns:u="urn:dslforum-org:service:WANDSLInterfaceConfig1">
And I get a usable wanifcfganswer.xml:
<?xml version="1.0"?>
 <s:Envelope xmlns:s="" s:encodingStyle="">
<u:GetInfoResponse xmlns:u="urn:dslforum-org:service:WANDSLInterfaceConfig:1">
This works without any change both on the Fritz!Box 7360 and the Fritz!Box 7590.

Tags: , ,

IPv6 check

Running test...
, reachable as PGP encrypted e-mail preferred. PGP key 5BA9 368B E6F3 34E4 local copy PGP key 5BA9 368B E6F3 34E4 via keyservers

Meningen zijn die van mezelf, wat ik schrijf is beschermd door auteursrecht. Sommige publicaties bevatten een expliciete vermelding dat ze ongevraagd gedeeld mogen worden.
My opinions are my own, what I write is protected by copyrights. Some publications contain an explicit license statement which allows sharing without asking permission.
Other webprojects: Camp Wireless, wireless Internet access at campsites, The Virtual Bookcase, book reviews
This page generated by $Id: newsitem.cgi,v 1.58 2022/12/12 15:34:31 koos Exp $ in 0.010174 seconds.