@@ -421,26 +421,45 @@ uint8_t CWifi::channel(uint8_t networkItem) {
421
421
422
422
/* -------------------------------------------------------------------------- */
423
423
const char * CWifi::SSID () {
424
- /* -------------------------------------------------------------------------- */
425
- return " " ;
424
+ /* -------------------------------------------------------------------------- */
425
+ string res = " " ;
426
+ if (modem.write (string (PROMPT (_GETSSID)), res, CMD_READ (_GETSSID))) {
427
+ return res.c_str ();
428
+ }
429
+ return " " ;
426
430
}
427
431
428
432
/* -------------------------------------------------------------------------- */
429
433
uint8_t * CWifi::BSSID (uint8_t * bssid) {
430
434
/* -------------------------------------------------------------------------- */
431
- return nullptr ;
435
+ string res = " " ;
436
+ if (modem.write (string (PROMPT (_GETBSSID)), res, CMD_READ (_GETBSSID))) {
437
+ Serial.print (" BSSID: " );
438
+ Serial.println (res.c_str ());
439
+ macStr2macArray (bssid, res.c_str ());
440
+ return bssid;
441
+ }
442
+ return nullptr ;
432
443
}
433
444
434
445
/* -------------------------------------------------------------------------- */
435
446
int32_t CWifi::RSSI () {
436
- /* -------------------------------------------------------------------------- */
437
- return 0 ;
447
+ /* -------------------------------------------------------------------------- */
448
+ string res = " " ;
449
+ if (modem.write (string (PROMPT (_GETRSSI)), res, CMD_READ (_GETRSSI))) {
450
+ return atoi (res.c_str ());
451
+ }
452
+ return 0 ;
438
453
}
439
454
440
455
/* -------------------------------------------------------------------------- */
441
- uint8_t CWifi::encryptionType () {
456
+ const char * CWifi::softAPSSID () {
442
457
/* -------------------------------------------------------------------------- */
443
- return 0 ;
458
+ string res = " " ;
459
+ if (modem.write (string (PROMPT (_GETSOFTAPSSID)), res, CMD_READ (_GETSOFTAPSSID))) {
460
+ return res.c_str ();
461
+ }
462
+ return " " ;
444
463
}
445
464
446
465
/* -------------------------------------------------------------------------- */
0 commit comments