Active Topics

 



Notices


Reply
Thread Tools
Posts: 48 | Thanked: 85 times | Joined on Feb 2010
#1
Dear all,
I want to share a little bash application to have a anti-theft when we leave the phone charging. I hope somebody have ideas to make it better. If the phone is disconnected by the charger while the application is active the alarm start to sound.
The application sets to the maximum the volume before to play the sound.

There are 3 files, the police sound (it is a .wav) and 2 bash files (one the main program and the other is the checking battery charging status program). You need to set the correct directory in the main to call the subroutine file and to play correctly the sound.
I put they in ~/MyDocs/Appl_conf (if you do the same you don't need to modify the programs).

To call the application and to turn-off it I set two button in Cmd_shortcut:

Title: Alarm ON
Command: sh ~/MyDocs/Appl_conf/allarme.sh

Title: Alarm OFF
Command: kill `ps | grep allarme.sh | awk '{print $1}'`

link:
http://ilmanowar.altervista.org/stable/allarmeN900.zip

What it needs to be improved:
1) Make it start automatically. Make it stop automatically when recognize the owner (bluetooth? Look code?).
2) Disable the shut-down while the alarm is sounding.


Cheers.

Last edited by Ilmanowar; 2012-06-08 at 10:48. Reason: add external link
 

The Following 7 Users Say Thank You to Ilmanowar For This Useful Post:
Posts: 18 | Thanked: 7 times | Joined on Jun 2012
#2
i would suggest to add a vocal message (e.g. "this alarm comes from a stolen phone!!") to the police sound.

thank you for your efforts
 
Posts: 48 | Thanked: 85 times | Joined on Feb 2010
#3
I add "Error-led-pattern" and the lock-screen when the charger cable is disconnected and the alarm is active.

I created a script for the "Alarm off" button (it need more commands to restore the led pattern).

I changed the name in the script of the alarm in "allameon.sh" to avoid that sometimes the script "alarm off" kill him self before to kill the alarm script. This can happen because the second contain the name of the first.

@unnome
The personalized message is added through espeak (need to be installed).
The sentence is in .txt file (you can change).

The "Alarm off" button became:

Title: Alarm OFF
Command: sh ~/MyDocs/Appl_conf/stopallarme.sh

And the "Alarm ON" button became:

Title: Alarm ON
Command: sh ~/MyDocs/Appl_conf/allarmeon.sh

The last version is in the same link.

I hope that you enjoy the gadget.

Cheers.

Last edited by Ilmanowar; 2012-06-08 at 23:04.
 
Posts: 1,341 | Thanked: 708 times | Joined on Feb 2010
#4
This is similar feature what was wished here:
http://talk.maemo.org/showthread.php?t=84740

There are many ways to detect if the device is moving, when it should not be: NFC (N9), BT, WLAN, GSM cells, acceleration sensor, charging/usb-cable.

And those features could be also in Smscon.
 
Posts: 48 | Thanked: 85 times | Joined on Feb 2010
#5
To de-activate the alarm:
1)unlock the screen
2)rapidly open cmd_shortcut
2bis)probably you need to unlock the screen again
3)press "Alarm OFF"
 
dr_frost_dk's Avatar
Posts: 1,503 | Thanked: 2,688 times | Joined on Oct 2010 @ Denmark
#6
What about getting access to the device after it is put into charging again? just to make a almost foul proff anti-theft system
 
Reply


 
Forum Jump


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