Merge pull request #362 from Catty2014/master

Add 802.11ax(wifi6) ability
This commit is contained in:
Lakindu Akash 2023-12-31 02:51:13 +05:30 committed by GitHub
commit d73242ab81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 265 additions and 193 deletions

View File

@ -24,7 +24,7 @@
* Customise wifi Channel, Change MAC address, etc. * Customise wifi Channel, Change MAC address, etc.
* Hide SSID * Hide SSID
* customize gateway IP address * customize gateway IP address
* Enable IEEE 80211n, IEEE 80211ac modes * Enable IEEE 80211n, IEEE 80211ac and IEEE 80211ax modes
![screenshot](docs/sc4.png) ![screenshot](docs/sc4.png)

View File

@ -70,6 +70,12 @@ _create_ap() {
--ieee80211n) --ieee80211n)
# No Options # No Options
;; ;;
--ieee80211ac)
# No Options
;;
--ieee80211ax)
# No Options
;;
--ht_capab) --ht_capab)
# Refer http://w1.fi/cgit/hostap/plain/hostapd/hostapd.conf # Refer http://w1.fi/cgit/hostap/plain/hostapd/hostapd.conf
opts=' opts='

View File

@ -14,7 +14,7 @@
# dnsmasq # dnsmasq
# iptables # iptables
VERSION=0.4.7 VERSION=0.4.8
PROGNAME="$(basename $0)" PROGNAME="$(basename $0)"
# make sure that all command outputs are in english # make sure that all command outputs are in english
@ -50,6 +50,7 @@ usage() {
echo " --isolate-clients Disable communication between clients" echo " --isolate-clients Disable communication between clients"
echo " --ieee80211n Enable IEEE 802.11n (HT)" echo " --ieee80211n Enable IEEE 802.11n (HT)"
echo " --ieee80211ac Enable IEEE 802.11ac (VHT)" echo " --ieee80211ac Enable IEEE 802.11ac (VHT)"
echo " --ieee80211ax Enable IEEE 802.11ax (VHT)"
echo " --ht_capab <HT> HT capabilities (default: [HT40+])" echo " --ht_capab <HT> HT capabilities (default: [HT40+])"
echo " --vht_capab <VHT> VHT capabilities" echo " --vht_capab <VHT> VHT capabilities"
echo " --country <code> Set two-letter country code for regularity (example: US)" echo " --country <code> Set two-letter country code for regularity (example: US)"
@ -649,6 +650,7 @@ ISOLATE_CLIENTS=0
SHARE_METHOD=nat SHARE_METHOD=nat
IEEE80211N=0 IEEE80211N=0
IEEE80211AC=0 IEEE80211AC=0
IEEE80211AX=0
HT_CAPAB='[HT40+]' HT_CAPAB='[HT40+]'
VHT_CAPAB= VHT_CAPAB=
DRIVER=nl80211 DRIVER=nl80211
@ -666,7 +668,7 @@ HOSTAPD_DEBUG_ARGS=
REDIRECT_TO_LOCALHOST=0 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 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 SHARE_METHOD IEEE80211N IEEE80211AC IEEE80211AX HT_CAPAB VHT_CAPAB DRIVER NO_VIRT COUNTRY FREQ_BAND
NEW_MACADDR DAEMONIZE DAEMON_PIDFILE DAEMON_LOGFILE NO_HAVEGED WIFI_IFACE INTERNET_IFACE NEW_MACADDR DAEMONIZE DAEMON_PIDFILE DAEMON_LOGFILE NO_HAVEGED WIFI_IFACE INTERNET_IFACE
SSID PASSPHRASE USE_PSK ADDN_HOSTS) SSID PASSPHRASE USE_PSK ADDN_HOSTS)
@ -1070,7 +1072,7 @@ for ((i=0; i<$#; i++)); do
fi fi
done done
GETOPT_ARGS=$(getopt -o hc:w:g:de:nm: -l "help","hidden","hostapd-debug:","hostapd-timestamps","redirect-to-localhost","mac-filter","mac-filter-accept:","isolate-clients","ieee80211n","ieee80211ac","ht_capab:","vht_capab:","driver:","no-virt","fix-unmanaged","country:","freq-band:","mac:","dhcp-dns:","daemon","pidfile:","logfile:","stop:","list","list-running","list-clients:","version","psk","no-haveged","no-dns","no-dnsmasq","mkconfig:","config:" -n "$PROGNAME" -- "$@") GETOPT_ARGS=$(getopt -o hc:w:g:de:nm: -l "help","hidden","hostapd-debug:","hostapd-timestamps","redirect-to-localhost","mac-filter","mac-filter-accept:","isolate-clients","ieee80211n","ieee80211ac","ieee80211ax","ht_capab:","vht_capab:","driver:","no-virt","fix-unmanaged","country:","freq-band:","mac:","dhcp-dns:","daemon","pidfile:","logfile:","stop:","list","list-running","list-clients:","version","psk","no-haveged","no-dns","no-dnsmasq","mkconfig:","config:" -n "$PROGNAME" -- "$@")
[[ $? -ne 0 ]] && exit 1 [[ $? -ne 0 ]] && exit 1
eval set -- "$GETOPT_ARGS" eval set -- "$GETOPT_ARGS"
@ -1143,6 +1145,10 @@ while :; do
shift shift
IEEE80211AC=1 IEEE80211AC=1
;; ;;
--ieee80211ax)
shift
IEEE80211AX=1
;;
--ht_capab) --ht_capab)
shift shift
HT_CAPAB="$1" HT_CAPAB="$1"
@ -1711,6 +1717,10 @@ if [[ $IEEE80211AC -eq 1 ]]; then
echo "ieee80211ac=1" >> $CONFDIR/hostapd.conf echo "ieee80211ac=1" >> $CONFDIR/hostapd.conf
fi fi
if [[ $IEEE80211AX -eq 1 ]]; then
echo "ieee80211ax=1" >> $CONFDIR/hostapd.conf
fi
if [[ -n "$VHT_CAPAB" ]]; then if [[ -n "$VHT_CAPAB" ]]; then
echo "vht_capab=${VHT_CAPAB}" >> $CONFDIR/hostapd.conf echo "vht_capab=${VHT_CAPAB}" >> $CONFDIR/hostapd.conf
fi fi

