Skip to content

[Discussion] Proposal for improving stability: Boot sequence and WiFi handling #107

@Jane84894

Description

@Jane84894

Hi @jnthas,

First of all, thank you for this amazing project! I've been studying the code and really like the architecture.

While running the firmware on my ESP32 + HUB75 setup, I noticed a few potential stability issues that might cause boot loops or blocking behavior in certain environments. I have analyzed the source code and would like to share my findings and some potential solutions I am currently exploring.

1. Boot Loop / Brownout Risk

Observation: In setup(), the display is initialized and turned on (potentially drawing high current) before wifi.begin() is called.
Hypothesis: The combined current spike from the display and WiFi RF calibration might trigger the Brownout Detector on some boards.
Proposed Idea: Initialize the display with setBrightness8(0) (black screen) first, and only ramp up the brightness after the WiFi connection sequence is complete.

2. WiFi Connection Blocking

Observation: The current connection logic seems to block the execution loop if the configured WiFi network is unavailable. This makes it difficult to reconfigure the device if it's moved to a new location.
Proposed Idea: Implementing a timeout mechanism or integrating a library like WiFiManager. This would allow the device to fall back to AP mode or an "Offline Mode" if the connection fails, keeping the UI responsive.

3. NTP Synchronization

Observation: The boot process appears to stall if the WiFi is connected but the NTP server is unreachable.
Proposed Idea: Making the NTP synchronization non-blocking or adding a timeout to prevent the device from hanging on a blank screen during startup.


Next Steps:
I am currently trying to implement these changes locally to verify if they solve the issues.

I wanted to ask if you are open to these kinds of modifications? If you think this approach makes sense, I can continue working on it and hopefully submit a Pull Request once I have a stable solution.

Thanks again!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions