-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
allows WiFi to attempt reconnect more than once as defined, default 6 attempts. #8217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
… attempts. Signed-off-by: 'sandeep <'[email protected]'>
refactoring code slightly, will update once done. |
updated wifi reconnect attempts code.
updated the code, added some debug log info content.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR improves WiFi connection reliability by implementing a configurable retry mechanism for WiFi connections, specifically addressing connection issues with Raspberry Pi Pico W devices that may fail to connect on the first attempt after restart.
- Introduces configurable WiFi connection retry attempts (default 6 attempts)
- Adds configurable reconnection delay between attempts (default 10 seconds)
- Updates hardware pin configurations for multiple device variants
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
File | Description |
---|---|
variants/rp2040/rpipicow/variant.h | Updates button pin configuration for Raspberry Pi Pico W |
variants/nrf52840/diy/nrf52_promicro_diy_tcxo/variant.h | Modifies various hardware pin assignments and radio module configurations |
src/mesh/wifi/WiFiAPClient.cpp | Implements WiFi connection retry logic with configurable attempts and delays |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
reverted variant.h to default config for two devices to match meshtastic repo. |
src/mesh/wifi/WiFiAPClient.cpp
Outdated
static unsigned char wifiConnectAttempts = 0; | ||
|
||
#ifndef MaxWifiConnectionAttempts | ||
#define MaxWifiConnectionAttempts 6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Macros should be CAPS_LOCK
src/mesh/wifi/WiFiAPClient.cpp
Outdated
#endif | ||
|
||
#ifndef wifiReconnectGap | ||
#define wifiReconnectGap 10000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Macros should be CAPS_LOCK
macros have been capitalized, no further modification to code flow and logic from my end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
macros have been made uppercase.
simple reconnect attempts to connect a predefined number of times to the WiFi network.
there is an issue with raspberry pico w, where it may not connect in the first attempt after a restart.
works for all other devices as well.
I have tested that my proposed changes behave as described.
I have tested that my proposed changes do not cause any obvious regressions on the following devices:
Heltec (Lora32) V3
LilyGo T-Deck
LilyGo T-Beam
RAK WisBlock 4631
Seeed Studio T-1000E tracker card
Nrf52840 diy
Rpi pico w