File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -421,6 +421,21 @@ static uint8_t Encr2wl_enc(string e) {
421
421
}
422
422
}
423
423
424
+
425
+ /* -------------------------------------------------------------------------- */
426
+ uint8_t CWifi::encryptionType () {
427
+ /* -------------------------------------------------------------------------- */
428
+ scanNetworks ();
429
+ string myssid (SSID ());
430
+ for (unsigned int i = 0 ; i < access_points.size (); i++) {
431
+ if (myssid == access_points[i].ssid ) {
432
+ return Encr2wl_enc (access_points[i].encryption_mode );
433
+ }
434
+ }
435
+ return ENC_TYPE_UNKNOWN;
436
+ }
437
+
438
+
424
439
/* -------------------------------------------------------------------------- */
425
440
uint8_t CWifi::encryptionType (uint8_t networkItem) {
426
441
if (networkItem < access_points.size ()) {
@@ -432,7 +447,7 @@ uint8_t CWifi::encryptionType(uint8_t networkItem) {
432
447
433
448
/* -------------------------------------------------------------------------- */
434
449
uint8_t * CWifi::BSSID (uint8_t networkItem, uint8_t * bssid) {
435
- if (networkItem < access_points.size ()) {
450
+ if (networkItem < access_points.size ()) {
436
451
for (int i = 0 ; i < 6 ; i++) {
437
452
*(bssid + i) = access_points[networkItem].uint_bssid [i];
438
453
}
Original file line number Diff line number Diff line change @@ -238,6 +238,7 @@ class CWifi {
238
238
239
239
*/
240
240
uint8_t encryptionType (uint8_t networkItem);
241
+ uint8_t encryptionType ();
241
242
242
243
uint8_t * BSSID (uint8_t networkItem, uint8_t * bssid);
243
244
uint8_t channel (uint8_t networkItem);
You can’t perform that action at this time.
0 commit comments