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
Tags: 1800HG, BT Homehub, mqtt, xml

Nice, I’ve played with that speed applet too. I didn’t go as far as to decompile it, but I had found the “XML” data it was polling. I made a script to query a few pages from my 2wire router periodically so I can have a backup of my nat/firewall rules. While parsing all the devices it knew about on my network I found I could “guess” devices it had forgotten about and still had some type of residual data retention for. Also I could get details about the USB interface even though it was not active.
Would be nice to put this app, or at least the data it uses, in a Windows Gadget. What I would really like to have is a traffic monitor which tells me which of the many devices on the network is hogging the broadband connection, so I can go stop it when I want to stream a movie. Any ideas?
It’d be possible to put the data collected from the router into a windows gadget but with this router that wouldn’t allow you to see what each device was doing. If it’s just your home network you shouldn’t need a gadget to tell you what’s hogging bandwidth!
I’m not really that interested in putting it into a windows gadget as I use Linux 99% of my time at work and at home!