Internet Speed Monitoring with BT (2Wire) Homehub 1800HG

For a few years now at home we have used the BT (rebadged 2Wire) 1800HG which has provided good service for the whole time but it's only now I've investigated into its workings a bit more closely.

Recently I had cause to be looking through the router web interface and came across a primitive "Speed Meter" monitoring current upload/download speed usage so of course the first thing that occured to me was how can I get at the data so I can build my own more funky version.

After some investigation I found the graph was being generated using a java applet embedded into the page. I then downloaded from /base/web/speedmeter/MeterApplet.class and subsequently decompiled using the java decompiler JAD. This led me to find that the applet was requesting data from /base/web/speedmeter/speedmeter_data which provides an xml file with the current upload and download speeds in in the form:

<?xml version='1.0'?>
<tw_bb_in_speed>1</tw_bb_in_speed><tw_bb_out_speed>0</tw_bb_out_speed>

Parsing this data will require some modification as this is not really valid XML as it has no root node but that is easily rectified. I'm currently working on integrating this with an mqtt system