Skip to content

WiFi STA encryptionType() getter added #9114

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JAndrassy
Copy link
Contributor

Arduino WiFi API has this function.
in ESP8266WiFi library scan result has encryptionType() but STA didn't have it.
I found this way to implement it.

@@ -240,6 +240,7 @@ void ESP8266WiFiGenericClass::_eventCallback(void* arg)

if (event->event == EVENT_STAMODE_AUTHMODE_CHANGE) {
auto& src = event->event_info.auth_change;
WiFi.authMode = src.new_mode;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this is a side-effect of attempted authmode (i.e. wpa3 downgrade to wpa2) or event that always happen every connection?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

after every connection.
src.old_mode is 0

@@ -94,6 +95,9 @@ class ESP8266WiFiSTAClass: public LwipIntf {
static void enableInsecureWEP (bool enable = true) { _useInsecureWEP = enable; }

protected:
friend class ESP8266WiFiGenericClass;

uint8_t authMode;
Copy link
Collaborator

Choose a reason for hiding this comment

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

-1 default?
reset to -1 on disconnect?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants