DataFox

Būndi DataFox is a bandwidth usage monitor for BSNL’s DataOne and MTNL’s TriBand broadband services. DataFox is a cross platform extension written for Firefox and Google Chrome; if you use Internet Explorer or any other browser, DataFox will not work for you. Tough shit. Version 1.9.5 is compatible with Firefox versions 1.5 – 15 and supports BSNL sites (including data.bsnl.in and selfcare.ndc.bsnl.co.in) and both MTNL Bombay/Delhi sites (including 59.185.101.2).

Venâncio Aires DataFox in action on the Firefox status bar…

menu tooltip
DataFox context menu DataFox tooltip

DataFox in Google Chrome


Download, Installation & Updates

If you’re using Firefox, click here to install the extension directly. Alternatively, right click, choose Save Link As… and save the XPI file locally. Open this file in Firefox (File > Open File…) to complete the installation. DataFox has been tested with Firefox versions 1.5 to 8. To activate this extension, you need to restart Firefox. Firefox might show you a message at the top of this window, saying it prevented thegoan.com from asking you to install an extension. Click the Options button in the message and then click Allow in the dialog that shows up. Click the link again to install.

To update, go to Tools > Add-ons and select DataFox in the list. Right click to bring up the context menu. Select Find Update. Firefox will connect to my update site and inform you if an update is available. If one is, click Install Updates and you’re done.

If you are using Google Chrome, click the Install button on this page.

Use

DataFox is really easy to use. Once installed, you should see this icon () in your status bar. Click it to bring up the login dialog. Select your ISP, then enter your name and password and click the Login button; that’s it. Click the icon again to refresh the usage data. Since version 1.4, if you keep CTRL pressed when you click this icon, DataFox will display details from the most recent successful update. This can come in handy if the usage server is down and you’d like the previous details restored.

DataFox works by obtaining usage information directly from the BSNL / MTNL usage site, it does not monitor your network in any way, so usage details probably won’t change until you logout of DataOne / TriBand and log back in again. BSNL users may want to use the Override default domain option in the login dialog in case the BSNL server you are being directed to is not responding (see below for explanation). Users who normally use bbservice.bsnl.in/data.bsnl.in to check their usage must check this option and select the corresponding domain from the domain list. MTNL users, if the usage server is down, DataFox will not be able to fetch any usage records.

You can right click the status bar icon to bring up the following options:

Update Forces the usage data to update, has the same effect as clicking the icon.
Logout Allows you to re-enter your account details the next time you update.
Show Records Display your usage records in the browser, you may choose to see records of either the active month, or the selector for all months.
Month (BSNL Only) Choose the month for which usage data is fetched. DataFox will allow you to choose one of six months as this is the extent of the records available online. In case data for a month does not exists (say, if you have only been using DataOne for three months) then DataFox will display an error message when trying to fetch the usage info.
Preferences Brings up the DataFox preference dialog (see below). Can also be invoked from the Tools menu.
Login Dialog options:Override default domain (BSNL Only) By default, DataFox first queries sancharnet.in for the appropriate address at which your usage can be checked. I assume it sends you to a server in your region for the quickest response. In case you wish to specify your own address or in case the redirect is not working for some reason, check the box and choose an address from the list or enter your own. data.bsnl.in users (those with IP addresses in the range 117.*.*.*) must check this option and select data.bsnl.in from the domain list, DataFox will not work for you otherwise. In the username field and password fields, you must enter your 14 digit portal Id and corresponding password; these are different from the username and password you use in your dialer / modem / router.

Preferences

Login on startup:

If this is checked and you have a password saved, DataFox will attempt to log in to your ISP’s site and show you the most recent usage details. If unchecked, DataFox will display cached details on startup.

Bandwidth limit:

If you’re using DataFox, you’re most likely on a bandwidth limited plan. Entering your limit here will enable DataFox to display a progress bar indicating the percentage of bandwidth (for the current month) consumed. DataFox will also be able to tell you if you are danger of reaching your limit before the month ends and how much “surplus” bandwidth you have for the current day. If you do not enter your limit, none of these statistics will be available.

Statusbar / Tooltip string:

DataFox parses the data returned from your ISP, makes some calculations and places the results in several variables…

[BSNL]{tS}-Total Upload
[Both]{tR}-Total Download
[BSNL]{tX}-Total Transfer
[Both]{cX}-Chargeable Transfer
[Both]{sX}-Surplus Transfer (for today)
[Both]{rX}-Remaining Transfer (for the month)
[Both]{uP}-Used Percent
[Both]{aP}-Allowed Percent
[BSNL]{tH}-Total Hours
[Both]{YM}-Year-Month
[Both]{tT}-Last Updated

You can place any text in the Statusbar string or the Tooltip string, and DataFox will replace any variables in the text with their actual values.

An example: I’ve transferred 2 GB in all but only 1.5 GB if the night transfer is excluded. So the string “{tX}GB / {cX}GB” will produce “2.0GB / 1.5GB”.

Progress page:

This page controls the colors used by DataFox under different usage conditions. If you do not specify your Bandwidth limit preference page, only the Usage OK colors will be used. On the other hand, if you do specify the limit but still do not want the progress bar to appear, you can simple uncheck the enable box.

How DataFox tracks your bandwidth use

Note: The following only applies if you have specified your bandwidth limit.

Let us assume you have 6000MiB of transfer for the month, and you’re in the month of June (which has 30 days).

DataFox will calculate that you have 6000/30 = 200MiB of transfer available per day (let’s call this TPD); assuming that you’re using your bandwidth at a regular rate. This means, on the 1st of the month, you’re allowed 1*TPD = 200MiB and on the 5th of the month, your usage could go upto 5*TPD = 1000MiB and you’d still be within limits.

Allowed Transfer = date * TPD
Surplus Transfer = Allowed Transfer – Chargeable Transfer (Chargeable Transfer is the actual bandwidth that is recorded by your ISP and deducted from your bandwidth cap – this is the figure you usually keep track of).

Now, if your Surplus Transfer is negative, DataFox puts your usage in the Overlimit category and the Overlimit colors will be used for the text and the progress bar. If your Surplus Transfer is positive, your usage is OK and a different set of colors is used. It is important to note that the Surplus transfer is not the difference between your monthly limit and the amount used till date. It is the difference between the allowed usage on that date as calculated by DataFox and your actual usage.

IllustrationBandwidth limit: 6000MiB, Nr. of Days in month: 30, therefore TPD = 200MiB.
On the 5th:
Chargeable Transfer as recorded by your ISP 850MiB
Allowed Transfer as calculated by DataFox 5 * TPD = 1000MiB
Surplus Transfer = Allowed – Chargeable 1000 – 850 = 150MiB(OK)
On the 15th:
Chargeable Transfer as recorded by your ISP 3300MiB
Allowed Transfer as calculated by DataFox 15 * TPD = 3000MiB
Surplus Transfer = Allowed – Chargeable 3000 – 3300 = -300MiB(Overlimit)
On the 29th:
Chargeable Transfer as recorded by your ISP 6500MiB
Allowed Transfer as calculated by DataFox 29 * TPD = 5800MiB
Surplus Transfer = Allowed – Chargeable 5800 – 6500 = -700MiB(Overlimit)

DataFox is also capable of calculating the allowed usage on an hourly basis instead of on a daily basis (see the Daily / Hourly radio buttons on Progress preference page).

Here DataFox calculates a TPH figure as 6000 MiB / (30 * 24) hours = 8.3MiB per hour. At 2pm on the 5th of the month, 4 * 24 + 14 = 110 hours have passed. Your allowed usage at this time is: 110 * 8.33 = 916.3MiB.

The remaining calculations are the same. I programmed this in before the daily mode and then I realized this was probably too accurate to be useful, so I made the daily mode the default.

Changelog

Version 0.8 
  • Initial verision suppports BSNL DataOne only.
  • Basic tooltip and statusbar preferences.
Version 0.85b 
  • Support for MTNL TriBand.
  • Multi-window awareness.
  • Ability to execute Javascript in tooltip and status bar strings.
  • Login on startup optional.
Version 1.0 
  • Progress bar.
  • Bandwidth limit awareness, tracking and reporting.
  • Preference changes take effect immediately.
  • New preference for data unit and decimal point accuracy.
Version 1.0.1
  • Bugfix: BSNL bandwidth limit awareness.
  • Bugfix: MTNL Bombay Session Records.
Version 1.2
  • Bugfix: Rounding error could cause progress meter to display wrong color.
  • Firefox 3 beta 4 support added, many FF3 related fixes.
Version 1.4
  • Support added for new BSNL portal (bbservice.bsnl.in).
  • DataFox will now cache results automatically.
Version 1.5
  • Works with bbservice.bsnl.in update (~ July 2008), consumes much less bandwidth.
  • Code cleanup: Global variables significantly reduced, better Firefox citizen.
Version 1.7
  • Works with data.bsnl.in.
  • Works with MTNL Bombay site for ‘@’ users (59.185.101.2).
  • New variable {rX} added for remaining transfer.
Version 1.7.5
  • Works with data.bsnl.in update (~ May 2009).
  • Miscellaneous minor fixes.
  • Bumped max Firefox version to 3.5.*.
Version 1.9
  • Works with data.bsnl.in update (~ November 2009).
  • Works with MTNL Bombay update for ‘@’ users (~ July 2009).
  • Bumped max Firefox version to 3.6.*.
Version 1.9.2
  • Works with data.bsnl.in update (~ June 2010).
  • Compatible with Firefox 4
Version 1.9.3
  • Compatible with Firefox 6
Version 1.9.5 (Current)
  • Support for selfcare.ndc.bsnl.co.in
  • Compatible with Firefox current Firefox versions.

Coming up

  • Daily progress mode.
  • [Insert your favourite feature here – send me feature requests].

Privacy

The Source:

There are many people concerned about the safety of their logincredentials. This is a fair concern, so let me try to allay your fears. The XPI file you downloaded is just a zip file. Decompress it to find a JAR file (which is also just a zip file) in which you will find all the source behind DataFox. It’s just basic JavaScript and XML, and it won’t take a rocket scientist to figure out your account details are going only to the BSNL / MTNL servers. It would be impossible to hide any password stealing code in what is essentially open source project – the code is available under GPLv2 (there is no separate download, just follow the steps above to get to the source). Besides this, DataFox has been in use for two years by tens of thousands of users, if there was something fishy going on, it would never get this popular and everyone and their grandmothers would know about it.

Saved Passwords:

If you save your passwords, DataFox uses Firefox’s password store to store them. Go to Tools > Options > Security and click Show Passwords…. Look for all entries where the site is “chrome://datafox/” – you can delete or view those passwords as you please.

Contact & Support

I’m Brian Fernandes, see the About page for contact details; comments and feature requests welcome. Join other DataFox users in the DataFox thread at the India Broadband Forum. More info may be found at the DataFox wiki page.

Special thanks to Apoorv, Arnav, Gavnit, mrbgupta, Netfreak, Rohit, Seshu, Sunish and Vrushank who have sent me their passwords, without which DataFox would only work for BSNL’s old portal. Essbebe has helped collate information on the new portal, making my job much easier. Sushubh for running the India Broadband Forum which is the place to discuss DataFox related issues.