In this chapter, we will be installing and setting up a Wireless Access Point (WAP) on our BeagleBone system. In the first phase of the installation, our media server will be wide open. Once we have things running smoothly, we will add layers of security.
We will do this by installing and configuring the following programs:
The first thing that we have to do is to make sure that we have the latest version of hostapd
, and we can do this with the following commands:
apt-get update apt-get install hostapd
As you can see in the previous screenshot, we have the latest version installed.
Now that we know we have the latest version installed, it is time to edit the /etc/default/hostapd
configuration file, as follows:
nano /etc/default/hostapd
We need to add the following line to the file:
DAEMON_CONF="/etc/hostapd/hostapd.conf"
This is how your hostapd
file should look:
# Defaults for hostapd initscript # # See /usr/share/doc/hostapd/README.Debian for information about alternative # methods of managing hostapd. # # Uncomment and set DAEMON_CONF to the absolute path of a hostapd configuration # file and hostapd will be started during system boot. An example configuration # file can be found at /usr/share/doc/hostapd/examples/hostapd.conf.gz # DAEMON_CONF="/etc/hostapd/hostapd.conf" ß Add this line # Additional daemon options to be appended to hostapd command:- # -d show more debug messages (-dd for even more) # -K include key data in debug messages # -t include timestamps in some debug messages # # Note that -B (daemon mode) and -P (pidfile) options are automatically # configured by the init.d script and must not be added to DAEMON_OPTS. # #DAEMON_OPTS=""
Now that we have referenced the hostapd
it, the next file that we have to create is the hostapd.conf
file.
You can create and empty the file with the following command:
touch /etc/hostapd/hostapd.conf
Next, we edit the empty file and add the following text:
### Wireless network name ### interface=wlan0 ### Set your bridge name ### #bridge=br0 #driver driver=nl80211 country_code=US ## The name of your server## ssid=Beaglebone Media Server ## Channel to use channel=7 hw_mode=g #############Security Starts Here######################## # # Static WPA2 key configuration # #1=wpa1, 2=wpa2, 3=both # #wpa=2 ## wpa_passphrase=yourpassword ## Key management algorithms ## ## wpa_key_mgmt=WPA-PSK # ## Set cipher suites (encryption algorithms) ## ## TKIP = Temporal Key Integrity Protocol ## CCMP = AES in Counter mode with CBC-MAC wpa_pairwise=TKIP #rsn_pairwise=CCMP # ## Shared Key Authentication ## auth_algs=1 ## Accept all MAC address ### macaddr_acl=0 #enables/disables broadcasting the ssid ignore_broadcast_ssid=0 # Needed for Windows clients eapol_key_index_workaround=0
As I mentioned earlier, security is disabled at this point. At the risk of stating the obvious, a laptop or a tablet with Wi-Fi capability will come in really handy while performing the following steps.
If you turn on your laptop or tablet and "search for available networks," you should see your BeagleBone server on the list. It will be displayed as an Open network, because we have not turned on security yet. If you try to connect, your device will say something such as acquiring a network address and then hang. This is normal because we haven't set up DHCP yet. We do know, however, that hostapd is alive and well.