Quick Start Guide For SoftAP
Quick Start Guide For SoftAP
Soft-AP mode
1
Version Date Change list Notes
V0.3 2020/11/24 Add VHT configuration of hostapd
V0.2 2019/09/18 Add Realtek proprietary ACS (Automatic Channel Selection)
V0.1 Initial version
P.S. If the driver uses CFG80211, there are several steps below need to do:
I. If the driver package is for single interface
1. Uncomment the definition “//#define
CONFIG_IOCTL_CFG80211” of the file “include/autoconf.h” to
“#define CONFIG_IOCTL_CFG80211”
2. If the Linux kernel version is greater than 3.2.0
(kernel>=3.2.0),user must uncomment the definition “//#define
RTW_USE_CFG80211_STA_EVENT” of file include/autoconf.h
to “#define RTW_USE_CFG80211_STA_EVENT”
II. If the driver package is for multiple interfaces
1. user should modify the definition in the
“autoconf_xxx_yyy_linux.h” file but not “include/autoconf.h”.
The “xxx” is IC type and the “yyy” is interface type. For example,
the IC type is RTL8192C and the interface type is USB, the file
name is “autoconf_rtl8192c_usb_linux.h”.
III. If the driver uses CFG80211 and the Linux kernel version >= 3.2.0, the
SOFTAP must use the
"wpa_supplicant_8_jb_4.2_rtw_zzzzz.20130821.tar.gz” or
“wpa_supplicant_8_kk_4.4_rtw_zzzzz.20140220.tar.gz" package. In
contrast, the SOFTAP should use
“wpa_supplicant_hostapd-0.8_rtw_zzzzz.20130812.tar.gz” package for
WEXT. The zzzz is version number. If the driver using CFG80211 but
kernel < 3.2.0, wpa_supplicant are not available in driver package so far,
and please contact us.
(3) insmod 8192cu.ko
2
(4) ifconfig wlan0 up
(5) ifconfig wlan0 192.168.0.1 (using the static ip for testing)
(6) Compile SOFTAP, unpack wpa_supplicant_hostapd-0.8_rtw_20120803.zip
in the folder (wpa_supplicant_hostapd-0.8\hostapd)
./make
(7) start hostapd daemon:
./hostapd rtl_hostapd.conf -B
# channel 1-14 is 2.4 GHz ; channel 36, 40, 44, 46, 48, 52, 56, 60,
# 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 149,
# 153, 157, 161 is 5GHz
# The channels that are available for use in a particular country differ
# according to the regulations of that country.
channel=6
3
(ii) security mode configuration
# This field is a bit field that can be used to enable WPA
# (IEEE 802.11i/D3.0)
# and/or WPA2 (full IEEE 802.11i/RSN):
# bit1 = IEEE 802.11i/RSN (WPA2) (dot11RSNAEnabled)
wpa=2
# wpa_passphrase=secret passphrase
wpa_passphrase=87654321
4
(iv) IEEE 802.11ac related configuration
# ieee80211ac: Whether IEEE 802.11ac (VHT) is enabled
# 0 = disabled (default)
# 1 = enabled
# Note: You will also need to enable WMM for full VHT functionality.
# Note: hw_mode=a is used to specify that 5 GHz band is used with
VHT.
ieee80211ac=1
For example:
VHT20
ieee80211ac=1
vht_oper_chwidth=0
VHT40
ieee80211ac=1
ht_capab=[HT40+]
vht_oper_chwidth=0
VHT80
ieee80211ac=1
ht_capab=[HT40+]
vht_oper_chwidth=1
vht_oper_centr_freq_seg0_idx=42
5
(v) Check the station connected to softap using hostapd_cli:
./hostapd_cli all_sta
Notes:
1. If your WLAN interface is not wlan0, please change it to your used interface.
(ex: wlan51)
2. If your driver IC is not RTL8192DU-VS, please change the rtl8192du to your
used IC. (e.g. rtl8192cu, rtl8188eu, etc.)
3. The result of “cat /proc/net/rtl…/wlan0/best_channel” has two parts. The first
part is received packet count at all supported channels during site survey.
Developers can use these statics to decide your own best channel. The second
part is the simple estimated best channels for 5G and 2.4G band for reference
only. HT40+ rule is used to estimate the best channel when the primary
channel is at 1, 6, 36, 44, etc., and the primary channel with minimum
received packet count is selected.
6
#define CONFIG_RTW_ACS
7
accept_mac_file=/etc/hostapd.accept
deny_mac_file=/etc/hostapd.deny