Skip to content
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

Retry connection when getting NOT_AUTHED #3720

Merged
merged 1 commit into from
Nov 24, 2020

Conversation

tannewt
Copy link
Member

@tannewt tannewt commented Nov 19, 2020

I saw it once with a correct password. Retrying may still fail
but at least it'll try first.

@todbot, this may help you too.

I saw it once with a correct password. Retrying may still fail
but at least it'll try first.
@tannewt tannewt added enhancement espressif applies to multiple Espressif chips labels Nov 19, 2020
@tannewt tannewt added this to the 6.1.0 milestone Nov 19, 2020
@todbot
Copy link

todbot commented Nov 19, 2020

Just tried this on MagTag (build 20201119-4543735 aka 6.1.0-beta.0-13-g4543735f2).
No change compared to CirPy 6.1.0-beta.0. That is: On power-on it connects, but Ctrl-D reload causes hard-reset.

@tannewt
Copy link
Member Author

tannewt commented Nov 19, 2020

@todbot I think you are hitting a separate issue. This was only intended to fix the "unknown failure" on connection.

@anecdata
Copy link
Member

anecdata commented Nov 19, 2020

Naive question, but on second thought (ref: Discord comments on WIFI_REASON_...) do we care what the reason is once we know we're in SYSTEM_EVENT_STA_DISCONNECTED state, unless we want to log it or raise it to the user? All reasons mean we're already disconnected, and we need to re-connect unless scanning or intentionally disconnecting (which we don't yet have an API for afaict).

@tannewt
Copy link
Member Author

tannewt commented Nov 23, 2020

@anecdata Yes, we don't want to retry if we initiated the disconnect.

@tannewt tannewt requested a review from jepler November 23, 2020 23:18
Copy link
Member

@jepler jepler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know enough to judge, but this looks okay.

(I do also see hangs during wifi connecting to 2 out of my 3 APs, but when this happens the last log messages are

W (46652776) wifi: connected
I (46652786) wifi:AP's beacon interval = 102400 us, DTIM period = 2

so I don't think this will fix my problems)

@jepler jepler merged commit 0836abb into adafruit:main Nov 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement espressif applies to multiple Espressif chips network
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants