How To Solve Nodemcu ESP8266's Exception3 Problem?

2

I downloaded from Github Spacehuhn's ESP8266 deauther project (https://github.com/SpacehuhnTech/esp8266_deauther/tree/v2). It compiled without problem, and I could upload it to my board too, but after some seconds this appeared on my serial monitor:

OK
Formatting EEPROM...OK
Loading settings...Invalid Hash - reseted to default
Device names loaded from /names.json
SSIDs loaded from /ssids.json
Scan results saved in /scan.json
Serial interface enabled
Started AP
[WiFi] Path: '/web', Mode: 'AP', SSID: 'pwned', password: 'deauther', channel: '1', hidden: false, captive-portal: true
STARTED! \o/
2.2.0
# scan -t 5s
Stopped scan
Scan results saved in /scan.json
Removed all APs
Cleared station list
Starting scan for access points (Wi-Fi networks)...

I think it is interesting from this point:

Exception (3):
epc1=0x4000bef4 epc2=0x00000000 epc3=0x00000000 excvaddr=0x4025adda depc=0x00000000

ctx: cont 
sp: 3fff1b00 end: 3fff1e20 offset: 01a0

>>>stack>>>
3fff1ca0:  00000100 40004b14 3fff1ce0 4022af66  
3fff1cb0:  3ffe87a8 4025adda 3fff1ce0 4022afb4  
3fff1cc0:  4025adda 4010695e 3fff1dd0 3ffefcd0  
3fff1cd0:  000147e1 3fff09d4 3fff1dd0 40218726  
3fff1ce0:  3fff2ae8 0000000f 00000007 4022af36  
3fff1cf0:  000147e1 3fff09d4 3fff1dd0 40218a2d  
3fff1d00:  000147e1 3fff09d4 3fff0a90 40218e45  
3fff1d10:  00000202 00000001 0000003c 00000000  
3fff1d20:  00000258 00000119 00000001 00000001  
3fff1d30:  fb240001 00bbcdb8 2e105304 00c800e7  
3fff1d40:  77700003 0064656e 00000000 00000000  
3fff1d50:  00000000 00000000 00000000 00000000  
3fff1d60:  64000000 74756165 00726568 00000000  
3fff1d70:  00000000 00000000 00000000 00000000  
3fff1d80:  00000000 00000000 00000000 00000000  
3fff1d90:  00000000 00000000 00000000 00000000  
3fff1da0:  00000000 04a8c000 00010101 01006e65  
3fff1db0:  00000101 00000000 00000258 9c34a91b  
3fff1dc0:  919c28e6 fe4cd405 401dd719 3e9e76c3  
3fff1dd0:  3fff6a58 0000025f 00000002 3ffefcd0  
3fff1de0:  000147e1 3ffefccc 3fff09d4 4021c8f0  
3fff1df0:  00000000 00000000 00000000 3fff0dec  
3fff1e00:  3fffdc20 00000000 3fff0de5 402250e5  
3fff1e10:  00000000 00000000 3fff0e00 40100114  
<<<stack<<<

 ets Jan  8 2013,rst cause:2, boot mode:(1,6)


 ets Jan  8 2013,rst cause:4, boot mode:(1,6)

wdt reset

I could not figure out what could be the problem, so if you know what to do, don't hesitate, please reply as fast as possible. Thanks in advance. :)

Here is the sourcecode, but you can find it on the linked Github page too.

/*
   ===========================================
      Copyright (c) 2018 Stefan Kremser
             github.com/spacehuhn
   ===========================================
 */

extern "C" {
    // Please follow this tutorial:
    // https://github.com/spacehuhn/esp8266_deauther/wiki/Installation#compiling-using-arduino-ide
    // And be sure to have the right board selected
  #include "user_interface.h"
}

#include "EEPROMHelper.h"

#include <ArduinoJson.h>
#if ARDUINOJSON_VERSION_MAJOR != 5
// The software was build using ArduinoJson v5.x
// version 6 is still in beta at the time of writing
// go to tools -> manage libraries, search for ArduinoJSON and install version 5
#error Please upgrade/downgrade ArduinoJSON library to version 5!
#endif // if ARDUINOJSON_VERSION_MAJOR != 5

#include "oui.h"
#include "language.h"
#include "functions.h"
#include "Settings.h"
#include "Names.h"
#include "SSIDs.h"
#include "Scan.h"
#include "Attack.h"
#include "CLI.h"
#include "DisplayUI.h"
#include "A_config.h"
#include "webfiles.h"

#include "LED.h"

// Run-Time Variables //
LED led;
Settings settings;
Names    names;
SSIDs    ssids;
Accesspoints accesspoints;
Stations     stations;
Scan   scan;
Attack attack;
CLI    cli;
DisplayUI displayUI;

#include "wifi.h"

uint32_t autosaveTime = 0;
uint32_t currentTime  = 0;

bool booted = false;

void setup() {
    // for random generator
    randomSeed(os_random());

    // start serial
    Serial.begin(115200);
    Serial.println();

    // start SPIFFS
    prnt(SETUP_MOUNT_SPIFFS);
    bool spiffsError = !SPIFFS.begin();
    prntln(spiffsError ? SETUP_ERROR : SETUP_OK);

    // Start EEPROM
    EEPROMHelper::begin(EEPROM_SIZE);

#ifdef FORMAT_SPIFFS
    prnt(SETUP_FORMAT_SPIFFS);
    SPIFFS.format();
    prntln(SETUP_OK);
#endif // ifdef FORMAT_SPIFFS

#ifdef FORMAT_EEPROM
    prnt(SETUP_FORMAT_EEPROM);
    EEPROMHelper::format(EEPROM_SIZE);
    prntln(SETUP_OK);
#endif // ifdef FORMAT_EEPROM

    // Format SPIFFS when in boot-loop
    if (spiffsError || !EEPROMHelper::checkBootNum(BOOT_COUNTER_ADDR)) {
        prnt(SETUP_FORMAT_SPIFFS);
        SPIFFS.format();
        prntln(SETUP_OK);

        prnt(SETUP_FORMAT_EEPROM);
        EEPROMHelper::format(EEPROM_SIZE);
        prntln(SETUP_OK);

        EEPROMHelper::resetBootNum(BOOT_COUNTER_ADDR);
    }

    // get time
    currentTime = millis();

    // load settings
    #ifndef RESET_SETTINGS
    settings.load();
    #else // ifndef RESET_SETTINGS
    settings.reset();
    settings.save();
    #endif // ifndef RESET_SETTINGS

    // set mac address
    wifi_set_macaddr(STATION_IF, (uint8_t*)settings.getWifiSettings().mac_st);
    wifi_set_macaddr(SOFTAP_IF, (uint8_t*)settings.getWifiSettings().mac_ap);

    // start WiFi
    WiFi.mode(WIFI_OFF);
    wifi_set_opmode(STATION_MODE);
    wifi_set_promiscuous_rx_cb([](uint8_t* buf, uint16_t len) {
        scan.sniffer(buf, len);
    });

    // start display
    if (settings.getDisplaySettings().enabled) {
        displayUI.setup();
        displayUI.mode = displayUI.DISPLAY_MODE::INTRO;
    }

    // copy web files to SPIFFS
    copyWebFiles(false);

    // load everything else
    names.load();
    ssids.load();
    cli.load();

    // create scan.json
    scan.setup();

    // set channel
    setWifiChannel(settings.getWifiSettings().channel);

    // load Wifi settings: SSID, password,...
    loadWifiConfigDefaults();

    // dis/enable serial command interface
    if (settings.getCLISettings().enabled) {
        cli.enable();
    } else {
        prntln(SETUP_SERIAL_WARNING);
        Serial.flush();
        Serial.end();
    }

    // start access point/web interface
    if (settings.getWebSettings().enabled) startAP();

    // STARTED
    prntln(SETUP_STARTED);

    // version
    prntln(DEAUTHER_VERSION);

    // setup LED
    led.setup();
}

void loop() {
    currentTime = millis();

    led.update();    // update LED color
    wifiUpdate();    // manage access point
    attack.update(); // run attacks
    displayUI.update();
    cli.update();    // read and run serial input
    scan.update();   // run scan
    ssids.update();  // run random mode, if enabled

    // auto-save
    if (settings.getAutosaveSettings().enabled
        && (currentTime - autosaveTime > settings.getAutosaveSettings().time)) {
        autosaveTime = currentTime;
        names.save(false);
        ssids.save(false);
        settings.save(false);
    }

    if (!booted) {
        booted = true;
        EEPROMHelper::resetBootNum(BOOT_COUNTER_ADDR);
#ifdef HIGHLIGHT_LED
        displayUI.setupLED();
#endif // ifdef HIGHLIGHT_LED
    }
}
wifi
esp8266
nodemcu
asked on Stack Overflow Jun 26, 2020 by redfox23 • edited Jun 26, 2020 by redfox23

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0