Author Topic: Bug in hotspot profile page  (Read 3998 times)

Offline dijnebbh

  • Sr. Member
  • ****
  • Posts: 104
Bug in hotspot profile page
« on: November 11, 2010, 09:20:50 pm »
 :o

There is definitely a bug in the hotspot access profiles page. Your excellent training as a programmer has overlooked a key issue.

I didn't realize it was a bug until I became more educated on bandwidth calculations, and why things weren't 'Adding up'.

Hard drive manufacturers, and DSL and Cable, internationally internet/network traffic devices, calculate bandwidth using a decimal base of 1000k. Not a binary base of 1024k.

For example:
http://www.matisse.net/bitcalc/?input_amount=2592000000000&input_units=bits&notation=ieee

2,592,000,000,000.00 (american notation) / 25.920.000.000,00 (european notation) bits for *bandwidth* and *traffic* calculations is exactly 324GB: gigabytes (GB) on 1000 (decimal), or 301.724GiB (gigabytes in binary on 1024k); not 301.724GB unless we are dealing with Windows operating systems, primarly.

GB in decimal base/1000 is an international standard for hard drive storage and network traffic. Microsoft's 'standards', use a binary base of 1024k however, when calculating storage. This is why the new 1TB hard drive you just bought, only shows up as 900 megabytes under the operating system.
A quick google search shows this: http://www.google.com/search?&q=GiB+versus+GB

In the hotspot 'Manage access profiles' page, the form says to enter the value in 'bytes'. An entry of 2,592,000,000,000 bits is 324,000,000,000 bytes. When 'submit' is clicked, the entry changes to a gigabyte notation and the value is incorrectly displayed as 301.748GB, when it should be an even 324GB (and much easier to figure).

This is not just a 'display problem': it reveals the math underneath is faulty, because at some point the website has to relay the limits to the underlying network system, so in turn the network hardware can properly limit the network clients. It also affects the traffic reports; if I look at ttraf in DD-WRT (or Coova) and yours, they won't add-up. Since other people have written software like the 'chilli' software on the routers, they would have likely used the international internet standard used, of 1000 not 1024.

So it seems like Worldspot is 'talking' 1024 to 1000 devices; binary base to decimal devices.

sry it's not a PM, I didn't mean to embarrass you. You keep the system running fine otherwise.

[P.S. and a download rate of 2000k becomes 1.95312M, i.e. it should be 2M]
« Last Edit: November 11, 2010, 09:23:00 pm by dijnebbh »

Offline WorldSpot

  • Administrator
  • Hero Member
  • *****
  • Posts: 2465
Re: Bug in hotspot profile page
« Reply #1 on: November 11, 2010, 09:42:17 pm »
This is just a display convention.
Computer world use power of 2, whereas marketing firms use decimal to gain some percents.

1024byte is the only one "real" kilobyte. Others are fake...
1M=1024*1024
1G=1024*1024*1024

Offline dijnebbh

  • Sr. Member
  • ****
  • Posts: 104
Re: Bug in hotspot profile page
« Reply #2 on: November 12, 2010, 03:06:27 am »
 ;D

as much as I hate to show you up, being the excellent admin and programmer you are; you are wrong. period. it is not just some 'casual convention':

"Today the usage of the unit gigabyte continues to depend on the context. When referring to disk storage capacities it usually means 109 bytes.[citation needed] This also applies to data transmission quantities over telecommunication circuits, as the telecommunications and computer networking industries have always used the SI prefixes with their standards-based meaning." (that means 1000, decimal, not 1024 binary.)

http://en.wikipedia.org/wiki/Gigabyte

As much as I hate wikipedia, this is all over the net anywhere you care to look.

Please fix it.
thanks.


Offline WorldSpot

  • Administrator
  • Hero Member
  • *****
  • Posts: 2465
Re: Bug in hotspot profile page
« Reply #3 on: November 12, 2010, 09:30:07 am »
I fear it is too late for fixing it...

abir_ahmed

  • Guest
Re: Bug in hotspot profile page
« Reply #4 on: May 03, 2011, 10:38:00 am »
2^10=1024
8 bit= 1byte
1024 byte=1kbyte
1024kb=1mb
1024mb=1gb............. so on  ???