Bluetooth doesn’t work / flash_erase

filipesdkerplunk
Posts: 5
Joined: Mon Oct 18, 2021 6:57 pm

Bluetooth doesn’t work / flash_erase

Postby filipesdkerplunk » Tue Oct 19, 2021 9:44 pm

Hi!

I've been having issues with my ESP32 which I think are flash memory issues. In my ESP32 there was data in SPIFFS, EEPROM and wifi chip. I recently erased all flash memory with esptools and the erase_flash command. Thus, it erased both the saved information from wifi, data in EEPROM and data from SPIFFS. However, I went to test the bluetooth and it no longer connects to any device and before I erased the flash, it worked. The same sketch worked on another ESP32. It's the actual example sketch:

Code: Select all

#include "BluetoothSerial.h"

#if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED)
#error Bluetooth is not enabled! Please run `make menuconfig` to and enable it
#endif

BluetoothSerial SerialBT;

void setup() {
  Serial.begin(115200);
  SerialBT.begin("ESP32test"); //Bluetooth device name
  Serial.println("The device started, now you can pair it with bluetooth!");
}

void loop() {
  if (Serial.available()) {
    SerialBT.write(Serial.read());
  }
  if (SerialBT.available()) {
    Serial.write(SerialBT.read());
  }
  delay(20);
}
I would also like to know if all these SPIFFS, EEPROM and WIFI data writes are written in the same place. I'm new to Arduino and C++, but if they are saved in the same location, is there a chance that one EEPROM write and another SPIFFS write overlap, or some other information overlap? Is it correct or smart to use both SPIFFS and EEPROM in the same sketch?

But that's it, I started having problems with ESP32 after I made EEPROM writes and after I decided to erase the entire flash memory and now I don't know if there are any solutions.

Thank you!

Who is online

Users browsing this forum: JVKran and 78 guests