02 September 2013

Before we start, please make sure your system requirements.

What's do you need?
  1. A Raspberry PI
  2. A boot SD card with default Raspberry PI image iso (Raspbian "wheezy")
  3. A USB WiFi device which support "Access Point" mode and the driver is rtl8192cu


1. Install the necessary packages
sudo apt-get install hostapd bridge-utils

2. Configure
sudo vim /etc/default/hostapd
Add the following line to the bottom of the file.
DAEMON_CONF="/etc/hostapd/hostapd.conf"


Modified the config file
sudo vim /etc/hostapd/hostapd.conf
Add the following lines to the file.
You can change the "ssid", "wpa_passphrase".
Most the others examples use nl80211 as their driver, but Raspberry PI don't have the driver (default).
Therefore I can't start the service hostapd.
However I found some people use rtl871xdrv and they have the related hostapd binary file that supports rtl driver.
So... I use rtl871xdrv.
interface=wlan0                                                                                                                 
driver=rtl871xdrv
ssid=KenRaspberryPiAP
hw_mode=g
channel=6
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=safesync
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP



3. Change network interface setting
sudo vim /etc/network/interfaces


auto lo
auto br0
iface lo inet loopback
iface br0 inet dhcp
bridge_fd 1
bridge_hello 3
bridge_maxage 10
bridge_stp off
bridge_ports eth0 wlan0

allow-hotplug eth0
iface eth0 inet manual
allow-hotplug wlan0
iface wlan0 inet manual



4. Replace the hostappd binary

Download
cd /usr/sbin
rm -f hostapd
wget http://dl.dropboxusercontent.com/u/13846584/hostapd

Change Permission
sudo chown root:root hostapd
sudo chmod 755 hostapd



5. Reboot
sudo reboot now


After reboot, you should see your own Raspberry PI Access Point(AP).













blog comments powered by Disqus