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
Handle 4way handshake error in idf5 #9025
Conversation
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.
One suggestion based on what I think your goal is. I think you are trying to improve the error message in this case.
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.
I think the else if
here (lines 378-388) is redundant: the new if
handles the special case, the else if
would get handled anyway by the return self->last_disconnect_reason;
? It's been that way for a while it seems, nothing new.
edit: I'm fine with this solution, it all bubbles up to a ConnectionError: Authentication failure
in shared-bindings, so users do get a descriptive string for these cases.
Co-authored-by: Dan Halbert <halbert@halwitz.org>
This reverts commit 6c14264.
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.
Thank you!
Fixes: #8888
Turns out the error did occur in any authentication mismatch.
I investigated the underlying api a bit and played with examples, and saw a lot more weirdness there.
When attempting to connect to a secure wifi without a password,
event_id
becomes 2 andevent_data.reason
is 15 (WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT
).When attempting to connect to a secure wifi with an incorrect password,
event_id
becomes 5 andevent_data.reason
is 15 (WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT
).I don't know if the upstream change in behavior is intentional, and I don't have the time to find that out right now.
This is a simple patch that when it sees 15 (
WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT
) it makes it 202 (WIFI_REASON_AUTH_FAIL
).