tags:

views:

208

answers:

3

Hi Friends,

I am using a iPhone 3g. I am in India(I got it in India). I just tried to check my location using the Google Maps. My location was spotted when I had sim in my phone. But when I took out the SIM from iPhone, I did not get my location. I tried the same with the Locate me Sample Application . So can someone explain how GPS works in iPhone, and how to fix my problem(to get my location when there is no SIM).

Thanks and Regards, krishnan

A: 

I know the iPhone uses assisted GPS: it first looks for the rough location by cell tower, knows the GPS satellites to expect for that rough location, and then finds a more precise location. Maybe when the first step fails (no SIM means no cell tower fix), the API's do not work?

Henno Brandsma
Hi Henno,thanks For your response. The reason you specify may be true reason. I am hoping it would work.
Krishnan
Try going outdoors or holding your iPhone near the window where it can see the sky. You may be able to get a GPS fix (it will take a while to lock on)
nolim1t
Nolim1t , I tried the same you have specified. It worked like a charm. Thanks Nolim1t
Krishnan
Hi Friends(Emil, NOlim1t, Plumentaor), Thanks all for your time. The only problem I facing is like, The service does not work (if sim is removed), when I am inside my office. When I take my phone outside of my office, it works . Any way thanks all.
Krishnan
The iPhone uses many things, including cell ID and WiFi SSID. It communicates these to a server, which returns an estimated location and (possibly) a list of nearby satellites.I'm pretty sure the GPS also works standalone, but you need much stronger signal; non-assisted GPS generally doesn't work indoors.
tc.
+1  A: 

The iPhone uses AGPS, or Assisted Global Positioning System. That means that the iPhone uses both GPS and internet information to get your location. If you are not connected to a WiFi network or your phone doesn't have a SIM-card in it, it won't be able to locate you.

You can't get the location of an iPhone if you have no internet, so I suggest you check wether the phone is connected to any type of internet, and show a warning if it isn't. But the GPS will still work if you are connected to a WiFi Hotspot.

Emil
Hi Emil,I am connected to a wi-fi Hotspot in my office Space. but even then I don't get my current Location....
Krishnan
I think the WiFi Hotspot you use must be registered with the service that Apple uses to get the location.
Plumenator
@Plumenatorm Correct.
Emil
Go to http://www.skyhookwireless.com/howitworks/submit_ap.php and add the wifi hotspot and then wait
nolim1t
Hi Plumenator/Emil,I think the Wifi must be registered with some Server to get them detected. I found a link which many had suggested. http://www.skyhookwireless.com/howitworks/FindMyAP.php. Does it mean that when I travel to a place, where there is no signal, I will not be able to find my location.
Krishnan
I did not try this option, Nolim1t.
Krishnan
@Krishnan: Yes, unfortunately.
Emil
A: 

As Nolim suggested, I tried checking in outdoors and it worked. If you are checking within your office space or home, get out of it completely and go to a open space and check there. It should work, irrespective of whether you have SIM or not.( Usually when you have SIM, it A-GPS would work).If it is not working immediately, wait for some time, for around 2-3 minutes and it would work.

Krishnan