View File

@ -12,6 +12,7 @@ ISOLATE_CLIENTS=0
SHARE_METHOD=nat SHARE_METHOD=nat
IEEE80211N=0 IEEE80211N=0
IEEE80211AC=0 IEEE80211AC=0
IEEE80211AX=0
HT_CAPAB=[HT40+] HT_CAPAB=[HT40+]
VHT_CAPAB= VHT_CAPAB=
DRIVER=nl80211 DRIVER=nl80211

View File

@ -1,34 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.2 --> <!-- Generated with glade 3.40.0 -->
<interface> <interface>
<requires lib="gtk+" version="3.20"/> <requires lib="gtk+" version="3.20"/>
<object class="GtkApplicationWindow" id="window"> <object class="GtkApplicationWindow" id="window">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="title" translatable="yes">Wi Hotspot</property> <property name="title" translatable="yes">Wi Hotspot</property>
<child type="titlebar">
<placeholder/>
</child>
<child> <child>
<object class="GtkBox"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="margin_left">5</property> <property name="margin-left">5</property>
<property name="margin_right">10</property> <property name="margin-right">10</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<property name="spacing">5</property> <property name="spacing">5</property>
<child> <child>
<object class="GtkBox"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="spacing">3</property> <property name="spacing">3</property>
<property name="homogeneous">True</property> <property name="homogeneous">True</property>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="halign">start</property> <property name="halign">start</property>
<property name="margin_left">10</property> <property name="margin-left">10</property>
<property name="label" translatable="yes">SSID</property> <property name="label" translatable="yes">SSID</property>
</object> </object>
<packing> <packing>
@ -41,7 +38,7 @@
<child> <child>
<object class="GtkEntry" id="entry_ssid"> <object class="GtkEntry" id="entry_ssid">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -53,13 +50,13 @@
<child> <child>
<object class="GtkBox"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="margin_left">20</property> <property name="margin-left">20</property>
<property name="spacing">10</property> <property name="spacing">10</property>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Password</property> <property name="label" translatable="yes">Password</property>
</object> </object>
<packing> <packing>
@ -72,11 +69,11 @@
<object class="GtkCheckButton" id="cb_open"> <object class="GtkCheckButton" id="cb_open">
<property name="label" translatable="yes">Open</property> <property name="label" translatable="yes">Open</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="receives_default">False</property> <property name="receives-default">False</property>
<property name="halign">start</property> <property name="halign">start</property>
<property name="margin_left">10</property> <property name="margin-left">10</property>
<property name="draw_indicator">True</property> <property name="draw-indicator">True</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -94,7 +91,7 @@
<child> <child>
<object class="GtkEntry" id="entry_pass"> <object class="GtkEntry" id="entry_pass">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -114,14 +111,14 @@
<child> <child>
<object class="GtkBox"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="homogeneous">True</property> <property name="homogeneous">True</property>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="halign">start</property> <property name="halign">start</property>
<property name="margin_left">10</property> <property name="margin-left">10</property>
<property name="label" translatable="yes">Wifi interface</property> <property name="label" translatable="yes">Wifi interface</property>
</object> </object>
<packing> <packing>
@ -134,7 +131,7 @@
<child> <child>
<object class="GtkComboBoxText" id="combo_wifi"> <object class="GtkComboBoxText" id="combo_wifi">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -146,9 +143,9 @@
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="halign">start</property> <property name="halign">start</property>
<property name="margin_left">20</property> <property name="margin-left">20</property>
<property name="label" translatable="yes">Internet interface</property> <property name="label" translatable="yes">Internet interface</property>
</object> </object>
<packing> <packing>
@ -161,7 +158,7 @@
<child> <child>
<object class="GtkComboBoxText" id="combo_internet"> <object class="GtkComboBoxText" id="combo_internet">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -181,7 +178,7 @@
<child> <child>
<object class="GtkSeparator"> <object class="GtkSeparator">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -192,224 +189,225 @@
<child> <child>
<object class="GtkExpander"> <object class="GtkExpander">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="label_fill">True</property> <property name="label-fill">True</property>
<property name="resize_toplevel">True</property> <property name="resize-toplevel">True</property>
<child> <child>
<object class="GtkScrolledWindow"> <object class="GtkScrolledWindow">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="hscrollbar_policy">never</property> <property name="hscrollbar-policy">never</property>
<property name="shadow_type">in</property> <property name="shadow-type">in</property>
<property name="min_content_height">160</property> <property name="min-content-height">160</property>
<property name="propagate_natural_height">True</property> <property name="propagate-natural-height">True</property>
<child> <child>
<object class="GtkViewport"> <object class="GtkViewport">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<child> <child>
<object class="GtkBox"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<child> <child>
<!-- n-columns=4 n-rows=11 -->
<object class="GtkGrid"> <object class="GtkGrid">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="margin_top">10</property> <property name="margin-top">10</property>
<property name="margin_bottom">5</property> <property name="margin-bottom">5</property>
<property name="row_spacing">10</property> <property name="row-spacing">10</property>
<property name="column_homogeneous">True</property> <property name="column-homogeneous">True</property>
<child> <child>
<object class="GtkRadioButton" id="rb_freq_2"> <object class="GtkRadioButton" id="rb_freq_2">
<property name="label" translatable="yes">2.4Ghz</property> <property name="label" translatable="yes">2.4Ghz</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="receives_default">False</property> <property name="receives-default">False</property>
<property name="draw_indicator">True</property> <property name="draw-indicator">True</property>
<property name="group">rb_freq_auto</property> <property name="group">rb_freq_auto</property>
</object> </object>
<packing> <packing>
<property name="left_attach">2</property> <property name="left-attach">2</property>
<property name="top_attach">0</property> <property name="top-attach">0</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkRadioButton" id="rb_freq_auto"> <object class="GtkRadioButton" id="rb_freq_auto">
<property name="label" translatable="yes">Auto</property> <property name="label" translatable="yes">Auto</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="receives_default">False</property> <property name="receives-default">False</property>
<property name="draw_indicator">True</property> <property name="draw-indicator">True</property>
<property name="group">rb_freq_5</property> <property name="group">rb_freq_5</property>
</object> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="left-attach">1</property>
<property name="top_attach">0</property> <property name="top-attach">0</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="halign">start</property> <property name="halign">start</property>
<property name="label" translatable="yes">Frequency band</property> <property name="label" translatable="yes">Frequency band</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left-attach">0</property>
<property name="top_attach">0</property> <property name="top-attach">0</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkRadioButton" id="rb_freq_5"> <object class="GtkRadioButton" id="rb_freq_5">
<property name="label" translatable="yes">5Ghz</property> <property name="label" translatable="yes">5Ghz</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="receives_default">False</property> <property name="receives-default">False</property>
<property name="draw_indicator">True</property> <property name="draw-indicator">True</property>
<property name="group">rb_freq_auto</property> <property name="group">rb_freq_auto</property>
</object> </object>
<packing> <packing>
<property name="left_attach">3</property> <property name="left-attach">3</property>
<property name="top_attach">0</property> <property name="top-attach">0</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkCheckButton" id="cb_hidden"> <object class="GtkCheckButton" id="cb_hidden">
<property name="label" translatable="yes">Hidden</property> <property name="label" translatable="yes">Hidden</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="receives_default">False</property> <property name="receives-default">False</property>
<property name="draw_indicator">True</property> <property name="draw-indicator">True</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left-attach">0</property>
<property name="top_attach">1</property> <property name="top-attach">1</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkCheckButton" id="cb_psk"> <object class="GtkCheckButton" id="cb_psk">
<property name="label" translatable="yes">Use psk</property> <property name="label" translatable="yes">Use psk</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="receives_default">False</property> <property name="receives-default">False</property>
<property name="draw_indicator">True</property> <property name="draw-indicator">True</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left-attach">0</property>
<property name="top_attach">2</property> <property name="top-attach">2</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkCheckButton" id="cb_mac"> <object class="GtkCheckButton" id="cb_mac">
<property name="label" translatable="yes">Set MAC</property> <property name="label" translatable="yes">Set MAC</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="receives_default">False</property> <property name="receives-default">False</property>
<property name="draw_indicator">True</property> <property name="draw-indicator">True</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left-attach">0</property>
<property name="top_attach">3</property> <property name="top-attach">3</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkEntry" id="entry_mac"> <object class="GtkEntry" id="entry_mac">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="halign">start</property> <property name="halign">start</property>
</object> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="left-attach">1</property>
<property name="top_attach">3</property> <property name="top-attach">3</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkCheckButton" id="cb_novirt"> <object class="GtkCheckButton" id="cb_novirt">
<property name="label" translatable="yes">No Virt</property> <property name="label" translatable="yes">No Virt</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="receives_default">False</property> <property name="receives-default">False</property>
<property name="tooltip_text" translatable="yes">Do not create virtual interface</property> <property name="tooltip-text" translatable="yes">Do not create virtual interface</property>
<property name="draw_indicator">True</property> <property name="draw-indicator">True</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left-attach">0</property>
<property name="top_attach">4</property> <property name="top-attach">4</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkCheckButton" id="cb_channel"> <object class="GtkCheckButton" id="cb_channel">
<property name="label" translatable="yes">Channel</property> <property name="label" translatable="yes">Channel</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="receives_default">False</property> <property name="receives-default">False</property>
<property name="draw_indicator">True</property> <property name="draw-indicator">True</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left-attach">0</property>
<property name="top_attach">5</property> <property name="top-attach">5</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkEntry" id="entry_channel"> <object class="GtkEntry" id="entry_channel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="halign">start</property> <property name="halign">start</property>
</object> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="left-attach">1</property>
<property name="top_attach">5</property> <property name="top-attach">5</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkCheckButton" id="cb_gateway"> <object class="GtkCheckButton" id="cb_gateway">
<property name="label" translatable="yes">Gateway</property> <property name="label" translatable="yes">Gateway</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="receives_default">False</property> <property name="receives-default">False</property>
<property name="draw_indicator">True</property> <property name="draw-indicator">True</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left-attach">0</property>
<property name="top_attach">6</property> <property name="top-attach">6</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkEntry" id="entry_gateway"> <object class="GtkEntry" id="entry_gateway">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="halign">start</property> <property name="halign">start</property>
</object> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="left-attach">1</property>
<property name="top_attach">6</property> <property name="top-attach">6</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkCheckButton" id="cb_mac_filter"> <object class="GtkCheckButton" id="cb_mac_filter">
<property name="label" translatable="yes">Mac Filter</property> <property name="label" translatable="yes">Mac Filter</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="receives_default">False</property> <property name="receives-default">False</property>
<property name="draw_indicator">True</property> <property name="draw-indicator">True</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left-attach">0</property>
<property name="top_attach">7</property> <property name="top-attach">7</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkTextView" id="tv_mac_filter"> <object class="GtkTextView" id="tv_mac_filter">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="accepts_tab">False</property> <property name="accepts-tab">False</property>
<property name="input_hints">GTK_INPUT_HINT_UPPERCASE_CHARS | GTK_INPUT_HINT_NONE</property> <property name="input-hints">GTK_INPUT_HINT_UPPERCASE_CHARS | GTK_INPUT_HINT_NONE</property>
<property name="monospace">True</property> <property name="monospace">True</property>
</object> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="left-attach">1</property>
<property name="top_attach">7</property> <property name="top-attach">7</property>
<property name="height">2</property> <property name="height">2</property>
</packing> </packing>
</child> </child>
@ -417,43 +415,53 @@
<object class="GtkCheckButton" id="cb_ieee80211n"> <object class="GtkCheckButton" id="cb_ieee80211n">
<property name="label" translatable="yes">IEEE80211n</property> <property name="label" translatable="yes">IEEE80211n</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="receives_default">False</property> <property name="receives-default">False</property>
<property name="draw_indicator">True</property> <property name="draw-indicator">True</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left-attach">0</property>
<property name="top_attach">9</property> <property name="top-attach">9</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="cb_ieee80211ac">
<property name="label" translatable="yes">IEEE80211ac</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">9</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkCheckButton" id="cb_no_haveged"> <object class="GtkCheckButton" id="cb_no_haveged">
<property name="label">No Haveged</property> <property name="label">No Haveged</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="receives_default">False</property> <property name="receives-default">False</property>
<property name="draw_indicator">True</property> <property name="draw-indicator">True</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left-attach">0</property>
<property name="top_attach">10</property> <property name="top-attach">10</property>
</packing> </packing>
</child> </child>
<child> <child>
<placeholder/> <object class="GtkCheckButton" id="cb_ieee80211ac">
<property name="label" translatable="yes">IEEE80211ac</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">9</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="cb_ieee80211ax">
<property name="label" translatable="yes">IEEE80211ax</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">9</property>
</packing>
</child> </child>
<child> <child>
<placeholder/> <placeholder/>
@ -543,7 +551,7 @@
<child type="label"> <child type="label">
<object class="GtkLabel"> <object class="GtkLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Advanced</property> <property name="label" translatable="yes">Advanced</property>
</object> </object>
</child> </child>
@ -557,71 +565,96 @@
<child> <child>
<object class="GtkExpander"> <object class="GtkExpander">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<child> <child>
<object class="GtkScrolledWindow"> <object class="GtkScrolledWindow">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="shadow_type">in</property> <property name="shadow-type">in</property>
<property name="min_content_height">100</property> <property name="min-content-height">100</property>
<child> <child>
<object class="GtkViewport"> <object class="GtkViewport">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<child> <child>
<object class="GtkBox"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<child> <child>
<!-- n-columns=4 n-rows=3 -->
<object class="GtkGrid"> <object class="GtkGrid">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="column_homogeneous">True</property> <property name="column-homogeneous">True</property>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Number</property> <property name="label" translatable="yes">Number</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left-attach">0</property>
<property name="top_attach">0</property> <property name="top-attach">0</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Hostname</property> <property name="label" translatable="yes">Hostname</property>
</object> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="left-attach">1</property>
<property name="top_attach">0</property> <property name="top-attach">0</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">IP</property> <property name="label" translatable="yes">IP</property>
</object> </object>
<packing> <packing>
<property name="left_attach">2</property> <property name="left-attach">2</property>
<property name="top_attach">0</property> <property name="top-attach">0</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">MAC</property> <property name="label" translatable="yes">MAC</property>
</object> </object>
<packing> <packing>
<property name="left_attach">3</property> <property name="left-attach">3</property>
<property name="top_attach">0</property> <property name="top-attach">0</property>
</packing> </packing>
</child> </child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -630,12 +663,13 @@
</packing> </packing>
</child> </child>
<child> <child>
<!-- n-columns=3 n-rows=3 -->
<object class="GtkGrid" id="grid_devices"> <object class="GtkGrid" id="grid_devices">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="row_homogeneous">True</property> <property name="row-homogeneous">True</property>
<property name="column_homogeneous">True</property> <property name="column-homogeneous">True</property>
<property name="baseline_row">1</property> <property name="baseline-row">1</property>
<child> <child>
<placeholder/> <placeholder/>
</child> </child>
@ -674,13 +708,13 @@
<object class="GtkButton" id="button_refresh"> <object class="GtkButton" id="button_refresh">
<property name="label" translatable="yes">Refresh</property> <property name="label" translatable="yes">Refresh</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="receives_default">True</property> <property name="receives-default">True</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="pack_type">end</property> <property name="pack-type">end</property>
<property name="position">2</property> <property name="position">2</property>
</packing> </packing>
</child> </child>
@ -693,7 +727,7 @@
<child type="label"> <child type="label">
<object class="GtkLabel"> <object class="GtkLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Connected devices</property> <property name="label" translatable="yes">Connected devices</property>
</object> </object>
</child> </child>
@ -707,14 +741,14 @@
<child> <child>
<object class="GtkBox"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="halign">end</property> <property name="halign">end</property>
<child> <child>
<object class="GtkButton" id="button_about"> <object class="GtkButton" id="button_about">
<property name="label" translatable="yes">About</property> <property name="label" translatable="yes">About</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="receives_default">True</property> <property name="receives-default">True</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -727,8 +761,8 @@
<object class="GtkButton" id="button_qr"> <object class="GtkButton" id="button_qr">
<property name="label" translatable="yes">Open QR</property> <property name="label" translatable="yes">Open QR</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="receives_default">True</property> <property name="receives-default">True</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -740,15 +774,15 @@
<object class="GtkButton" id="button_create_hp"> <object class="GtkButton" id="button_create_hp">
<property name="label" translatable="yes">Create hotspot</property> <property name="label" translatable="yes">Create hotspot</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="receives_default">True</property> <property name="receives-default">True</property>
<property name="halign">end</property> <property name="halign">end</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="padding">10</property> <property name="padding">10</property>
<property name="pack_type">end</property> <property name="pack-type">end</property>
<property name="position">2</property> <property name="position">2</property>
</packing> </packing>
</child> </child>
@ -756,8 +790,8 @@
<object class="GtkButton" id="button_stop_hp"> <object class="GtkButton" id="button_stop_hp">
<property name="label" translatable="yes">Stop</property> <property name="label" translatable="yes">Stop</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="receives_default">True</property> <property name="receives-default">True</property>
<property name="halign">end</property> <property name="halign">end</property>
</object> </object>
<packing> <packing>
@ -778,12 +812,12 @@
<child> <child>
<object class="GtkProgressBar" id="progress_bar"> <object class="GtkProgressBar" id="progress_bar">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="margin_left">10</property> <property name="margin-left">10</property>
<property name="margin_right">10</property> <property name="margin-right">10</property>
<property name="margin_top">1</property> <property name="margin-top">1</property>
<property name="margin_bottom">1</property> <property name="margin-bottom">1</property>
<property name="pulse_step">0.20000000000000001</property> <property name="pulse-step">0.20</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -794,7 +828,7 @@
<child> <child>
<object class="GtkSeparator"> <object class="GtkSeparator">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -805,17 +839,17 @@
<child> <child>
<object class="GtkBox"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="margin_bottom">5</property> <property name="margin-bottom">5</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<child> <child>
<object class="GtkLabel" id="label_status"> <object class="GtkLabel" id="label_status">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="halign">start</property> <property name="halign">start</property>
<property name="margin_left">5</property> <property name="margin-left">5</property>
<property name="margin_top">1</property> <property name="margin-top">1</property>
<property name="margin_bottom">1</property> <property name="margin-bottom">1</property>
<property name="label" translatable="yes">Running status</property> <property name="label" translatable="yes">Running status</property>
</object> </object>
<packing> <packing>
@ -827,7 +861,7 @@
<child> <child>
<object class="GtkLabel" id="label_input_error"> <object class="GtkLabel" id="label_input_error">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="halign">center</property> <property name="halign">center</property>
</object> </object>
<packing> <packing>
@ -840,7 +874,7 @@
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="pack_type">end</property> <property name="pack-type">end</property>
<property name="position">8</property> <property name="position">8</property>
</packing> </packing>
</child> </child>

