This is an incredibly potentially useful idea! Nice.
Thanks. I am close to having a version that also includes the gps location of the nokia. It will turn on the gps at boot and wait until the gps gets a valid fix or until some period of time has passed, then call home the ip address info as well as the latitude and longitude. You could then use google earth to narrow down the location of the nokia.
I have taken the suggestions offered earlier and incorporated them in this version of the call home script. In particular
1. The gpsd daemon is launched for 8 minutes to try for a fix, and if a fix is obtained, the gps coordinates are written to the file that is sent home. You can change the variable that determines how long it tries for a fix :-( If you get coordinates, you can paste them into Google Earth to get some idea of where your nokia tablet is.
2. The script is now located in /etc/init.d/network/ instead of in a crond directory, so as soon as the network connection is made, the gpsd daemon is launched, and gps/ip information is sent home using secure copy <scp>in the file .locate-nokia once per session.
3. If a gps fix is not obtained, then the last known gps coordinates are sent.
4. I am not a programmer so this code could really use some help and improvement ( for open source)
Copy the script below into /etc/network/if-up.d/ and chmod 577 the file. If all works as intended, then about 8 minutes after you make a network connection, you should find the file sent to your "home" computer.
[EDITED: I later attached the text file version of the script instead of having to copy and paste the inline version. Just remove the .txt when you cp the script to /etc/network/if-up.d/]
################################################## #######################
#
# (July 23, 2008): adapted from the laptop
# script to call home at http://snippets.dzone.com/posts/show/3693
#
# Script to have Nokia internet tablet "call home" with its
# current ip address and gps coordinates if available.
#
# "Calling home" means securely copying a file with gps/ip info
# to a computer set up to receive this file.
#
#
#======= Notes:============================================ ==============
#
# 1) the version of awk on the N810 does not do exponention
# (e.g. 10^2) so I had to jump through hoops in awk to implement
# a piece of code that called for exponents
#
# 2) This version of the program starts the gpsd daemon and runs
# it for 8 minutes to try for a fix. If it gets a fix, it includes
# the gps coordinates in the file that is sent home. If it doesn't
# get a fix then it sends the most recent coordinates.
# You can change this value by changing the variable $gps_on_time
# below. The running gps data are stored in the file
# /home/user/gps.log. This file consists of NMEA sentences.
# The GPGGA sentences have the latitude, longitude and whether a
# valid fix was obtained.
#
# 3) Assumes that you have a standard install with your home
# directory at /home/user. If not, then change the home directory
# in the variable called $base
#
# 4) The first time it is launched, it will create the file
# /home/user/.last_known as an empty file. If it ever gets a gps
# fix, it will store the current gps coordinates in that file.
#
# 5) Put this script <call_home> in /etc/network/if-up.d/<call_home>
# without the <> brackets, gainroot and chmod 755 the file.
# Whenever the network comes up, the script will execute and send
# the information home after it has tried for a gps fix. Because it
# is squirreled away in this somewhat obscure 3-deep
# directory, I left the name as call_home. If you are particularly
# paranoid, you could rename it something else that would not give
# away its purpose.
#
# 6) The "hidden" file that is sent home is called .locate-nokia.
# This is written locally to your home directory, usually /user/home
#
# 7) There are several variables that you have to define in the ip/system
# section of the script below
#====== set user's home directory; usually /home/user
base="/home/user/"
#====== set period gps tries for fix
gps_on_time="480" #seconds
#====== last known gps coordinates are always written to /home/user/.last_known
#====== check for file's existence; if it exists, leave it alone
#====== if not then create an empty file
if [ -f $base".last_known" ];
then
touch -c $base".last_known"
else
touch $base".last_known"
fi
#====== first remove the previous gps.log data
rm -f $base"gps.log"
#====== start the gpsd daemon, run it for $gps_on_time, then kill it
su user -c /usr/libexec/navicore-gpsd-helper >> $base"gps.log" & sleep $gps_on_time && kill "$(pidof /usr/sbin/gpsd)"
#====== determine whether a valid fix was obtained
#====== The raw latitude and longitude are not very human readable,
#====== so reformat them into deg, min and secs
#====== this is where this implementation of awk lacks exponentiation,
#====== so a tortuous awk workaround was devised (see the for loop)
#====== for doing what should have been 10^(-n) as a series of repeated
#====== divisions by 10
#====== now that latitude and longitude are in human readable form,
#====== write them to .locate-nokia
echo $latitude >> $base".last_known"
echo $longitude >> $base".last_known"
echo $latitude | awk '{print $1" "$3" "$5" "$7" <---paste this into GoogleEarth/My Places/Add/Placemark/Latitude"}' >> $base".last_known"
echo $longitude | awk '{print $1" "$3" "$5" "$7" <---paste this into GoogleEarth/My Places/Add/Placemark/Longitude"}' >> $base".last_known"
else
#====== If no fix was obtained, just log that fact with the date to the
#====== /home/user/.fix-failed.log file
#====== Aside: the gps on the NIT is so crappy that it will almost always fail,
#====== but on the odd occasion when then tablet is turned on outside or near an
#====== open window it might get a fix in 8 minutes
date > $base".fix-failed.log"
echo "fix failed, no gps" >> $base".fix-failed.log"
fi
#====== filename to be written to remote location
rfile=".locate-nokia"
#====== remove previous version of file
rm -f $base$rfile
#====== create the file by redirecting date to it; write
#====== current date and time to file to be sent home
date > $base$rfile
#====== write last known gps coordinates
cat $base".last_known" >> $base$rfile
#================================================= ========================
#====== Next check for and run the ip/system related commands ============
#====== These commands gather info to be sent home =======================
#====== YOU HAVE TO DEFINE SOME VARIABLES FOR THIS TO WORK ===============
#====== Leave quotes " " but remove angle brackets <> ====================
static_ip="<put ip address near you for traceroute>"
private_key="<name of your private key for ssh to remote location where file is sent>"
username="<username for scp command>"
remote_ip="<ip address to receive the scp file>"
Some decent thoughts here but I think it's mostly an unworkable problem.
What type of thieves/losses do you expect:
1. Theft of opportunity as a single item - left on a car seat looks like a GPS.
2. Theft of opportunity because it was it was with other luggage.
3. Calculated theft - someone smart enough to know what it is and want it
4. Loss - whoops I left it on the bus/somewhere.
The lojack/call home concept is good but overkill for what is now a $300 device NEW.
I've only been on this forum for about a year and can only remember about two threads of #1, one of #2, zero of #3 and two of #4.
Perhaps one of the best things would be an easily searchable database here of all "stolen" IT's MAC addresses so when one turns up we could search the list. Also post stolen ones to Craigs list comments.
Add that to a log in screen offering a reward and we could probably cover 95% of the cases.
If we wanted, SSU could be made to report an identifying number of the device to the Nokia servers (e.g. wlan id). And Nokia servers would be able to store and check that against stolen devices ids and then report the ip addresses. But at least I would feel sending the wlan ids as a privacy issue.
Some decent thoughts here but I think it's mostly an unworkable problem.
What type of thieves/losses do you expect:
1. Theft of opportunity as a single item - left on a car seat looks like a GPS.
2. Theft of opportunity because it was it was with other luggage.
3. Calculated theft - someone smart enough to know what it is and want it
4. Loss - whoops I left it on the bus/somewhere.
The lojack/call home concept is good but overkill for what is now a $300 device NEW.
I've only been on this forum for about a year and can only remember about two threads of #1, one of #2, zero of #3 and two of #4.
Perhaps one of the best things would be an easily searchable database here of all "stolen" IT's MAC addresses so when one turns up we could search the list. Also post stolen ones to Craigs list comments.
Add that to a log in screen offering a reward and we could probably cover 95% of the cases.
In any circumstance, keep a good backup.
Why not try all of these? The more information there is about its whereabouts, the better. A simple login screen as you say would go a long way toward at least deterring the the person who ends up with your Nokia from "easily" gaining access to any information that you have on there.
I think the MAC address database is an interesting one, but it has some privacy issues involved if every time I make a network connection my ip address shows up on someone else's server (it's different if it shows up on MY server).
As far as it being relatively cheap, I agree that it's not like when your laptop gets stolen, but hey, even cheap cell phones have mechanisms to "lock" them down when they get stolen mostly as a deterrent to losing the information on the phone.
At any rate, all good ideas for at least making an attempt to retrieve the device if it ever gets lifted.
As far as it being relatively cheap, I agree that it's not like when your laptop gets stolen, but hey, even cheap cell phones have mechanisms to "lock" them down when they get stolen mostly as a deterrent to losing the information on the phone.
At any rate, all good ideas for at least making an attempt to retrieve the device if it ever gets lifted.
Yeh, I forgot to mention, as posted in another thread, the machine should be wiped as soon as it's determined to be stolen (3 wrong password or something).