Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
I havent noticed this but I keep SSH off. Any chance you tested this w/ SSH set to off using SBSettings? Same problems?
 
Yes, same problem. It's the installation of OpenSSH that causes the problem, apparently, not whether or not the SSH daemon is running.
 
i don't get it..so it only affects your wifi location? my gps and 3g triangulation works fine!

Navigon and google maps works fine outdoors
 
i don't get it..so it only affects your wifi location? my gps and 3g triangulation works fine!

Navigon and google maps works fine outdoors

Yes, you'll notice the original post, the users is talking about what happens when you're indoors, on Wi-Fi but have no cell or GPS signal. With OpenSSH package installed, the phone cannot locate you. Without OpenSSH installed, it is able to utilize Apple's location services (formerly, Skyhook's location services), to guesstimate where you are by way of guesstimating where your Wi-Fi access point is located.
 
So is it possible that Apple's own Wi-Fi locations database is so ass-tastic that it's locating my router in Chicago, whereas my old iPhone, using Skyhook's database and location services, correctly found the exact same router correctly, in Florida?

Or is Apple no longer using Wi-Fi in its location triangulation scheme at all, hence my phone shows itself a few streets over when 3G & Wi-Fi are turned on vs. just about dead-on with my old phone when 3G & Wi-Fi were on?

UPDATE: Two days later, Apple's location assist seems to be working fine now (with OpenSSH UNINSTALLED, of course). Whereas before it was locating me in Chicago with airplane mode ON & Wi-Fi mode ON, it now appears to correctly be using my Wi-Fi AP to located me.
 
Well I just re-installed OpenSSH again and thought the problem was fixed. Everything seemed to be working fine - until I rebooted. :(
 
It is caused by the SSH Daemon breaking the wifi location service. It doesn't cause any issues if you actually have GPS. I did write a fix for it, but you have to know how to SSH into the device and create a script along with a launchD daemon. Do people want me to post the code for it?
 
Here are the two files:

/usr/sbin/locd

Code:
#!/bin/bash
sleep 15
launchctl unload /System/Library/LaunchDaemons/com.apple.locationd.plist
sleep 10
launchctl load /System/Library/LaunchDaemons/com.apple.locationd.plist

/System/Library/LaunchDaemons/com.ikyo.loc.Startup.plist

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>Label</key>
	<string>com.ikyo.loc.Startup</string>
	<key>UserName</key>
	<string>root</string>
	<key>Program</key>
	<string>/usr/sbin/locd</string>
	<key>RunAtLoad</key>
	<true/>
</dict>
</plist>
 
Thanks. So it looks like what you're doing is just reloading the location daemon after everything else is loaded, right?
 
Wirelessly posted (iPhone 4 (32GB, JB): Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0_1 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A306 Safari/6531.22.7)

I'd love to use this script but I have no (or very little) idea how. Would it be a hassle to write a quick tutorial?
 
Wirelessly posted (iPhone 4 (32GB, JB): Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0_1 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A306 Safari/6531.22.7)

Ok, nevermind me. Once I saw the normal (non-mobile) version of this thread, it made perfect sense. In fact, I was able to create the two files using iFile right on the phone, and I'm happy to report it's working perfectly. So thank you for posting this fix! :)
 
Wirelessly posted (iPhone 4 (32GB, JB): Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0_1 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A306 Safari/6531.22.7)

I'd love to use this script but I have no (or very little) idea how. Would it be a hassle to write a quick tutorial?

It may have worked for you, but any chance we can still get a writeup? I'd love to see a fix for this.
 
It may have worked for you, but any chance we can still get a writeup? I'd love to see a fix for this.

Sure thing. It's very simple, really - you just have to create text documents containing the code Ikyo posted and then name them correctly and place them in the appropriate directories.

Copy/paste this code into a new text document:
Code:
#!/bin/bash
sleep 15
launchctl unload /System/Library/LaunchDaemons/com.apple.locationd.plist
sleep 10
launchctl load /System/Library/LaunchDaemons/com.apple.locationd.plist
Save it as locd - that's right, no extension. Just locd. SSH into your phone and place it in the /usr/sbin directory.

Next, copy/paste this code into another text document:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>Label</key>
	<string>com.ikyo.loc.Startup</string>
	<key>UserName</key>
	<string>root</string>
	<key>Program</key>
	<string>/usr/sbin/locd</string>
	<key>RunAtLoad</key>
	<true/>
</dict>
</plist>
Save it as com.ikyo.loc.Startup.plist and place it in the /System/Library/LaunchDaemons directory. Reboot, and SSH will no longer affect assisted GPS.

The code above is all Ikyo's, of course - so a big thank you to him for posting it!
 
It may have worked for you, but any chance we can still get a writeup? I'd love to see a fix for this.
Create each of those files in a text editor. Remember the files are locd and com.ikyo.loc.Startup.plist (no .txt at the end of those files).

Copy locd to /usr/sbin

Copy com.ikyo.loc.Startup.plist to /System/Library/LaunchDaemons

ssh into your phone, and change the permissions on locd: chmod +x /usr/sbin/locd

While you're ssh'd into the phone, run /usr/sbin/locd ... it'll take 25 seconds. If you did everything correctly your location services will work right again.

If all the above works, reboot your phone, and verify that it works properly.
 
Create each of those files in a text editor. Remember the files are locd and com.ikyo.loc.Startup.plist (no .txt at the end of those files).

Copy locd to /usr/sbin

Copy com.ikyo.loc.Startup.plist to /System/Library/LaunchDaemons

ssh into your phone, and change the permissions on locd: chmod +x /usr/sbin/locd

While you're ssh'd into the phone, run /usr/sbin/locd ... it'll take 25 seconds. If you did everything correctly your location services will work right again.

If all the above works, reboot your phone, and verify that it works properly.

I have an AT&T 3G microcell tower, and the code didn't work for me. Is there more or different code for the microcell towers? Thanks for all your help!!
 
Bringing up a dead topic here, but OpenSSH seems to effect WiFi as well. I was having trouble connecting to WiFi networks that required a login such as hotels. I uninstalled OpenSSH and it works fine now. Is there any fix for this? Thanks.
 
I haven't seen any issues with my home network. Can you give us any more information as was it WEP/WPA/etc.
 
This issue has suddenly appeared for me now. With openSSH installed my phone can no longer locate me inside buildings, where it could before (presumably using the router location). And now I struggle to connect to certain wifi networks. Settings will say I'm connected and I'm assigned an IP address but the wifi symbol doesn't appear and it will take a minute or so to connect, sometimes not connecting at all. Removing openSSH stops this behaviour and installing it again brings it back. I'm going to email Saurik about this.
 
This issue has suddenly appeared for me now. With openSSH installed my phone can no longer locate me inside buildings, where it could before (presumably using the router location). And now I struggle to connect to certain wifi networks. Settings will say I'm connected and I'm assigned an IP address but the wifi symbol doesn't appear and it will take a minute or so to connect, sometimes not connecting at all. Removing openSSH stops this behaviour and installing it again brings it back. I'm going to email Saurik about this.

I had posted this exact same issue few weeks back. No one responded. I don't know about wifi connectivity but my phone does not locate me reliably when I am in my office building and I sit on 8th floor. also, I don't have any wifi in my office.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.