Skip to content
This repository has been archived by the owner on Sep 30, 2021. It is now read-only.

add option to set AP's beacon interval #436

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions create_ap
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ usage() {
echo " --ieee80211ac Enable IEEE 802.11ac (VHT)"
echo " --ht_capab <HT> HT capabilities (default: [HT40+])"
echo " --vht_capab <VHT> VHT capabilities"
echo " --beacon-interval <ms> Set beacon interval in milliseconds (default 100)"
echo " --dtim-period <num> Set DTIM period in numbers of beacons (default 2)"
echo " --country <code> Set two-letter country code for regularity (example: US)"
echo " --freq-band <GHz> Set frequency band. Valid inputs: 2.4, 5 (default: 2.4)"
echo " --driver Choose your WiFi adapter driver (default: nl80211)"
Expand Down Expand Up @@ -639,6 +641,8 @@ DRIVER=nl80211
NO_VIRT=0
COUNTRY=
FREQ_BAND=2.4
BEACON_INTERVAL=100
DTIM_PERIOD=2
NEW_MACADDR=
DAEMONIZE=0
DAEMON_PIDFILE=
Expand All @@ -652,7 +656,7 @@ REDIRECT_TO_LOCALHOST=0
CONFIG_OPTS=(CHANNEL GATEWAY WPA_VERSION ETC_HOSTS DHCP_DNS NO_DNS NO_DNSMASQ HIDDEN MAC_FILTER MAC_FILTER_ACCEPT ISOLATE_CLIENTS
SHARE_METHOD IEEE80211N IEEE80211AC HT_CAPAB VHT_CAPAB DRIVER NO_VIRT COUNTRY FREQ_BAND
NEW_MACADDR DAEMONIZE DAEMON_PIDFILE DAEMON_LOGFILE NO_HAVEGED WIFI_IFACE INTERNET_IFACE
SSID PASSPHRASE USE_PSK)
SSID PASSPHRASE USE_PSK BEACON_INTERVAL DTIM_PERIOD)

FIX_UNMANAGED=0
LIST_RUNNING=0
Expand Down Expand Up @@ -1631,7 +1635,6 @@ fi

# hostapd config
cat << EOF > $CONFDIR/hostapd.conf
beacon_int=100
ssid=${SSID}
interface=${WIFI_IFACE}
driver=${DRIVER}
Expand All @@ -1640,6 +1643,8 @@ ctrl_interface=$CONFDIR/hostapd_ctrl
ctrl_interface_group=0
ignore_broadcast_ssid=$HIDDEN
ap_isolate=$ISOLATE_CLIENTS
beacon_int=${BEACON_INTERVAL}
dtim_period=${DTIM_PERIOD}
EOF

if [[ -n "$COUNTRY" ]]; then
Expand Down
2 changes: 2 additions & 0 deletions create_ap.conf
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ INTERNET_IFACE=eth0
SSID=MyAccessPoint
PASSPHRASE=12345678
USE_PSK=0
BEACON_INTERVAL=100
DTIM_INTERVAL=2