Active Topics

 


Reply
Thread Tools
Posts: 53 | Thanked: 40 times | Joined on May 2009 @ Brooksville, Florida
#21
should be trivial to setup a python script that sends a UDP stream of GPS data somewhere
 
Posts: 44 | Thanked: 16 times | Joined on Mar 2010
#22
The GPS tracker is only using the last known GPS data, right? - or is GPS turned on in the scripts?

If not, would it then be possible to turn on the GPS with out any icon showing up on the desktop, so you could track the phone, even if the thief is not using GPS applications on the phone?
Otherwise it could be hard tracking the phone with some old GPS data.
 
grog's Avatar
Posts: 546 | Thanked: 85 times | Joined on Feb 2008 @ Winnipeg, Canada
#23
Originally Posted by benh_n900 View Post
Sorry - I have been away and without decent internet access for the last month...
No need to apologize. We all unfortunately have other stuff in our lives to do

The delete button doesn't delete it? What browser are you using?
I just tried both Firefox 3.6.8 & IE 6.0 under Windows, neither work. Haven't tried it at home on my Linux box yet.

This is the password you set for the device (optional) when you press the actions button.
Ah, that's what I was missing, to set it in the Actions. Works now, it updates. The SMS & email functions work really well, but I get errors when I check 'Get Location' :

Code:
$ /home/opt/n900tracker/getactions.py
Call http://tracking.isgreat.org/api?IMEI=MYIMEI&IMSI=MYIMSI&Pass=MYPASSWORD
mode is location
Checking if location was requested
Starting Location finder
Getting Location from GPS
Call http://ws.geonames.org/findNearestAddress?lat=49.8794868775&lng=-97.1204716712
Traceback (most recent call last):
  File "/opt/n900tracker/whereami.py", line 82, in <module>
    addr=get_addr_from_xml(addrxml)
  File "/opt/n900tracker/whereami.py", line 14, in get_addr_from_xml
    addressobj=xmldoc.firstChild.childNodes[1]
IndexError: list index out of range
Checking if ssh was requested
Checking if SMS was requested
When I hit the URL from the previous command:
Code:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
      
<geonames/>
Is all that's returned, so I'm guessing it's a site/API issue(?)

Next I'm going to play around with activating the ssh tunnel, THAT's a kewl option.

TX
__________________
GROG!
N900 | ZAGG Body Armour | 16Gb A-DATA micro-sd
N810 | 2 x Patriot 8gb mini-SD | Boxwave Crystal Clear SS | Black Aluminum case | OTG dongle
N800 | 2 x 8gb OCX SD | Boxwave Anti-glare SS | PDAir book-style case
Holux M-1200 bluetooth GPS | iGo 4-row bluetooth keyboard | Linksys USB 10/100 ethernet | Plantronics Voyager 855 BT Headset
 

The Following User Says Thank You to grog For This Useful Post:
Posts: 44 | Thanked: 16 times | Joined on Mar 2010
#24
Originally Posted by grog View Post
...
Code:
Getting Location from GPS
Call http://ws.geonames.org/findNearestAddress?lat=49.8794868775&lng=-97.1204716712
Traceback (most recent call last):
  File "/opt/n900tracker/whereami.py", line 82, in <module>
    addr=get_addr_from_xml(addrxml)
  File "/opt/n900tracker/whereami.py", line 14, in get_addr_from_xml
    addressobj=xmldoc.firstChild.childNodes[1]
IndexError: list index out of range
Checking if ssh was requested
Checking if SMS was requested
When I hit the URL from the previous command:
Code:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
      
<geonames/>
Is all that's returned, so I'm guessing it's a site/API issue(?)
TX

The 'findNearestAddress' from geonames.org works only in the US, guess you are not there? But I have modified the 'whereami.py', so it will just return the GPS coordinates, and in the webservice at http://whereismydevice.com/devices, you will then have a link to Google Maps for this position. Works fine for me here in Denmark
 

The Following User Says Thank You to n900-dk For This Useful Post:
grog's Avatar
Posts: 546 | Thanked: 85 times | Joined on Feb 2008 @ Winnipeg, Canada
#25
Originally Posted by n900-dk View Post
The 'findNearestAddress' from geonames.org works only in the US, guess you are not there?
Nope. But close, Canada

