Automatic FireEagle updates via iPhone Google Maps 'Locate Me'

The following instructions will setup your Jailbroken iPhone to update your FireEagle location every 5 minutes. While Navizon provides this same feature, I’ve been less than impressed with it’s accuracy . This method uses both Skyhook and the Google Maps ‘Locate Me’ cell-tower-triangulation method, which are much more accurate than Navizon in my recent tests.

Prerequisites

  • Jailbroken 1.1.x iPhone
  • OpenSSH installed on iPhone
  • A computer on the same subnet as your iPhone
  • FireEagle invite
    • If you don’t have one, ask @firebot nicely.

Step 1: Disable Sleep

  • Settings -> General -> Set Auto-Lock to ‘Never’
    • This is to ensure the SSH connection we’ll establish in Step 3 isn’t terminate. You may revert this setting after following these instructions.

Step 2: Determine your iPhone’s IP Address

  • Settings -> Wi-Fi
    • Tap the blue arrow to the right of the wireless network with the check by it

Step 3: SSH into your iPhone

Open Terminal (/Applications/Utilities/Terminal.app) and run the following:

ssh root@YOUR_IPHONE_IP

Your password is ‘alpine’ unless you’ve changed it

Step 4: Download needed files

mkdir -p bin/fireeagle
cd bin/fireeagle
curl -O http://ericasadun.com/ftp/TUAW/findme/authcheck
curl -O http://ericasadun.com/ftp/TUAW/findme/authtoken
curl -O http://ericasadun.com/ftp/TUAW/findme/firefindme
curl -O http://ericasadun.com/ftp/TUAW/findme/pingwifi

Step 5: Create wrapper script

cat > /var/root/bin/fireeagle/firewrapper << EOF
date > /var/log/fire.log
/var/root/bin/fireeagle/pingwifi
/bin/sleep 7 
/var/root/bin/fireeagle/firefindme -g -d -F >> /var/log/fire.log
/var/root/bin/fireeagle/firefindme -k -d -F >> /var/log/fire.log
exit 0
EOF

Step 6: Set executable bit on all files

chmod a+x /var/root/bin/fireeagle/*

Step 7: Authenticate with FireEagle

/var/root/bin/fireeagle/authtoken

This will open a MobileSafari window. Login to your FireEagle account and allow TrackMe to update your location. Then run:

/var/root/bin/fireeagle/authcheck

Step 8: Test!

/var/root/bin/fireeagle/firewrapper

After several seconds, you should be returned to a shell prompt. Now visit FireEagle’s My Location page and login. You should see:

Fire Eagle last spotted you less than a minute ago at LOCATION using TrackMe.

If not, please start over at Step 4. Something’s gone wrong.

Step 9: Steup LaunchDaemon to ping FireEagle every 5 minutes

cat > /Library/LaunchDaemons/com.fireeagle.ping.plist << EOF
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>Label</key>
    <string>com.fireeagle.ping</string>
    <key>ProgramArguments</key>
    <array>
      <string>/var/root/bin/fireeagle/firewrapper</string>
    </array>
    <key>RunAtLoad</key>
    <false/>
    <key>StartInterval</key>
    <integer>300</integer>
  </dict>
</plist>
EOF
launchctl load /Library/LaunchDaemons/com.fireeagle.ping.plist

You’re Finished!

That should do it! Please let me know via twitter (@jnewland) or in the comments if you have any problems / suggestions! Big thanks to Erica Sadun for writing the iPhone tools used to make this happen!

Comments

Leave a response

  1. Jesse Newland had this to say Thu, 22 May 2008 13:27:00 GMT

    Whoops, comments were disabled for a while. They’re back on now.

  2. Theatons Toys had this to say Wed, 28 May 2008 12:27:14 GMT

    Way cool ! I’m new to modding the iphone and been searching for this information for ages. Thanks very much :)

  3. Martin Dufort had this to say Thu, 29 May 2008 14:50:14 GMT

    Hi Jesse:

    This is another step in the right direction of providing ubiquitous location updates from the iPhone. Very nice work.

    I’ll try it out and blog about it. Happy location reporting – Martin

  4. Thomas BARTHELET had this to say Wed, 04 Jun 2008 16:56:32 GMT

    This sounds great! Do you think this could be somehow adapted to WM devices?

  5. Lee had this to say Wed, 25 Jun 2008 02:25:11 GMT

    Wow. Could you make this a little more complicated?

  6. Marty had this to say Wed, 25 Jun 2008 02:42:37 GMT

    Just got my FE invite today, and set this up. Awesome. Until I got home and skyhook thinks I’m on the other side of the city. ::) I submitted my access points to them, so hopefully I can turn this back on soon. Thanks for the instructions!

  7. concaf had this to say Wed, 25 Jun 2008 12:07:21 GMT

    just tried this out, worked great. Perfectly bulletproof process.

  8. Malte had this to say Thu, 26 Jun 2008 08:30:47 GMT

    works great! Thanks!

  9. Marty had this to say Tue, 01 Jul 2008 01:17:26 GMT

    Is there an explanation of the command line args for firefindme anywhere? I couldn’t find them on sadun’s site, but maybe I missed them.

  10. il had this to say Thu, 25 Sep 2008 16:50:37 GMT

    i get 404’s when i try to fetch the scripts…

  11. Suzanne had this to say Wed, 05 Nov 2008 14:14:56 GMT

    Shockingly i managed to sort this out :) thanks for the help!

Your Comments