I have successfully configured the TP-Link TL-WN725N V2 WiFi module (chipset RTL8188EU) as an AP (access point).
Have tried many tutorials out there, but none worked for me (hostapd failures with bad wifi driver).
This tutorial is based upon these sources (with some exceptions):
RPI-Wireless-Hotspot
Wifi-hotspot-with-edimax-nano-usb
Since I used the module to control a robot through WiFi, I didn't setup a bridge to share internet connection (hotspot).
If you want to share/access internet through the AP, then look how to make a bridged connection in the above sources.
Steps that helped me to configure a non-bridged AP:
1. Install hostapd & dhcp server
Code: Select all
apt-get install hostapd udhcpd
Code: Select all
start 192.168.42.2 # This is the range of IPs that the hostspot will give to client devices.
end 192.168.42.20
interface wlan0 # The device uDHCP listens on.
remaining yes
opt dns 8.8.8.8 4.4.4.4 # The DNS servers client devices will use.
opt subnet 255.255.255.0
opt router 192.168.42.1 # The Pi's IP address on wlan0 which we will set up shortly.
opt lease 864000 # 10 day DHCP lease time in seconds
Code: Select all
#DHCPD_ENABLED="no"
Code: Select all
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
# WiFi AP
auto wlan0
iface wlan0 inet static
address 192.168.42.1
netmask 255.255.255.0
post-up service udhcpd start
#allow-hotplug wlan0
#iface wlan0 inet manual
#wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
#iface default inet dhcp
Code: Select all
wget http://www.daveconroy.com/wp3/wp-content/uploads/2013/07/hostapd.zip
unzip hostapd.zip
mv /usr/sbin/hostapd /usr/sbin/hostapd.bak
mv hostapd /usr/sbin/hostapd
chmod 755 /usr/sbin/hostapd
NOTE: if you want to compile the binary for yourself, then go here & download RTL8192CUS driver. Navigate inside zip to the wpa_supplicant_hostapd/wpa_supplicant_hostapd-0.8/hostapd and run: make, make install, then copy as above.
6. Edit /etc/hostapd/hostapd.conf, contents should look like (change "RPI_AP" to the desired AP name, "AP_PASSWORD" - to desired password):
Code: Select all
interface=wlan0
driver=rtl871xdrv
ssid=RPI_AP
hw_mode=g
channel=6
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=AP_PASSWORD
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
macaddr_acl=0
Code: Select all
DAEMON_CONF="/etc/hostapd/hostapd.conf"
Code: Select all
service hostapd start
Code: Select all
update-rc.d hostapd enable
Code: Select all
reboot
I have successfully tested with my Android phone.