diff --git a/esp8266_deauther/SerialInterface.cpp b/esp8266_deauther/SerialInterface.cpp index a6ec46c..4dbaa3a 100644 --- a/esp8266_deauther/SerialInterface.cpp +++ b/esp8266_deauther/SerialInterface.cpp @@ -686,11 +686,11 @@ void SerialInterface::runCommand(String input) { uint8_t mac[6]; prnt(CLI_SYSTEM_AP_MAC); - wifi_get_macaddr(0x01, mac); + wifi_get_macaddr(SOFTAP_IF, mac); prntln(macToStr(mac)); prnt(CLI_SYSTEM_ST_MAC); - wifi_get_macaddr(0x00, mac); + wifi_get_macaddr(STATION_IF, mac); prntln(macToStr(mac)); FSInfo fs_info; diff --git a/esp8266_deauther/Settings.cpp b/esp8266_deauther/Settings.cpp index 017fe90..d6fa945 100644 --- a/esp8266_deauther/Settings.cpp +++ b/esp8266_deauther/Settings.cpp @@ -56,7 +56,7 @@ void Settings::load() { version = VERSION; changed = true; } - + prnt(S_SETTINGS_LOADED); prntln(FILE_PATH); @@ -93,8 +93,8 @@ void Settings::reset() { setWebSpiffs(false); setLedEnabled(true); setMaxCh(14); - wifi_get_macaddr(0x00, macSt); - wifi_get_macaddr(0x01, macAP); + wifi_get_macaddr(STATION_IF, macSt); + wifi_get_macaddr(SOFTAP_IF, macAP); // SCAN setChTime(384); diff --git a/esp8266_deauther/esp8266_deauther.ino b/esp8266_deauther/esp8266_deauther.ino index a28e6d4..37a6cd3 100644 --- a/esp8266_deauther/esp8266_deauther.ino +++ b/esp8266_deauther/esp8266_deauther.ino @@ -82,6 +82,12 @@ void setup() { // get time currentTime = millis(); + + // load settings + settings.load(); + + // set mac for access point + wifi_set_macaddr(SOFTAP_IF, settings.getMacAP()); // start WiFi WiFi.mode(WIFI_OFF); @@ -89,10 +95,10 @@ void setup() { wifi_set_promiscuous_rx_cb([](uint8_t* buf, uint16_t len) { scan.sniffer(buf, len); }); - - // load settings - settings.load(); - + + // set mac for station + wifi_set_macaddr(STATION_IF, settings.getMacSt()); + // start display if (settings.getDisplayInterface()){ displayUI.setup();