Jesse Newland

4 Posts tagged with geolocation

How Your Location-Aware iPhone Will Change Your Life

The iPhone is poised to break location-aware apps into the mainstream in a huge way

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

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!

OpenStreetMap

OpenStreetMap is a free editable map of the whole world. It is made by people like you.

Twitter Adds Profile Geolocation API

Need to add support for this to firebot. Awesome.
What is this?