Giter VIP home page Giter VIP logo

Comments (9)

sctanf avatar sctanf commented on July 19, 2024 1

@Kamilake No, the board resets if you try to access damaged flash, so credentials can no longer be written. Not sure if it can still be read. Otherwise it appears to work fine

from slimevr-tracker-esp.

deiteris avatar deiteris commented on July 19, 2024

Related issue: esp8266/Arduino#1054

from slimevr-tracker-esp.

Kamilake avatar Kamilake commented on July 19, 2024

That's interesting. It doesn't seem to happen on ESP32.

Does that cause the whole board to boot fail? Or does it only corrupt credentials?
Do I(that board) need to Wifi.persistent(false) on every run except when performing a write operation?

from slimevr-tracker-esp.

deiteris avatar deiteris commented on July 19, 2024

Similar issue seems to be occurred on Wemos D1 Mini when powered via micro-USB port, but works ok on battery. Though Wifi.persistent(false) didn't help.
https://discord.com/channels/817184208525983775/823930029070876736/905833475741982721

from slimevr-tracker-esp.

Eirenliel avatar Eirenliel commented on July 19, 2024

Need to review Wifi.begin() code for different frameworks and see how to start wifi properly without it being re-written, but still being able to read it on begin and write on credentials change.

from slimevr-tracker-esp.

Vyolex avatar Vyolex commented on July 19, 2024

On the espressif8266 platform this should not be the case. Only when SSID and the passphrase are provided will Wifi.begin() write to flash if persistence is not set to false. When not providing these parameters it should only read from flash (code below).

wl_status_t ESP8266WiFiSTAClass::begin() {

    if(!WiFi.enableSTA(true)) {
        // enable STA failed
        return WL_CONNECT_FAILED;
    }

    ETS_UART_INTR_DISABLE();
    wifi_station_connect();
    ETS_UART_INTR_ENABLE();

    if(!_useStaticIp) {
        wifi_station_dhcpc_start();
    }
    return status();
}```

from slimevr-tracker-esp.

Vyolex avatar Vyolex commented on July 19, 2024

Can this be closed? Neither esp32 nor esp8266 does any writing to memory when wifi.begin() is called without arguments. (In fact the function does not even reference if persistence is set to true or false in either function.)

from slimevr-tracker-esp.

Eirenliel avatar Eirenliel commented on July 19, 2024

Did we used to use WiFi.begin(SSID, pass)? Or was this open on error, @Vyolex?

from slimevr-tracker-esp.

Vyolex avatar Vyolex commented on July 19, 2024

IDK if it used to be different but atm we only call WiFi.begin(SSID, pass) in setWiFiCredentials and in upkeep (the latter only when the ssid and pass are defined in code). So default behaviour should not cause data to be written to flash every single boot, only on sending credentials from server.

from slimevr-tracker-esp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.