From fe06b87dc1e6871b62ea3e873a9d24e74937cd4b Mon Sep 17 00:00:00 2001 From: Ignatius Tremor Date: Sun, 24 Jan 2021 23:36:33 +0100 Subject: [PATCH] Fix for setting web AP channel (#1388) * Deleted wifi channel set without effect * When initializing wifi, use actual channel from settings instead of always using channel 1 --- esp8266_deauther/esp8266_deauther.ino | 5 +---- esp8266_deauther/wifi.cpp | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/esp8266_deauther/esp8266_deauther.ino b/esp8266_deauther/esp8266_deauther.ino index e3bbad3..fc506e5 100644 --- a/esp8266_deauther/esp8266_deauther.ino +++ b/esp8266_deauther/esp8266_deauther.ino @@ -125,9 +125,6 @@ void setup() { // create scan.json scan.setup(); - // set channel - setWifiChannel(settings::getWifiSettings().channel, true); - // dis/enable serial command interface if (settings::getCLISettings().enabled) { cli.enable(); @@ -196,4 +193,4 @@ void loop() { led::setMode(LED_MODE::IDLE); displayUI.mode = _mode; } -} \ No newline at end of file +} diff --git a/esp8266_deauther/wifi.cpp b/esp8266_deauther/wifi.cpp index 91d3282..fbcf034 100644 --- a/esp8266_deauther/wifi.cpp +++ b/esp8266_deauther/wifi.cpp @@ -192,7 +192,7 @@ namespace wifi { setPath("/web"); setSSID(settings::getAccessPointSettings().ssid); setPassword(settings::getAccessPointSettings().password); - setChannel(1); + setChannel(settings::getWifiSettings().channel); setHidden(settings::getAccessPointSettings().hidden); setCaptivePortal(settings::getWebSettings().captive_portal); @@ -462,4 +462,4 @@ namespace wifi { dns.processNextRequest(); } } -} \ No newline at end of file +}