We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63a748f commit 3d40decCopy full SHA for 3d40dec
libraries/SocketWrapper/WiFi.h
@@ -79,11 +79,13 @@ class WiFiClass : public NetworkInterface {
79
return true;
80
}
81
82
- int status() {
83
- if (net_mgmt(NET_REQUEST_WIFI_IFACE_STATUS, netif, &sta_state,
84
- sizeof(struct wifi_iface_status))) {
85
- return WL_NO_SHIELD;
86
- }
+ int status() {
+ sta_iface = net_if_get_wifi_sta();
+ netif = sta_iface;
+ if (net_mgmt(NET_REQUEST_WIFI_IFACE_STATUS, netif, &sta_state,
+ sizeof(struct wifi_iface_status))) {
87
+ return WL_NO_SHIELD;
88
+ }
89
90
if (sta_state.state >= WIFI_STATE_ASSOCIATED) {
91
return WL_CONNECTED;
0 commit comments