View File

@ -136,6 +136,10 @@ const char *build_wh_mkconfig_command(ConfigValues* cv){
strcat(cmd_mkconfig," --ieee80211ac "); strcat(cmd_mkconfig," --ieee80211ac ");
} }
if(cv->ieee80211ax!=NULL && (strcmp(cv->ieee80211ax,"1") == 0)){
strcat(cmd_mkconfig," --ieee80211ax ");
}
if(cv->mac!=NULL) { if(cv->mac!=NULL) {
strcat(cmd_mkconfig, " --mac "); strcat(cmd_mkconfig, " --mac ");
strcat(cmd_mkconfig, cv->mac); strcat(cmd_mkconfig, cv->mac);

View File

@ -134,6 +134,9 @@ static void setConfigValues(const char * key, char *value){
if( !strcmp ( IEEE80211AC, key )) if( !strcmp ( IEEE80211AC, key ))
configValues.ieee80211ac = value; configValues.ieee80211ac = value;
if( !strcmp ( IEEE80211AX, key ))
configValues.ieee80211ax = value;
if( !strcmp ( GATEWAY, key )) if( !strcmp ( GATEWAY, key ))
configValues.gateway = value; configValues.gateway = value;

View File

@ -52,6 +52,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define SHARE_METHOD "SHARE_METHOD" #define SHARE_METHOD "SHARE_METHOD"
#define IEEE80211N "IEEE80211N" #define IEEE80211N "IEEE80211N"
#define IEEE80211AC "IEEE80211AC" #define IEEE80211AC "IEEE80211AC"
#define IEEE80211AX "IEEE80211AX"
#define HT_CAPAB "HT_CAPAB" #define HT_CAPAB "HT_CAPAB"
#define VHT_CAPAB "VHT_CAPAB" #define VHT_CAPAB "VHT_CAPAB"
#define DRIVER "DRIVER" #define DRIVER "DRIVER"
@ -91,6 +92,7 @@ typedef struct{
char *accepted_macs; char *accepted_macs;
char *ieee80211n; char *ieee80211n;
char *ieee80211ac; char *ieee80211ac;
char *ieee80211ax;
char *no_haveged; char *no_haveged;
char *gateway; char *gateway;
} ConfigValues; } ConfigValues;

View File

@ -98,6 +98,7 @@ GtkCheckButton *cb_open;
GtkCheckButton *cb_mac_filter; GtkCheckButton *cb_mac_filter;
GtkCheckButton *cb_ieee80211n; GtkCheckButton *cb_ieee80211n;
GtkCheckButton *cb_ieee80211ac; GtkCheckButton *cb_ieee80211ac;
GtkCheckButton *cb_ieee80211ax;
GtkProgressBar *progress_bar; GtkProgressBar *progress_bar;
@ -440,6 +441,7 @@ int initUi(int argc, char *argv[]){
cb_mac_filter = (GtkCheckButton *) gtk_builder_get_object(builder, "cb_mac_filter"); cb_mac_filter = (GtkCheckButton *) gtk_builder_get_object(builder, "cb_mac_filter");
cb_ieee80211n = (GtkCheckButton *) gtk_builder_get_object(builder, "cb_ieee80211n"); cb_ieee80211n = (GtkCheckButton *) gtk_builder_get_object(builder, "cb_ieee80211n");
cb_ieee80211ac= (GtkCheckButton *) gtk_builder_get_object(builder, "cb_ieee80211ac"); cb_ieee80211ac= (GtkCheckButton *) gtk_builder_get_object(builder, "cb_ieee80211ac");
cb_ieee80211ax= (GtkCheckButton *) gtk_builder_get_object(builder, "cb_ieee80211ax");
rb_freq_auto = (GtkRadioButton *) gtk_builder_get_object(builder, "rb_freq_auto"); rb_freq_auto = (GtkRadioButton *) gtk_builder_get_object(builder, "rb_freq_auto");
rb_freq_2 = (GtkRadioButton *) gtk_builder_get_object(builder, "rb_freq_2"); rb_freq_2 = (GtkRadioButton *) gtk_builder_get_object(builder, "rb_freq_2");
@ -557,6 +559,11 @@ void init_ui_from_config(){
gtk_toggle_button_set_active((GtkToggleButton*) cb_ieee80211ac,TRUE); gtk_toggle_button_set_active((GtkToggleButton*) cb_ieee80211ac,TRUE);
} }
if(strcmp(values->ieee80211ax,"1")==0){
gtk_toggle_button_set_active((GtkToggleButton*) cb_ieee80211ax,TRUE);
}
if(strcmp(values->channel,"")!=0 && strcmp(values->channel,"default")!=0){ if(strcmp(values->channel,"")!=0 && strcmp(values->channel,"default")!=0){
gtk_toggle_button_set_active((GtkToggleButton*) cb_channel,TRUE); gtk_toggle_button_set_active((GtkToggleButton*) cb_channel,TRUE);
gtk_entry_set_text(entry_channel,values->channel); gtk_entry_set_text(entry_channel,values->channel);
@ -943,6 +950,11 @@ static int init_config_val_input(ConfigValues* cv){
else else
cv->ieee80211ac =NULL; cv->ieee80211ac =NULL;
if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(cb_ieee80211ax)))
cv->ieee80211ax = "1";
else
cv->ieee80211ax =NULL;
if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(cb_mac_filter))){ if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(cb_mac_filter))){
cv->mac_filter = "1"; cv->mac_filter = "1";