From 55dcaf83a046611521c49a63a47dbd66b16812b0 Mon Sep 17 00:00:00 2001 From: Michael Gutierrez Date: Wed, 20 Mar 2024 17:57:08 -0700 Subject: [PATCH 1/2] if WIFI_PASS is an empty string, connect with WiFi.begin(_ssid); for unsecure network config --- src/wifi/AdafruitIO_WINC1500.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/wifi/AdafruitIO_WINC1500.h b/src/wifi/AdafruitIO_WINC1500.h index 88280ec..5bb4672 100644 --- a/src/wifi/AdafruitIO_WINC1500.h +++ b/src/wifi/AdafruitIO_WINC1500.h @@ -137,7 +137,10 @@ class AdafruitIO_WINC1500 : public AdafruitIO { return; } - WiFi.begin(_ssid, _pass); + if (_pass && strlen(_pass) > 0) + WiFi.begin(_ssid, _pass); + else + WiFi.begin(_ssid); _status = AIO_NET_DISCONNECTED; } } From 17a52c76821f2c4d3767f0783edf78a100d4cebf Mon Sep 17 00:00:00 2001 From: Michael Gutierrez Date: Sat, 5 Oct 2024 22:09:43 -0700 Subject: [PATCH 2/2] added curly braces to if statement --- src/wifi/AdafruitIO_WINC1500.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/wifi/AdafruitIO_WINC1500.h b/src/wifi/AdafruitIO_WINC1500.h index 5bb4672..789073a 100644 --- a/src/wifi/AdafruitIO_WINC1500.h +++ b/src/wifi/AdafruitIO_WINC1500.h @@ -137,10 +137,12 @@ class AdafruitIO_WINC1500 : public AdafruitIO { return; } - if (_pass && strlen(_pass) > 0) + if (_pass && strlen(_pass) > 0) { WiFi.begin(_ssid, _pass); - else + } + else { WiFi.begin(_ssid); + } _status = AIO_NET_DISCONNECTED; } }