create_ap

create a nat-ed wifi ap
git clone git://git.2f30.org/create_ap
Log | Files | Refs | README | LICENSE

commit ef1a466a13227bc2a2efe331e6d5f690ead679ed
parent d556cd1fd2a7323a9253669bd6d631821f9c6c4e
Author: oblique <psyberbits@gmail.com>
Date:   Sat,  5 Apr 2014 12:47:06 +0300

Merge pull request #17 from oaix/master

add IEEE 802.11n support
Diffstat:
MREADME.md | 3+++
Mcreate_ap | 23++++++++++++++++++++++-
2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md @@ -2,6 +2,7 @@ * Create an AP (Access Point) at any channel. * Choose one of the following encryptions: WPA, WPA2, WPA/WPA2, Open (no encryption). * Hide your SSID. +* IEEE 802.11n support * Internet sharing methods: NATed or Bridged or None (no Internet sharing). * Choose the AP Gateway IP (only for 'NATed' and 'None' Internet sharing methods). * You can create an AP with the same interface you are getting your Internet connection. @@ -58,6 +59,8 @@ ### WPA + WPA2 passphrase using pipe: echo -e "MyAccessPoint\nMyPassPhrase" | create_ap wlan0 eth0 +### Enable IEEE 802.11n + create_ap --ieee80211n --ht_capab '[HT40+]' wlan0 eth0 MyAccessPoint MyPassPhrase ## Systemd service Using the persistent [systemd](https://wiki.archlinux.org/index.php/systemd#Basic_systemctl_usage) service diff --git a/create_ap b/create_ap @@ -30,6 +30,8 @@ usage() { echo " 'bridge' for bridging" echo " 'none' for no Internet sharing (equivalent to -n)" echo " --hidden Make the Access Point hidden (do not broadcast the SSID)" + echo " --ieee80211n Enable IEEE 802.11n (HT)" + echo " --ht_capab <HT> HT capabilities (default: [HT40+])" echo " --driver Choose your WiFi adapter driver (default: nl80211)" echo " --no-virt Do not create virtual interface" echo @@ -126,6 +128,8 @@ WPA_VERSION=1+2 ETC_HOSTS=0 HIDDEN=0 SHARE_METHOD=nat +IEEE80211N=0 +HT_CAPAB='[HT40+]' DRIVER=nl80211 NO_VIRT=0 @@ -192,7 +196,7 @@ die() { # if the user press ctrl+c then execute die() trap "die" SIGINT -ARGS=$(getopt -o hc:w:g:dnm: -l "help","hidden","driver:","no-virt" -n $(basename $0) -- "$@") +ARGS=$(getopt -o hc:w:g:dnm: -l "help","hidden","ieee80211n","ht_capab:","driver:","no-virt" -n $(basename $0) -- "$@") [[ $? -ne 0 ]] && exit 1 eval set -- "$ARGS" @@ -234,6 +238,15 @@ while :; do SHARE_METHOD="$1" shift ;; + --ieee80211n) + shift + IEEE80211N=1 + ;; + --ht_capab) + shift + HT_CAPAB="$1" + shift + ;; --driver) shift DRIVER="$1" @@ -376,6 +389,14 @@ ctrl_interface_group=0 ignore_broadcast_ssid=$HIDDEN EOF +if [[ $IEEE80211N -eq 1 ]]; then + cat << EOF >> $CONFDIR/hostapd.conf +ieee80211n=1 +wmm_enabled=1 +ht_capab=${HT_CAPAB} +EOF +fi + if [[ -n "$PASSPHRASE" ]]; then [[ "$WPA_VERSION" == "1+2" || "$WPA_VERSION" == "2+1" ]] && WPA_VERSION=3 cat << EOF >> $CONFDIR/hostapd.conf