sudo apt-get install bridge-utils hostapd
2. Because hostapd not compatible with Realtek RTL8188CUS. So change hostapd to suit for RTL8188CUS.
wget http://www.daveconroy.com/wp3/wp-content/uploads/2013/07/hostapd.zip
unzip hostapd.zip
sudo mv /usr/sbin/hostapd /usr/sbin/hostapd.bak
sudo mv hostapd /usr/sbin/hostapd.edimax
sudo ln -sf /usr/sbin/hostapd.edimax /usr/sbin/hostapd
sudo chown root.root /usr/sbin/hostapd
sudo chmod 755 /usr/sbin/hostapd
3. Bridge eth0 and wlan0[1]
sudo nano /etc/network/interfaces
#loopback adapter
auto lo
iface lo inet loopback
#wired adapter
iface eth0 inet dhcp
#bridge
auto br0
iface br0 inet dhcp
bridge_ports eth0 wlan0
4. Configure the configuration of hostapd
sudo nano /etc/hostapd/hostapd.conf
interface=wlan0
driver=rtl871xdrv
bridge=br0
ssid=RaspberryPi
channel=1
wmm_enabled=0
wpa=1
wpa_passphrase=0000011111
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
auth_algs=1
macaddr_acl=0
description :
wpa_passphrase=0000011111 # password
5. Start your hostapd
hostapd -dd /etc/hostapd/hostapd.conf
Data:
[1]
brctl show
bridge name bridge id STP enabled interfaces
br0 8000.801f02a6a77f no eth0
wlan0
Reference :
0 意見:
張貼留言