Skip to content

Avoid starting AP Mode even when the password is too short #7832

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

Merged
merged 2 commits into from
Feb 13, 2023

Conversation

SuGlider
Copy link
Collaborator

Description of Change

Using Arduino 2.0.6 with the WiFiAccessPoint example, if the password is changed to have between 1 and 7 characters, an error message is sent, but even though the AP starts to work.

It will start with a different SSID and no password, which should not happen given that the WiFiAPClass::softAP() returned false and failed with an error message.

This PR fixes it by changing the order of the parameter verification to happen before setting the AP mode.

Tests scenarios

Tested with ESP32

Related links

Fix #7831

@SuGlider SuGlider added the Area: BT&Wifi BT & Wifi related issues label Feb 10, 2023
@SuGlider SuGlider added this to the 2.0.7 milestone Feb 10, 2023
@SuGlider SuGlider self-assigned this Feb 10, 2023
Copy link
Collaborator

@mrengineer7777 mrengineer7777 left a comment

Choose a reason for hiding this comment

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

This is exactly how I would fix WiFiAPClass::softAP(). LGTM.

@me-no-dev me-no-dev merged commit efe966d into master Feb 13, 2023
@me-no-dev me-no-dev deleted the SuGlider-patch-1 branch February 13, 2023 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: BT&Wifi BT & Wifi related issues
Projects
Development

Successfully merging this pull request may close these issues.

SoftAP fails to assign SSID/PWD with pasword size 1 to 7 characters and still turns on AP
3 participants