As the title says... Chat on...

User avatar
By Mikubo
#65548 Hi there,

i would be very greatful if somebody could help me.
I did a testing with Spacehuhns Deauther Tool and set my Wifi to invisible. For some reasons i forgot my WIFI Passwort and want to clean the EPROM of my ESP8266-Board. I found this EPROM Cleaner on Schinfo's Github page: https://github.com/schinfo/EEPROM-Cleaner
but i sadly don't now what to do with that .info File. I only own that ESP8266-Board and an Windows PC. Do i need special Software or an Arduino for clearing the EPROM? I'm completely new to this. Many thanks in advance.
User avatar
By Mikubo
#65645 Issues are faulty settings. I don't have access anymore. If i flash again with the .bin file everything has remained as it was. Solution is to wipe the memory and flash that .bin File again.
I found that .info File to flash the EPROM but i don't know how to use it.

Code: Select all/********************************************************************************************

                       EEPROM-Cleaner v1.2.0

                       Copyright (c) 2017 Helmut Stult (schinfo)

 ********************************************************************************************/

#include <EEPROM.h>
#include <ESP8266WiFi.h>

// sizeBytes being the number of bytes you want to use.
// It's defined with "#define sizeBytes"
// Size can be anywhere between 4 and 4096 bytes (Default for ESP8266_deauther = 4096)
#define sizeBytes 4096

// change it for lower or higher endByte (Default for ESP8266_deauther = 4096)
// normaly it's the same as sizeBytes
#define endByte 4096

// change it for lower or higher startByte (Default = 0)
#define startByte 0

unsigned long ok = 0;
unsigned long nok = 0;
unsigned long tok = 0;


void setup()
{
  Serial.begin(115200);
  EEPROM.begin(sizeBytes);

  delay(100);

  Serial.println("**********************************************************************************************************");
  Serial.println("");
  Serial.print("    Write a char(255) / hex(FF) from byte ");
  Serial.print(startByte);
  Serial.print(" to ");
  Serial.print(endByte - 1);
  Serial.print(" into the EEPROM with a defined size of ");
  Serial.print("");
  Serial.print(sizeBytes);
  Serial.println(" Bytes");
  Serial.println("");
  Serial.println("**********************************************************************************************************");
  Serial.println("");

  Serial.println("             testing EEPROM for written bytes");
  Serial.println("");

  for (int i = startByte; i < endByte; ++i)
  {
    if (EEPROM.read(i) == 255) {
      ++ok;
    } else {
      ++nok;
    }
  }

  Serial.printf("               empty bytes: %6d\r\n", ok);
  Serial.printf("           not empty bytes: %6d\r\n", nok);
  Serial.println("");
  Serial.println("**********************************************************************************************************");
  Serial.println("");

  Serial.println("**********************************************************************************************************");
  Serial.println("");
  Serial.println("             Start clearing EEPROM... - Please wait!!!");
  Serial.println("");
  Serial.println("**********************************************************************************************************");

  delay(1000);

  // write a char(255) / hex(FF) from startByte until endByte into the EEPROM
  for (int i = startByte; i < endByte; ++i) {
    EEPROM.write(i, -1);
  }

  EEPROM.commit();

  delay(1000);

  Serial.println("");
  Serial.println("             testing EEPROM for clearing");
  Serial.println("");

  String test;
  for (int i = startByte; i < endByte; ++i)
  {
    if (EEPROM.read(i) == 255) {
      ++tok;
    }
  }
  Serial.println("**********************************************************************************************************");
  Serial.println("");
  if (tok = endByte - startByte) {
    Serial.println("             EEPROM killed correctly");
  } else
    Serial.println("             EEPROM not killed - ERROR !!!");

  Serial.println("");
  Serial.println("**********************************************************************************************************");
  Serial.println("");
  Serial.println("             Ready - You can remove your ESP8266 / LoLin");
  Serial.println("");
  Serial.println("**********************************************************************************************************");
}

void loop()
{
}
User avatar
By marcelstoer
#65658 Now I'm even more confused. Do you work with the NodeMCU firmware (you mentioned flashing .bin files) or do you work with Arduino (last code you showed)?

It's not enough to simply erase the complete flash memory? esptool.py and https://github.com/marcelstoer/nodemcu-pyflasher/ (and possibly others) offer that.