Bluetooth Net Monitor

Whenever I want to see why a download is going a little slow or getting lag on an online game I’d have to log in to my routers web page or SSH in to see if its someone else in the house downloading/uploading, the net connection going wonky or just the server, this was a bit annoying to do, so I made this device to constantly show network statistics.
The monitor uses an ATmega328P @ 20MHz, 160×128 1.8″ color LCD, a Bluetooth module, is powered by USB’s 5V, has a button for changing LCD brightness (long press) and display mode (short press) and since it’s powered by USB I added support for V-USB. The plastic part with everything screwed on to is an A8 paper display holder with the back clippie part removed and some rubber feet added.
The monitor has a few modes for displaying data:
Display mode 1

  • Down sync
  • Up sync
  • Down rate
  • Up rate
  • History graph for the past 25 seconds
  • Ping
  • Packet loss
  • WAN IP
  • Time
  • Email notification

Display mode 2

  • Down rate
  • Up rate
  • Large history graph for the past 40 seconds

I’ll probably add more display modes sometime, like showing CPU usage etc. from the PC that its getting power from by making use of V-USB.
Getting the data
The router (my router is a PC running Debi an Linux) runs a shell script which gets down and up speeds of the WAN interface, first hop ping, ping packet loss, WAN IP and everything else, it then sends this data to a serial port (which in this case it’s a USB-to-serial converter using a CP2102) with a serial Bluetooth module attached, data is then sent to the other Bluetooth module in the net monitor which is then displayed on the LCD.
Bluetooth Net Monitor
To get modem down and up sync speed a CGI script is ran on the modem, normally you’d have to parse the ADSL status page of the modem, but since I’m running Open WRT on my Net gear DG834Gv3 I just needed to make a small shell script to get the ADSL status from a /proc file, well there is still a little bit of parsing, but not as much as you’d have to do with a normal HTML status page.

The protocol used is a very simple text based one

$|6100|1020|340|4|19|0||2|Wed 02 Jan 13|20:31:26|*

Special characters:
$ – Start of packet
* – End of packet
| – Delimiter to separate pieces of data

Read More: Bluetooth Net Monitor

Leave a Comment

Your email address will not be published. Required fields are marked *