1. Open a Terminal and type ‘sudo apt-get install hostapd’. Enter
2. Type ‘sudo apt-get remove hostapd’. Enter. Type ‘y’ if prompted to continue.
a. Installing and removing the application ensures that certain directories and files have been created that will be necessary later.
3. Plug in the wireless adapter to an available USB port on the Pi
a. We are using an ASUS USB-N13
4. In a terminal type ‘lsusb’, Enter to get a list of recognized devices. The USB-N13 should appear on the list
5. Using a Windows machine, Download the zip file of the proper linux drivers for the chipset of the wi-fi adapter.
a. (RTL8192CU) can be found here: http://www.realtek.com.tw/downloads/downloadsView.aspx? Langid=1&PNid=21&PFid=48&Level=5&Conn=4&DownTypeID=3&GetDown=false&Downloads=true
b. Unzip the file and enter the root directory.
c. Open ‘wpa_supplicant_hostapd’, Extract the two zip files found here.
d. Place the root directory on a USB drive and plug the drive into an available port on the Pi
6. Move the USB drive to the Pi, open a terminal and type ‘cd /media’. Enter.
a. Type ‘ls’ to see a list of all available directories in the Media directory. (This is the directory in which USB drives and other
connected media devices will get mounted and named automatically for now)
b. Type ‘cd <the name of the drive listed>’. Enter. You should now see the contents of the USB drive (by typing ls again)
7. Navigate through the USB drive to locate your files (the patched version of Hostapd designed specifically to work with this chipset)
a. Hint: instead of typing out an entire directory name … you can type enough characters of the directory name to be unique
then press <tab>
i. Ex: ‘cd RTL8188C’ and press <tab> to complete the string of characters. This will only work if there is only one possible
b. Type ‘cd wpa_supplicant_hostapd/wpa_supplicant_hostapd-0.8’ Enter
c. When you type ‘ls’ you should see a directory named ‘hostapd’, type ‘cd hostapd’, Enter.
8. Make and Install
a. Type ‘sudo make’ Enter. (This will take several minutes)
b. Type ‘sudo make install’ Enter.
9. Replace file
a. Copy the file “hostapd” from: /usr/local/bin to: /usr/sbin
i. ‘sudo cp hostapd /usr/sbin’
b. Change directory to /usr/sbin
i. cd /usr/sbin
c. Probably need to make “hostapd” executable
i. Type ‘ls’ … if file labeled ‘hostapd’ is not green, run this command ‘sudo chmod +x hostapd’ to make it executable.
10. Edit the “interfaces” file
a. Type ‘cd /etc/network’ Enter.
b. Type ‘sudo nano interfaces’ to open file in text editor
c. Comment (prepend with “#”) the following lines: iface wlan0 init manual
d. Add the following lines to the bottom of the file (a modified following of this guide http://sirlagz.net/2012/08/09/how-to-use-the-raspberry-pi-as-a-wireless-access-pointrouter-part-1/
): iface wlan0 inet static
e. Close and save “interfaces”
i. Control+X, Y, Enter
11. Type ‘cd /etc/default’ Enter
12. Edit the “hostapd” file:
a. Type ‘sudo nano hostapd’ Enter
b. Remove the pound sign (#) that appears before the line ‘DAEMON_CONF=””’ and inside the quotes type
c. Close and save
i. CTRL+X, Y, Enter.
13. Type ‘cd /etc/hostapd’ Enter.
14. Create the config file specified
a. Type ‘sudo nano hostapd.conf’, Enter
b. add the following lines interface=wlan0
c. Close and save
i. CTRL+X, Y and Enter
15. Test SSID broadcast
a. Directory doesn’t matter … (Type ‘cd /etc’ Enter)
b. sudo service hostapd start
c. sudo service hostapd stop
16. Install and configure dnsmasq (application for managing DHCP)
a. Type ‘sudo apt-get install dnsmasq’, Enter
b. Hit Y when prompted.
c. Type ‘sudo nano /etc/dnsmasq.conf’ to edit dnsmasq configuration and add the following lines to the top of the file: interface=wlan0
address=/#/192.168.2.1 #redirect all DNS requests to 192.168.2.1
d. CTRL+X, Y, Enter
17. Start (or Restart) services (you may need to reboot the pi initially after the above installation/configuration steps)
a. sudo service hostapd start
b. sudo service dnsmasq restart
a. Services should start automatically if all required devices (WiFi interface) are connected
a. sudo poweroff
b. or: sudo shutdown … then poweroff