mirror of
https://github.com/jeelabs/esp-link.git
synced 2026-02-20 02:31:19 +01:00
add soft-ap channel option
fix for #345 and #453 Signed-off-by: Bartlomiej Zimon <uzi18@o2.pl>
This commit is contained in:
committed by
Thorsten von Eicken
parent
84fd0a3a58
commit
5995df787d
@@ -640,6 +640,17 @@ int ICACHE_FLASH_ATTR cgiApSettingsChange(HttpdConnData *connData) {
|
||||
apconf.ssid_hidden = 0;
|
||||
}
|
||||
}
|
||||
// Set channel to be hidden or not
|
||||
len=httpdFindArg(connData->getArgs, "ap_channel", buff, sizeof(buff));
|
||||
if(len>0){
|
||||
int value = atoi(buff);
|
||||
if(value >= 1 || value <= 13){
|
||||
apconf.channel = value;
|
||||
}else{
|
||||
// If out of range, set by default
|
||||
apconf.channel = 1;
|
||||
}
|
||||
}
|
||||
// Store new configuration
|
||||
wifi_softap_set_config(&apconf);
|
||||
|
||||
@@ -659,6 +670,7 @@ int ICACHE_FLASH_ATTR cgiApSettingsInfo(HttpdConnData *connData) {
|
||||
"\"ap_authmode\": %d, "
|
||||
"\"ap_maxconn\": %d, "
|
||||
"\"ap_beacon\": %d, "
|
||||
"\"ap_channel\": %d, "
|
||||
"\"ap_hidden\": \"%s\" "
|
||||
" }",
|
||||
apconf.ssid,
|
||||
@@ -666,6 +678,7 @@ int ICACHE_FLASH_ATTR cgiApSettingsInfo(HttpdConnData *connData) {
|
||||
apconf.authmode,
|
||||
apconf.max_connection,
|
||||
apconf.beacon_interval,
|
||||
apconf.channel,
|
||||
apconf.ssid_hidden ? "enabled" : "disabled"
|
||||
);
|
||||
|
||||
|
||||
@@ -69,6 +69,12 @@
|
||||
<div class="popup">Between 100 - 60000 ms ( default 100ms )</div>
|
||||
</div>
|
||||
|
||||
<div class="pure-form-stacked">
|
||||
<label>Soft-AP Channel</label>
|
||||
<input type="text" name="ap_channel" />
|
||||
<div class="popup">Between 1 - 13 ( default 1 )</div>
|
||||
</div>
|
||||
|
||||
<div class="form-horizontal">
|
||||
<label><input type="checkbox" name="ap_hidden" />Soft-AP SSID hidden</label>
|
||||
<div class="popup">Check this box to hide you Soft-AP SSID ( default Not Hidden )</div>
|
||||
|
||||
@@ -3,6 +3,7 @@ specials["ap_ssid"] = "SSID name";
|
||||
specials["ap_password"] = "PASSWORD";
|
||||
specials["ap_maxconn"] = "Max Connections number";
|
||||
specials["ap_beacon"] = "Beacon Interval";
|
||||
specials["ap_channel"] = "Channel";
|
||||
|
||||
function changeWifiMode(m) {
|
||||
blockScan = 1;
|
||||
|
||||
Reference in New Issue
Block a user