Udpate (August 2018)
It has also been implemented as a new "Action" mode in the new NanoLED menu: https://github.com/WLAN-Pi/wlanpi-nanohat-oled
In this article, I will explain how to configure the WLAN Pi so you can use it as a Wi-Fi hotspot. You could then use your WLAN Pi to perform the following:
- Use it as a source to measure wall attenuation (see this article by Nigel Bowden for more details on how to do these measurements: https://www.ekahau.com/blog/2015/09/07/wi-fi-planning-walls-and-dbs-measuring-obstruction-losses-for-wlan-predictive-modelling/)
- Use it to perform Wi-Fi speedtests (I personally use this to show the students what a typical OFDM signal looks like on the spectrum)
Here is the video tutorial that explains the whole setup. You can also find the same steps detailed in this article.
- Download the latest version of the wlanpi image on this website: https://github.com/WLAN-Pi/wlanpi/releases
- Load it unto the microSD card that you will use for your wlanpi (I use the program called etcher on macOS)
- Insert the microSD card into the wlanpi
- Connect the wlanpi to your network (via the ethernet interface)
- Connect the Wi-Fi NIC to the wlanpi (via the USB port)
- Power the wlanpi ON
Here is a picture of my setup (I connected the wlanpi directly to my laptop):
- Username: wlanpi
- Password: wlanpi
- Use the following command to create a new user: sudo adduser username
- In the following prompts, specify which password you want to use for this user
- Use the following command to give this user sudo privileges: sudo usermod -aG sudo username
- Finally, try to connect using this new username and password: su - username
- In the home directory of the user, open the .profile file using the following command: sudo nano .profile
- Modify this file by adding the following line at the end of the .profile file: PATH=$PATH:/sbin:/usr/sbin
- Save and close the .profile file
- Once back in the shell, reload the profile using this command: source .profile
- You should now be able to use the ifconfig command
1 - Verify that the hostapd is installed by using the following command: dpkg --list | grep hostapd
2 - Then, we need to configure hostapd so it create a Wi-Fi network. In my case I create a network on channel 36 called "Allez Les Bleus". I defined it on 5GHz as I would use the tool to perform my wall measurements attenuations. In order to modify the configurations, you need to modify the file called /etc/hostapd.conf. You can open it with nano to modify it: sudo nano /etc/hostapd.conf
Configure the Network Interfaces
1 - Validate that the wlan0 interface is UP (it should be up if you connected the NIC) using the following command: ifconfig.
Note: some Engineers had to add the following line in the /etc/network/interface file in order to make it work: hostapd /etc/hostapd.conf. You could try it out if this is not working out for you after the first try.
Configure the DHCP Server
1 - Verify that the isc-dhcp-server is installed by using the following command: dpkg --list | grep isc-dhcp-server
Test & Validate
1 - Start the hostapd application using the following command: sudo hostapd -d /etc/hostapd.conf
Run it at Startup
1 - Enter the following command to configure the crontab configuration file: sudo crontab -e
2 - In the configuration file, add the following line: @reboot sudo hostapd -d /etc/hostapd.conf
4 - Reboot and see if it works!
1 - Work on a script that would active the hotspot automatically when the Wi-Fi NIC is connected
2 - OR EVEN BETTER, reprogram one of the button to start the hotspot when pressed and disable it when pressed again
3 - Complete the configuration to bridge the Wi-Fi Hotspot to the Ethernet interface so we can pass traffic through. You could then use it to setup your own local connection when the Hotel Wi-Fi is bad ;)
Please let me know if you have more ideas and please let me know if you have the skills to make the three listed above happen!
I hope this can be useful for some.
written by François Vergès