Skip to content
Prev Previous commit
Next Next commit
WiFi make begin() return status()
  • Loading branch information
pennam committed Jun 24, 2025
commit 29c603709541e46fc1a6b72bf260fa2fa858f86c
4 changes: 2 additions & 2 deletions libraries/SocketWrapper/WiFi.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class WiFiClass: public NetworkInterface
WiFiClass() {}
~WiFiClass() {}

bool begin(const char* ssid, const char* passphrase, wl_enc_type security = ENC_TYPE_UNKNOWN, bool blocking = true) {
int begin(const char* ssid, const char* passphrase, wl_enc_type security = ENC_TYPE_UNKNOWN, bool blocking = true) {
sta_iface = net_if_get_wifi_sta();
netif = sta_iface;
sta_config.ssid = (const uint8_t *)ssid;
Expand All @@ -40,7 +40,7 @@ class WiFiClass: public NetworkInterface
net_mgmt_event_wait_on_iface(sta_iface, NET_EVENT_WIFI_CONNECT_RESULT, NULL, NULL, NULL, K_FOREVER);
}

return true;
return status();
}

bool beginAP(char* ssid, char* passphrase, int channel = WIFI_CHANNEL_ANY, bool blocking = false) {
Expand Down