diff --git a/ajax/networking/get_channel.php b/ajax/networking/get_channel.php new file mode 100644 index 00000000..5285a3c0 --- /dev/null +++ b/ajax/networking/get_channel.php @@ -0,0 +1,17 @@ +").attr("value", value).text(value)); + }); + channel_select.val(selected); + }); +} + +// Static Array method +Array.range = (start, end) => Array.from({length: (end - start)}, (v, k) => k + start); + $(document).on("click", ".js-toggle-password", function(e) { var button = $(e.target) var field = $(button.data("target")); diff --git a/config/config.php b/config/config.php index 046e36a2..f89c1746 100755 --- a/config/config.php +++ b/config/config.php @@ -22,6 +22,9 @@ define('RASPI_OPENVPN_SERVER_CONFIG', '/etc/openvpn/server/server.conf'); define('RASPI_TORPROXY_CONFIG', '/etc/tor/torrc'); define('RASPI_LIGHTTPD_CONFIG', '/etc/lighttpd/lighttpd.conf'); +// Constants for CRDA wireless regulatory domain +define('RASPI_5GHZ_ISO_ALPHA2', array('US')); + // Optional services, set to true to enable. define('RASPI_WIFICLIENT_ENABLED', true); define('RASPI_HOTSPOT_ENABLED', true); diff --git a/config/hostapd.conf b/config/hostapd.conf index eea43887..be164e30 100644 --- a/config/hostapd.conf +++ b/config/hostapd.conf @@ -9,8 +9,8 @@ channel=1 hw_mode=g wpa_passphrase=ChangeMe interface=wlan0 -wpa=1 -wpa_pairwise=TKIP +wpa=2 +wpa_pairwise=CCMP country_code= ## Rapberry Pi 3 specific to on board WLAN/WiFi #ieee80211n=1 # 802.11n support (Raspberry Pi 3) @@ -18,4 +18,5 @@ country_code= #ht_capab=[HT40][SHORT-GI-20][DSSS_CCK-40] # (Raspberry Pi 3) ## RaspAP wireless client AP mode -#interface=uap0 \ No newline at end of file +#interface=uap0 + diff --git a/config/wireless.json b/config/wireless.json new file mode 100644 index 00000000..f69d94f1 --- /dev/null +++ b/config/wireless.json @@ -0,0 +1,17 @@ +{"wireless_regdb": { + "debug": "off", + "2_4GHz_max11ch": { + "countries": [ "AG", "BS", "BB", "BZ", "CR", "CU", "DM", "DO", "SV", "GD", "GT", + "HT", "HN", "JM", "MX", "NI", "PA", "KN", "LC", "VC", "TT", "US", "CA", "UZ", "CO" ], + "channels": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ] + }, + "2_4GHz_max14ch": { + "countries": [ "JP" ], + "channels": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 ] + }, + "5Ghz_max48ch": { + "countries": [ "US" ], + "channels": [ 36, 40, 44, 48 ] + } +}} + diff --git a/includes/functions.php b/includes/functions.php index 1c4c5150..d43c7b89 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -142,19 +142,22 @@ function isAssoc($arr) /** * * Display a selector field for a form. Arguments are: -* $name: Field name -* $options: Array of options -* $selected: Selected option (optional) -* If $options is an associative array this should be the key -* +* @param string $name: Field name +* @param array $options: Array of options +* @param string $selected: Selected option (optional) +* @param string $id: $options is an associative array this should be the key +* @param string $event: onChange event (optional) +* @param string $disabled (optional) */ -function SelectorOptions($name, $options, $selected = null, $id = null) +function SelectorOptions($name, $options, $selected = null, $id = null, $event = null, $disabled = null) { echo ' -