Skip to content

GIGA R1: fix for UDP endPacket failing #964

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 1 commit into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions libraries/WiFi/src/WiFi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ int arduino::WiFiClass::begin(const char* ssid, const char* passphrase, wl_enc_t
_security = ap_list[connected_ap].get_security();
} else {
// For hidden networks, the security mode must be set explicitly.
// if ENC_TYPE_UNKNOWN this means that is the default value and so the user
// has not set it... no worth trying, it is probably an unknown (not hidden)
// interface
if(security == ENC_TYPE_UNKNOWN) {
_currentNetworkStatus = WL_CONNECT_FAILED;
return _currentNetworkStatus;
}
_security = enum2sec(security);
}

Expand Down
2 changes: 1 addition & 1 deletion libraries/WiFi/src/WiFi.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class WiFiClass : public MbedSocketClass {
* param passphrase: Passphrase. Valid characters in a passphrase
* must be between ASCII 32-126 (decimal).
*/
int begin(const char* ssid, const char* passphrase, wl_enc_type security = ENC_TYPE_CCMP);
int begin(const char* ssid, const char* passphrase, wl_enc_type security = ENC_TYPE_UNKNOWN);

// Inherit config methods from the parent class
using MbedSocketClass::config;
Expand Down