Blog.gowifi

Blog.gowifi

logos (other)

Logos

Go Wireless NZ

Tuesday, January 14, 2014

UniFi Hotspot: Adding MB & Speed limit

Scenario:
Ubiquiti UniFi's currently have an option to create a guest hotspot network. By default, when using the vouchers, they only allow you to select a period of time, but not any MB or speed limits. Although this function is built into the units, they've yet to include it on the web interface. This is a simple hack that bypasses that.



Warning: This modification is not supported by Ubiquiti or Go Wireless Ltd and must be used at your own risk!

This is designed for UniFi version 2.4.6 (latest at time of writing)


Windows:
Download the files from here
Locate where your UniFi software is installed, default is: C:\Users\%USERNAME%\Ubiquiti UniFi\
Unzip the file you've downloaded from the website and copy and paste the 'webapps' directory into the UniFi folder.
You should be prompted if you wish to replace all the files. Select yes.

Now your Hotspot vouchers page should contain a quota for MB, and limiting download and upload speed.



Ubuntu Server 12.04:
Open up your commend prompt
cd /tmp/
wget http://www.gowifi.co.nz/files/UniFi-V.2.4.6.tar
tar -xf UniFi-V.2.4.6.tar
cp unifi-hotspot.2.4.6.js /usr/lib/unifi/webapps/ROOT/library/js/unifi-hotspot.2.4.6.js
cp hotspot.jsp /usr/lib/unifi/webapps/ROOT/hotspot.jsp
cp voucher.jsp /usr/lib/unifi/webapps/ROOT/pages/voucher.jsp

  
Much Kudos for this hack to mopificius on the Ubiquiti forums


5 comments:

  1. Great to see you "commending" the Ubuntu solution! IMHO this post, and your excellent "Multiple Networks over a wireless link using Ubiquti NanoStations & Mikrotik Routerboards" article, highlight the clarity and simplicity of a command line interface. Is there any talk at Ubiquity of the introduction of a CLI to provide an alternative way to program and back up the configuration?

    ReplyDelete
    Replies
    1. Hi Steve, Always keen to push more people towards Ubuntu :) the more people know the better - expect more to come!
      There is some basic configuration that can be done via CLI on Ubiquiti, a little reading here: http://tinyurl.com/mzuon8f

      But on a whole, Ubiquiti are moving into simplified configurations and thus putting their time and development into the web GUI

      Delete
    2. Hi cant get the windows option to work on a new install 2.4.6. dumped webapps as directed but under create vouchers i am not getting any new options. Its working on ubuntu though. Any ideas on how i can get it to work on Windows Xp sp3

      Delete
    3. Hi Nyasha,

      I've recreated this on Windows XP SP3 and got the same result. You'll see that where the vouchers that are already created are displayed, it add's in the columns for the MB Quota but you don't have any options to create a voucher with these.
      Restarting the service didn't seem to resolve the issue but if you manually edit the hotspot.js file (\webapps\ROOT\), save it, and then change it back, The system seems to see it as changed and you can now create vouchers with MB limits.

      Hope this helps :)

      Delete
  2. UniFi v3.2.7 Controller esta para esta version ya que intente con este archivo y me da error tienen para esta version gracias

    ReplyDelete