4

Is it possible to make the phone to "know" that a specific wifi network is at specific geographic location?

if (answer == YES)
{  
    than how?
}
else
{
    can the phone figure this out by himself?  
}

Another similar question: is there any way to start monitor a region with accuracy of ~100m but telling the CLLocationManager to use only by wifi networks and cellular antenas? Because I don't want to power up the GPS no matter what...

Thanks!

2 Answers 2

4

iPhone positioning sucks and there is nothing you can do.

If you jailbreak your device you can use the Apple80211 private framework to look up the available Wi-Fi networks and their signal strength. But that also means your app will get rejected.

If the user manually connects to a Wi-Fi you can see the MAC addresses of the devices on that network and use that to guess your position. Since Wi-Fi has a range of 50 meters, that's the accuracy you get.

All the positioning system is transparent for an App Store developer, meaning an application can't disable the GPS, list Wi-Fis, or read the signal strength. The most you can do is guess if you are positioning through GPS or Wi-Fi looking at the altitude parameter.

Use case: You are in a mall and you want to know where shop X is. Probably there is no GPS signal, and if you install a GPS repeater you get the position of the antenna of that repeater, not your position. Even if you install a dozen Wi-Fi access points you can't ask the user to manually connect because it's a hassle, and even if he did he would get 50-100 meters accuracy, and then there is the security risk of connecting here and there. Basically you are screwed.

2
  • Well, I guess I'll go only for android on this time... At least thank you for your honest answer... :-) Jun 14, 2011 at 11:06
  • Better answer here: stackoverflow.com/questions/15732181 Also, there is now Cisco hardware for this, google "Cisco Mobility Services Engine".
    – Jano
    Apr 15, 2013 at 15:17
0

I completely agree with Jano: apple logic has more sense than other solutions. Anyway You can easy get your WIFI network id:

-(void)LogInfo:(NSDictionary*)info forKey:(NSString*)key;
{
    NSString* temp;
    temp = [info objectForKey: key];
    NSLog(temp);
}


- (void)fetchSSIDInfo
{
    NSArray *ifs = (id)CNCopySupportedInterfaces();
    NSDictionary* info = nil;
    for (NSString *ifnam in ifs)
    {
        info = (id)CNCopyCurrentNetworkInfo((CFStringRef)ifnam);
        NSString *temp = [NSString stringWithFormat:@"%@", [info description]];
        [self AddToLog: temp];

        [self LogInfo:info forKey:@"BSSID"];
        [self LogInfo:info forKey:@"SSID"];
        [self LogInfo:info forKey:@"SSIDDATA"];
        [info release];
    }

    [ifs release];

}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.