But I have modified the 'whereami.py', so it will just return the GPS coordinates, and in the webservice at http://whereismydevice.com/devices, you will then have a link to Google Maps for this position. Works fine for me here in Denmark
Ooo!! Shiny. Gimmee! Gimmee! Please! PLEASE!!

One more thing. Running getactions.py while selecting the ssh tunnel action gave the error "/bin/sh: ssh.sh not found". This led me to make a few corrections to the getactions.py script so the path would be prepended properly:

Code:
$ diff getactions.py getactions.py.001
45c45
<    script += "whereami.sh"
---
>    script = "whereami.sh"
54c54
<    script += "ssh.sh"
---
>    script = "ssh.sh"
I also changed the call to the repeating location script, although I hadn't tested that yet but it seemed right. As well in the ssh.sh script I had to change the output redirection from /dev/NULL to /dev/null.

After that, works beautifully.
Much appreciated.
TX
__________________
GROG!
N900 | ZAGG Body Armour | 16Gb A-DATA micro-sd
N810 | 2 x Patriot 8gb mini-SD | Boxwave Crystal Clear SS | Black Aluminum case | OTG dongle
N800 | 2 x 8gb OCX SD | Boxwave Anti-glare SS | PDAir book-style case
Holux M-1200 bluetooth GPS | iGo 4-row bluetooth keyboard | Linksys USB 10/100 ethernet | Plantronics Voyager 855 BT Headset
 
Posts: 44 | Thanked: 16 times | Joined on Mar 2010
#26
Originally Posted by grog View Post
Ooo!! Shiny. Gimmee! Gimmee! Please! PLEASE!!
Sure, see attached files

Originally Posted by grog View Post
One more thing. Running getactions.py while selecting the ssh tunnel action gave the error "/bin/sh: ssh.sh not found".

Code:
$ diff getactions.py getactions.py.001
45c45
<    script += "ssh.sh"
---
>    script = "ssh.sh"
54c54
You are right, actually I just typed in the whole path for the scripts like:
script = "/home/opt/n900tracker/ssh.sh" but maybe the + will do the trick..
Attached Files
File Type: zip whereami_and_getactions.zip (2.0 KB, 125 views)
 

The Following User Says Thank You to n900-dk For This Useful Post:
Posts: 82 | Thanked: 44 times | Joined on Feb 2010
#27
Originally Posted by n900-dk View Post
The 'findNearestAddress' from geonames.org works only in the US, guess you are not there? But I have modified the 'whereami.py', so it will just return the GPS coordinates, and in the webservice at http://whereismydevice.com/devices, you will then have a link to Google Maps for this position. Works fine for me here in Denmark
Aha that's good to know ... The address lookup isn't that important when you are looking at the position through the webservice, but it's nice if you are sent it by SMS, because then you get a rough idea of the address right there in the SMS. If anyone knows of a webservice that will do reverse geocoding globally and has an easy API to integrate, please let me know, or update the script and post it, then I will update the script on the site.

Also Grog - thanks for noticing the script error in getactions.py - I have updated the scripts on the site to have += instead of = as per your diff. I have also changed NULL to null in ssh.sh and whereami.sh

Cheers,

Ben
__________________
http://www.whereismydevice.com - Recover your device if lost/stolen

http://jqueryinreallife.blogspot.com - Comedy jQuery blog
 
Posts: 92 | Thanked: 8 times | Joined on Mar 2010
#28
Hi,

Are you ever gonna give the code for the site up so we can run it on our own servers?
 
Posts: 515 | Thanked: 193 times | Joined on Oct 2009
#29
this is a great idea! - wish we could get it as a deb - it looks really complicated to install.
 
Posts: 82 | Thanked: 44 times | Joined on Feb 2010
#30
Originally Posted by Devrim View Post
Hi,

Are you ever gonna give the code for the site up so we can run it on our own servers?
I don't have plans to, but if you want to implement the same for yourself it's not that complicated to create - it just waits for the n900 to load the api page (which is a simple http get, same as you would do in a browser), logs the call and returns a list of actions.
__________________
http://www.whereismydevice.com - Recover your device if lost/stolen

http://jqueryinreallife.blogspot.com - Comedy jQuery blog
 
Reply


 
Forum Jump


All times are GMT. The time now is 07:00.