Creating an Hotspot using a PC with Linux OS
My WiFi Service supports the use of a computer running Linux (Ubuntu/Debian) instead of the traditional DD-WRT/OpenWrt/Mikrotik router. The great advantage of this solution is the increased processing power offered by a computer than that of most routers on the market.
A last generation computer can support easily even thousands of simultaneous connections, against 50-100 offered by midrange routers.
The computer must be equipped with two network cards (eg. Eth0 and eth1). The first will be connected to the Internet while the second will be connected to the access point that spreads the Wi-Fi signal.
The choice of the network adapters
If you want to use a desktop PC to manage the hotspot, you should use the integrated network card to connect to the Internet, while for the second network card you can opt for a PCI card or a USB Ethernet adapter (choice less powerful).
If you use a laptop, you do not need to install additional network adapters because usually all laptop computers have two network adapters: one wireless and one ethernet. In this case, the wireless network card (eth0) will be connected to the Internet while the Ethernet (eth1) must be connected to the access point.
Configuration of the network adapters and access point
The adapter connected to the Internet can be configured in either DHCP or a static IP address. In the latter case it is necessary to enter also the DNS servers in the configuration.
The second network card (eth1) must not have any IP configuration.
The access point to be connected to the eth1 must be configured as follows:
-IP Address: 10.182.0.2
Running the configuration script
At this point all that remains is to run the configuration script of your location. Open the Control Panel My WiFi Service in "Locations", click on "Conf. Disp." and copy the script to the clipboard.
The script text will look like:
wget 'http://app.mywifiservice.com/script/?nasid=XXXXX' -q -O setup.sh
chmod +x setup.sh
where in place of XXXXX will shown the location NAS ID.
Open the Linux terminal and paste the text. After rebooting PC the hotspot will be ready for use.
To verify the correct operation of the hotspot, we will use a smartphone or a notebook to connect to the Wi-Fi network using the name of our location.
The procedure for accessing the hotspot is different depending on the type of device used:
- PC/Notebook: opening the browser to any web page (not https) will redirect you to the login page.
- iPhone/iPad: selecting the Wi-Fi network automatically opens the login page.
- Android: a notification appears alerting you that you are connected to a Hotspot. Clicking on the notification will redirect you to the login page.
To complete the test, create a registered user (or a prepaid ticket) on the appropriate page on the main screen of the app, and insert the username and password you just created.