trying to connect to WiFi on ESP32 using credentials from SD card
I use the NVS partition to store NON VOLATILE information.
I use this library: NVS library
You can save like string and restore after reset/off.
Example:
#include &lt;Arduino.h&gt;
#include &quot;ArduinoNvs.h&quot;

void setup() {   
    NVS.begin();
    Serial.begin(115200);
    // write to flash
    String set_SSID = &quot;WIFI_name&quot;; 
    NVS.setString(&quot;nvs_wifi_name&quot;, set_SSID ); //upload 1 time. after comment this line and upload again **
    // read from flash
    String get_SSID = NVS.getString(&quot;nvs_wifi_name&quot;);
    Serial.printf(&quot;Wifi name stored %s\n&quot;, get_SSID);
}


void loop() {}