Skip to content

[Issue] wifi_credentials_test() may cause false-positive rollback of a healthy new firmware #33

Description

@RomanAlexandroff

Problem

wifi_credentials_test() treats any Wi-Fi connection failure during pending firmware verification as bad credentials and immediately rolls back. This can rollback good firmware during temporary Wi-Fi outage, slow DHCP, weak signal, or AP startup delay.
Even thought it is fair to expect the new firmware to be able to connect to WiFi just half a second after the previous firmware successfully connected to WiFi to download the update, it is worth to try to make the wifi_credentials_test more reliable.

Expected behavior

Rollback should happen only when the device has strong evidence that the new firmware contains bad Wi-Fi credentials.

Suggested fix

Add retries/backoff, increase validation time, or distinguish transient Wi-Fi failures from credential failures before calling esp_ota_mark_app_invalid_rollback_and_reboot().

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions