Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I know security type using CAPABILITIES? #39

Open
GoogleCodeExporter opened this issue Apr 5, 2016 · 2 comments
Open

How can I know security type using CAPABILITIES? #39

GoogleCodeExporter opened this issue Apr 5, 2016 · 2 comments

Comments

@GoogleCodeExporter
Copy link

I have scanned and get the Wifi access point lists.

At this time, I wish to determine the CAPABILITIES, security types. 
How can I do that using it? Which one is one of NONE, WPA, WPA2, WEP? 
The value of CAPABILITIES is 1057, 1025,34,33,2,1073,1041 and 3121, etc... 
It is too various. I don't know what it represents. 
I am using "WEP" and "WPA_IE" key to obtain Boolean for NSDictionary, but It is 
not enough.

Anyone know how to do?



Original issue reported on code.google.com by [email protected] on 25 Aug 2010 at 11:16

@GoogleCodeExporter
Copy link
Author

I have found out the solution. Have a look the below. You can do more details 
using the wep, wpa, rsn. Thanks.

int adhoc = [network objectForKey:@"AP_MODE"];

if (adhoc == 1) {

ret =@"AdHoc network";

} else {

id wep = [network objectForKey:@"WEP"];

id wpa = [network objectForKey:@"WPA_IE"];

id rsn = [network objectForKey:@"RSN_IE"];

if(wep) {
    ret =@"Secured network (WEP)";
} else if (wpa && rsn) {
    ret =@"Secured network (WPA, WPA2)";
} else if (wpa) {
    ret =@"Secured network (WPA)";
} else if (rsn) {
    ret =@"Secured network (WPA2)";
} else {
    ret =@"Open Network";
}

}

Original comment by [email protected] on 16 Sep 2010 at 12:49

@GoogleCodeExporter
Copy link
Author

kikyound's code is work,thx!

Original comment by [email protected] on 8 Aug 2012 at 3:24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant