Reply
Thread Tools
Posts: 56 | Thanked: 11 times | Joined on Jan 2010
#31
Originally Posted by boxhead View Post
What happens when you run:

python /usr/sbin/sms.py --sendinfo phone_number 120 000 "alert"
(replace phone_number with your #)

My GPS icon appears. it's flashing, but no solid connection after 1 minute
 
Posts: 26 | Thanked: 11 times | Joined on Nov 2009
#32
Originally Posted by AlexV12 View Post
My GPS icon appears. it's flashing, but no solid connection after 1 minute
Sometimes, you'll have to wait 5-10 min. But it's good that the GPS is flashing -- we know the python script is working. We just need to get the banana script running properly on all devices, which Sonny is working on.
 
Caballero's Avatar
Posts: 89 | Thanked: 14 times | Joined on Apr 2009 @ Somewhere out West
#33
They have something like this in Firefox https://addons.mozilla.org/en-US/firefox/addon/51329/ Who wants to try and report back if its any good. I will try it in Minefield or Fennec mobile if they have for it.
 
Posts: 200 | Thanked: 300 times | Joined on Nov 2009 @ The Netherlands
#34
Originally Posted by boxhead View Post
This script was born out of my rage of having my N900 stolen earlier this year. I wanted a simple SMS-based solution for retrieving my new N900 if it were ever stolen again. I used some python code for SMS send/recv and GPS tracking from the wiki and put it together for this.

...
I made a two part Python script for the CLI (control app & background daemon) which does just the same and more...

Control app:

Code:
Nokia-N900:~# smscon
== smscon - remote control utility ==
Options:
  -start   : start smscon
  -stop    : stop smscon
  -boot    : set start at device boot
  -unboot  : remove start at device boot
  -status  : get smscon_daemon status
  -log     : show the logfile
  -clear   : erase the log file
  -help    : this help menu
It also creates a log file:

Code:
Nokia-N900:~# smscon -log
(Tue Aug 17 13:28:05 2010) START: smscon_daemon active
(Tue Aug 17 13:28:05 2010) DAEMON: no arguments passed for daemon
(Tue Aug 17 13:28:05 2010) DAEMON: reading valid IMSI code (XXXXXXXXXXXXXXX) from file
(Tue Aug 17 13:28:05 2010) DAEMON: authorized IMSI code found
(Tue Aug 17 13:28:05 2010) DAEMON: smscon autoloads at boot
I can send specific SMS messages to my phone and so can control my phone with it.

The current functions are: reboot, shutdown, show remaining battery charge, send current gps coordinates, send frontcam picture to my own server, set up ssh connection with available connection (WLAN/GPRS) to my own server)
 
Posts: 45 | Thanked: 17 times | Joined on Mar 2010
#35
Originally Posted by boxhead View Post
What does 'export' do? Also, is it working with upstart now?
No, not yet. I'll let you know when it does

If so, could you attach your file to the post so I can test it and update the zip. Thx.
Don't take this the wrong way, but why are you using .zip files? The better way to do it would be with tar:

tar cvjf thief-be-found.tar.gz /etc/event.d/banana /usr/sbin/sms*

Which would package them all up in a friendly manner so a user can unpack with this:

tar xvjf thief-be-found.tar.gz -C /

No need for changing directories or chmod.

@digitalvoid:
Yeah, well I drive a ferrari and shag a supermodel, fancy sharing your code or what?
 
Posts: 4,556 | Thanked: 1,624 times | Joined on Dec 2007
#36
Originally Posted by Sonny_Jim View Post
The only issue I see is if the thief decides to wipe the OS, but I don't think the average crim is going to be bothered enough to do that, probably too busy looking through all your photo's and music!

But good work! Even if it saves just one N900 from the crack heads then it has to be worth it.
The positive and negative side of having an N900..

Most people can't use it. Especially if they're looking for the user friendliness of an iPhone or Android device. I keep forgetting how to reflash my device myself once in a while.

Heck install openssh, create a reverse tunnel and you'll be able to mess with the thief's head by using command line commands to make the device do what you want. =P
__________________
Originally Posted by ysss View Post
They're maemo and MeeGo...

"Meamo!" sounds like what Zorro would say to catherine zeta jones... after she slaps him for looking at her dirtily...
 
Posts: 56 | Thanked: 11 times | Joined on Jan 2010
#37
Originally Posted by digitalvoid View Post
I made a two part Python script for the CLI (control app & background daemon) which does just the same and more...

Control app:

Code:
Nokia-N900:~# smscon
== smscon - remote control utility ==
Options:
  -start   : start smscon
  -stop    : stop smscon
  -boot    : set start at device boot
  -unboot  : remove start at device boot
  -status  : get smscon_daemon status
  -log     : show the logfile
  -clear   : erase the log file
  -help    : this help menu
It also creates a log file:

Code:
Nokia-N900:~# smscon -log
(Tue Aug 17 13:28:05 2010) START: smscon_daemon active
(Tue Aug 17 13:28:05 2010) DAEMON: no arguments passed for daemon
(Tue Aug 17 13:28:05 2010) DAEMON: reading valid IMSI code (XXXXXXXXXXXXXXX) from file
(Tue Aug 17 13:28:05 2010) DAEMON: authorized IMSI code found
(Tue Aug 17 13:28:05 2010) DAEMON: smscon autoloads at boot
I can send specific SMS messages to my phone and so can control my phone with it.

The current functions are: reboot, shutdown, show remaining battery charge, send current gps coordinates, send frontcam picture to my own server, set up ssh connection with available connection (WLAN/GPRS) to my own server)
perhaps ik would be good to combine your programs? sounds like you could help each other allot!
 
Posts: 45 | Thanked: 17 times | Joined on Mar 2010
#38
You are far, far more likely to have a cell connection than a wifi connection if the phone is stolen, so it's best to use the GSM side rather than relying on the thief to connect to the internet.
 
Posts: 26 | Thanked: 11 times | Joined on Nov 2009
#39
Originally Posted by Sonny_Jim View Post
Don't take this the wrong way, but why are you using .zip files? The better way to do it would be with tar:

tar cvjf thief-be-found.tar.gz /etc/event.d/banana /usr/sbin/sms*

Which would package them all up in a friendly manner so a user can unpack with this:

tar xvjf thief-be-found.tar.gz -C /

No need for changing directories or chmod.
That works great. Maybe archiving it this way will fix the possible file formatting issues. I've updated the OP with the new file.
 
Posts: 45 | Thanked: 17 times | Joined on Mar 2010
#40
There's other issues as well, like you don't need the tmp file. Here is what I have at the moment:

#!/bin/sh
VALID_IMSI=
SEND_TEXT_INTERVAL=120.0
HOME_PHONE=
TIME_WAIT_TO_CALL=60
ALERT_CODE=""
imsiNum=`dbus-send --system --type=method_call --print-reply --dest=com.nokia.phone.SIM /com/nokia/phone/SIM Phone.Sim.get_imsi | grep string | cut -f 2 -d '"'`
echo $imsiNum
if [ $imsiNum -ne $VALID_IMSI ]; then
python /usr/sbin/sms.py --sendinfo $HOME_PHONE $SEND_TEXT_INTERVAL $imsiNum $ALERT_CODE
python /usr/sbin/sms.py --listen 0 $SEND_TEXT_INTERVAL $imsiNum $ALERT_CODE &
sleep $TIME_WAIT_TO_CALL
run-standalone.sh dbus-send --system --type=method_call --print-reply --dest=com.nokia.csd.Call /com/nokia/csd/call com.nokia.csd.Call.CreateWith string:"$HOME_PHONE" uint32:0
else
python /usr/sbin/sms.py --listen 0 $SEND_TEXT_INTERVAL $imsiNum $ALERT_CODE &
fi


Notice that you don't need to write/read a tmpfile, you can just use a backtick. But for some really annoying reason it still isn't working,

p.s You didn't just copy and paste my tar command? I think you might have picked up sms-manager with the wildcard if you did.
 
Reply


 
Forum Jump


All times are GMT. The time now is 09:54.