I have got the Soft AP to work in Windows (using the supplied CD) and Linux by following these steps. I was able to connect/get dhcp ip from my Android.
Will update this post with //TODO
1) internet sharing
with ethernet or built in wifi interface
2) Start openvpn
tunnel and essentially this Access Point will be VPN protected
(think: Netflix; after connecting my Chromecast and Android to this mountpoint)
3) do this on my Raspberry Pi 2
so that my Laptop can get some sleep 🙂
Prerequisite (LOL! Not really! haha):
$ sudo apt install snapd
$ sudo snap install plexmediaserver
$ sudo apt-get install git
$ sudo apt-get install build-essential
$ sudo apt-get install rbp2-headers-$(uname -r)
A. Get the latest driver. Blacklist the staging one
sudo lshw -C network
will show your driver as r8188eu
modinfo r8188eu
is in staging directory.
1.
git clone https://github.com/lwfinger/rtl8188eu
make all
sudo make install
2.
sudo vi /etc/modprobe.d/50-blacklist-8188eu.conf
blacklist r8188eu
3.
sudo reboot
lsmod | grep 8188
should show you ‘8188eu’
sudo lshw -C network
will still show r8188eu – but that’s OK.
B. Find the wifi interface name
ifconfig
wlx00e04c0876f5 Link encap:Ethernet HWaddr
C. Remove existing hostapd and install the patched version
1.
sudo apt-get autoremove hostapd
2.
git clone https://github.com/jenssegers/RTL8188-hostapd
3.
cd RTL8188-hostapd/hostapd
sudo make
sudo make install
4. (Optionally)
cd RTL8188-hostapd/wpa_supplicant
sudo make
sudo make install
5.
sudo vi /etc/hostapd/hostapd.conf
# Basic configuration interface=wlx00e04c0876f5 ssid=AntMan channel=6 #bridge=br0 # WPA and WPA2 configuration macaddr_acl=0 auth_algs=1 ignore_broadcast_ssid=0 wpa=3 wpa_passphrase=ChangePassPhrase wpa_key_mgmt=WPA-PSK wpa_pairwise=TKIP rsn_pairwise=CCMP # Hardware configuration driver=rtl871xdrv ieee80211n=1 hw_mode=g device_name=RTL8188EU manufacturer=Realtek
6.
sudo vi /etc/default/hostapd
DAEMON_CONF="/etc/hostapd/hostapd.conf"
D. Adding dhcp capabilities
1.
sudo apt-get install udhcpd
2.
sudo vi /etc/udhcpd.conf
start 192.168.42.2 #default: 192.168.0.20 end 192.168.42.24 #default: 192.168.0.254 interface wlx00e04c0876f5 #default: eth0 remaining yes #default: yes opt dns 8.8.8.8 8.8.4.4 option subnet 255.255.255.0 opt router 192.168.42.1 option lease 864000 # 10 days of seconds
3.
sudo vi /etc/default/udhcpd
#DHCPD_ENABLED="no"
E. Setting up the wifi router on static ip and hooking udhcpd start
sudo vi /etc/network/interfaces
auto lo iface lo inet loopback auto wlx00e04c0876f5 iface wlx00e04c0876f5 inet static address 192.168.42.1 netmask 255.255.255.0 post-up service udhcpd start
F. Finally restart the services and reboot. You will see Access Point ‘AntMan‘ upon reboot.
sudo service hostapd start
sudo update-rc.d hostapd defaults
sudo reboot
Happy hacking!
Source: https://www.raspberrypi.org/forums/viewtopic.php?f=91&t=54946
Wifi Dongle: http://www.snapdeal.com/product/leoxsys-150-mbps-nano-wifi/1179610
Pingback: Share internet Soft-AP hostapd via NAT | Nikunj Lahoti