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 3ac4639 commit af8b9dbCopy full SHA for af8b9db
libraries/SocketWrapper/WiFi.h
@@ -99,12 +99,28 @@ class WiFiClass : public NetworkInterface {
99
// TODO: borrow code from mbed core for scan results handling
100
}
101
102
+ char* SSID() {
103
+ if (status() == WL_CONNECTED) {
104
+ return (char *)sta_state.ssid;
105
+ }
106
+ return nullptr;
107
108
+
109
+ int32_t RSSI() {
110
111
+ return sta_state.rssi;
112
113
+ return 0;
114
115
116
private:
117
struct net_if *sta_iface = nullptr;
118
struct net_if *ap_iface = nullptr;
119
120
struct wifi_connect_req_params ap_config;
121
struct wifi_connect_req_params sta_config;
122
123
+ struct wifi_iface_status sta_state = { 0 };
124
};
125
126
extern WiFiClass WiFi;
0 commit comments