create a nat-ed wifi ap
git clone git://
Log | Files | Refs | LICENSE

commit b750e70de6c41ea65533cc60b13a6b0297c4ce41
parent f06e24721a64dde389563fe4eadd4869be1f780a
Author: oblique <>
Date:   Wed Mar  4 23:48:43 +0200

Add instructions for Realtek adapters

howto/ | 74++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 74 insertions(+), 0 deletions(-)
diff --git a/howto/ b/howto/ @@ -0,0 +1,74 @@ +## Try this first + +If you are facing any problems with Realtek adapters (e.g. Edimax EW-7811Un) +first try to run create_ap with `-w 2` (i.e. use WPA2 only) or use it +without passphrase. If you are still facing any problems or you want to +also use WPA1, then follow the instructions below. + +NOTE: The instructions below are only valid for Realtek adapters with 8192 chipset. + +## Before installation + +If you're using ArchLinux, run: + +``` +pacman -S base-devel linux-headers dkms git +pacman -R hostapd +``` + +If you're using Debian, Ubuntu, or any Debian-based distribution, run: + +``` +apt-get install build-essential linux-headers-generic dkms git +apt-get remove hostapd +apt-get build-dep hostapd +``` + +## Install driver + +The driver in the mainline of Linux kernel doesn't work well with the 8192 adapters. +For this reason you need to install the driver that is provided from Realtek. Their +driver can not be compiled with newer kernels, but since it was an open-source +release under GPL license some people were able to fixed it and make it compile. + +With the following commands you can install a fixed version of Realtek's driver: + +``` +git clone +dkms add rtl8192cu-fixes +dkms install 8192cu/1.9 +cp rtl8192cu-fixes/blacklist-native-rtl8192.conf /etc/modprobe.d +cp rtl8192cu-fixes/8192cu-disable-power-management.conf /etc/modprobe.d +``` + +After installation, unload the previous driver and load the new one, or just reboot. + +## Install hostapd + +Realtek's driver is using an old subsystem which is called `wireless-extensions` +(or `wext`). Hostapd works only with the new subsystem (which is called `nl80211`). +For this reason Realtek wrote a patch for hostapd. You can install it with the +following commands: + +If you have ArchLinux install [hostapd-rtl871xdrv]( +from AUR or just run: + +``` +yaourt -S hostapd-rtl871xdrv +``` + +If you're using any other distribution, run: + +``` +git clone +wget +tar zxvf hostapd-2.2.tar.gz +cd hostapd-2.2 +patch -p1 -i ../hostapd-rtl871xdrv/rtlxdrv.patch +cp ../hostapd-rtl871xdrv/driver_* src/drivers +cd hostapd +cp defconfig .config +echo CONFIG_DRIVER_RTW=y >> .config +make +make install +```