File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -483,12 +483,14 @@ const char* CWifi::SSID() {
483
483
if (modem.write (string (PROMPT (_MODE)),res, " %s" , CMD_READ (_MODE))) {
484
484
if (atoi (res.c_str ()) == 1 ) {
485
485
if (modem.write (string (PROMPT (_GETSSID)), res, CMD_READ (_GETSSID))) {
486
- return res.c_str ();
486
+ ssid = res;
487
+ return ssid.c_str ();
487
488
}
488
489
}
489
490
else if (atoi (res.c_str ()) == 2 ) {
490
491
if (modem.write (string (PROMPT (_GETSOFTAPSSID)), res, CMD_READ (_GETSOFTAPSSID))) {
491
- return res.c_str ();
492
+ apssid = res;
493
+ return apssid.c_str ();
492
494
}
493
495
}
494
496
}
@@ -521,7 +523,8 @@ const char* CWifi::softAPSSID() {
521
523
/* -------------------------------------------------------------------------- */
522
524
string res = " " ;
523
525
if (modem.write (string (PROMPT (_GETSOFTAPSSID)), res, CMD_READ (_GETSOFTAPSSID))) {
524
- return res.c_str ();
526
+ apssid = res;
527
+ return apssid.c_str ();
525
528
}
526
529
return " " ;
527
530
}
Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ class CWifi {
35
35
unsigned long _timeout;
36
36
uint8_t mac[6 ];
37
37
std::vector<CAccessPoint> access_points;
38
+ std::string ssid;
39
+ std::string apssid;
38
40
39
41
40
42
IPAddress ip_ap = DEFAULT_IP_AP_ADDRESS;
You can’t perform that action at this time.
0 commit comments