SMSCON
(adding headers to doc) |
|||
Line 5: | Line 5: | ||
SMSCON is a two part Python script running in CLI; smscon & smscon_daemon. SMSCON is the CLI control part and smscon_daemon is the "running in the background" part. The configuration file for all the user settings is smscon_config. | SMSCON is a two part Python script running in CLI; smscon & smscon_daemon. SMSCON is the CLI control part and smscon_daemon is the "running in the background" part. The configuration file for all the user settings is smscon_config. | ||
- | WHAT CAN IT DO | + | ==WHAT CAN IT DO== |
SMSCON can: | SMSCON can: | ||
Line 26: | Line 26: | ||
- | INSTALLATION | + | ==INSTALLATION== |
SMSCON needs the following packages installed on your device to install and run: | SMSCON needs the following packages installed on your device to install and run: | ||
Line 40: | Line 40: | ||
Also you need a fixed IP address on your remote server for the reverse-ssh (port 22) connection, if you want to use the 'Remoteon' / 'Remoteoff' command. | Also you need a fixed IP address on your remote server for the reverse-ssh (port 22) connection, if you want to use the 'Remoteon' / 'Remoteoff' command. | ||
- | USAGE | + | ==USAGE== |
SMSCON is triggered by a SMS message with a predefined known command and then will execute the task in the background. | SMSCON is triggered by a SMS message with a predefined known command and then will execute the task in the background. | ||
Line 83: | Line 83: | ||
SMSCON is intended for people who have Python programming / Linux experience so you can adjust the script to your own needs. | SMSCON is intended for people who have Python programming / Linux experience so you can adjust the script to your own needs. | ||
- | + | =REMOTE SSH CONNECTION= | |
When the (reverse-)SSH connection is made (default command 'Remoteon') you can from the server side (your own server) connect to your Nokia device with the following command: | When the (reverse-)SSH connection is made (default command 'Remoteon') you can from the server side (your own server) connect to your Nokia device with the following command: | ||
Line 91: | Line 91: | ||
</pre> | </pre> | ||
- | + | =FIRST TIME USAGE= | |
The first time start SMSCON with the following command (smscon -init); it creates a new config file (usr/bin/smscon_config) which you must edit to your own needs (change all "xxxxxxx"'s). | The first time start SMSCON with the following command (smscon -init); it creates a new config file (usr/bin/smscon_config) which you must edit to your own needs (change all "xxxxxxx"'s). | ||
Line 117: | Line 117: | ||
(Thu Sep 2 22:10:25 2010) DAEMON: no test arguments passed for daemon | (Thu Sep 2 22:10:25 2010) DAEMON: no test arguments passed for daemon | ||
</pre> | </pre> | ||
- | TESTERS NEEDED | + | |
+ | =TESTERS NEEDED= | ||
I like to hear if it works for you. I only could test it with two Vodafone SIM cards from The Netherlands, I want to know if it also | I like to hear if it works for you. I only could test it with two Vodafone SIM cards from The Netherlands, I want to know if it also | ||
works with other cards & networks in other countries... | works with other cards & networks in other countries... | ||
- | CURRENT VERSION: v0.3.0 | + | =CURRENT VERSION: v0.3.0= |
* bug fixes, bug fixes, bug fixes in data connection handeling (I hope, you test it) | * bug fixes, bug fixes, bug fixes in data connection handeling (I hope, you test it) | ||
Line 128: | Line 129: | ||
- | CHANGES FROM v0.2.4 | + | =CHANGES FROM v0.2.4= |
* now email sending & ssh connection -only works- through GPRS connection because GPRS is always available. (a random WLAN access only works if preconfigured) | * now email sending & ssh connection -only works- through GPRS connection because GPRS is always available. (a random WLAN access only works if preconfigured) | ||
Line 141: | Line 142: | ||
- | FUTURE DEVELOPMENT | + | ==FUTURE DEVELOPMENT== |
* smscon will be set to load at boot at installation of smscon; | * smscon will be set to load at boot at installation of smscon; | ||
Line 155: | Line 156: | ||
- | DISCLAMER: If this software does harmfull/unwanted things (not to be expected) to your device in any way | + | =DISCLAMER:= |
+ | If this software does harmfull/unwanted things (not to be expected) to your device in any way the developers can't be responsible for this. | ||
[[Software]] | [[Software]] | ||
[[N900]] | [[N900]] |
Revision as of 09:04, 9 September 2010
DESCRIPTION
SMSCON is a n900 complete control utility by sending sms messages to it. This is handy in case you can't find your phone (it's lost or stolen).
SMSCON is a two part Python script running in CLI; smscon & smscon_daemon. SMSCON is the CLI control part and smscon_daemon is the "running in the background" part. The configuration file for all the user settings is smscon_config.
Contents |
WHAT CAN IT DO
SMSCON can:
* autoload at boot (when set); when device reboots it loads smscon_daemon in the background. * creates a log file (on the device) * detect SIM card change and sends new phonenumber and IMSI code (returns SMS) to other known mobile number; if somebody has stolen your phone and put his/hers own SIM card in it. * send current GPS location coordinates (returns SMS). * reboot the phone; only works if your SIM card hasn't a lock code. * shutdown the phone. * open a reverse ssh connection to your own server (GPRS connection); control the device at CLI level from your own home. * email a frontcam picture to your email address (GPRS connection); to see where your phone is or who is using it. * send the current remaining battery charge (returns SMS). * make the phone call you; you can listen where your phone is (returns phonecall)
INSTALLATION
SMSCON needs the following packages installed on your device to install and run:
apt-get install maemo-python-device-env (the Python language package) apt-get install python-location apt-get install pexpect apt-get install gstreamer-tools apt-get install openssh
The three files (smscon, smscon_daemon & smscon_config) are placed in the /usr/bin directory.
Also you need a fixed IP address on your remote server for the reverse-ssh (port 22) connection, if you want to use the 'Remoteon' / 'Remoteoff' command.
USAGE
SMSCON is triggered by a SMS message with a predefined known command and then will execute the task in the background. If so it will send a reply SMS with the information.
The default commands are:
Nokia-N900:~# smscon -sms Check Reboot Poweroff Power Location Remoteon Remoteoff Camera Call
These commands can be altered in smscon_config file.
Options for smscon are:
Nokia-N900:~# smscon == smscon v0.3.0 - Nokia N900 remote control utility == Options: -init : create smscon_config -start : start smscon_daemon -stop : stop smscon_daemon -status : get smscon_daemon status -log : show the log file -clear : erase the log file -sms : show sms commands -help : this help menu Special options: -boot : start smscon_daemon at device boot -unboot : remove start of smscon_daemon at device boot -reset : factory default -imsi : show imsi code file -delete : delete imsi code file
SMSCON is intended for people who have Python programming / Linux experience so you can adjust the script to your own needs.
REMOTE SSH CONNECTION
When the (reverse-)SSH connection is made (default command 'Remoteon') you can from the server side (your own server) connect to your Nokia device with the following command:
ssh -p 8080 localhost -l root
FIRST TIME USAGE
The first time start SMSCON with the following command (smscon -init); it creates a new config file (usr/bin/smscon_config) which you must edit to your own needs (change all "xxxxxxx"'s). I use Putty / WinSCP on Windows for this. Don't use a Windows editor! The second time you start smscon (smscon -start) it loads the configured user settings file and is now active. It then stores your valid IMSI code in a file (smscon_code) if the file doesn't exists. When later a new SIM card is inserted the new IMSI code is verified with the code in the stored file. This is the "SIM card change detect".
Nokia-N900:~# smscon -init creating new user config file in "/usr/bin/smscon_config". WARNING: first edit smscon_config before using smscon! Nokia-N900:~# smscon -start smscon_daemon started. Nokia-N900~# smscon -log (Thu Sep 2 22:10:24 2010) SMSCON: smscon_daemon active (Thu Sep 2 22:10:25 2010) DAEMON: user settings succesfully loaded from "smscon_config" file (Thu Sep 2 22:10:25 2010) DAEMON INIT: initalizing new IMSI file with current valid IMSI code (Thu Sep 2 22:10:25 2010) DAEMON: current valid IMSI code (XXXXXXXXXXXXXXX) saved to file (Thu Sep 2 22:10:25 2010) DAEMON: authorized IMSI code found (Thu Sep 2 22:10:25 2010) DAEMON WARNING: smscon doesn't autoload at boot (Thu Sep 2 22:10:25 2010) DAEMON: no test arguments passed for daemon
TESTERS NEEDED
I like to hear if it works for you. I only could test it with two Vodafone SIM cards from The Netherlands, I want to know if it also works with other cards & networks in other countries...
CURRENT VERSION: v0.3.0
* bug fixes, bug fixes, bug fixes in data connection handeling (I hope, you test it) * at the moment smscon can only connect to a smtp server (for sending the email) without secure authentication. (will be solved in the future I hope).
CHANGES FROM v0.2.4
* now email sending & ssh connection -only works- through GPRS connection because GPRS is always available. (a random WLAN access only works if preconfigured) * when you install smscon package there is no more 'smscon_config' template file installed; the first time you start smscon, it creates a new config file at /usr/bin/smscon_config which you must edit. The next time you start smscon is loads this edited config file and is then active. (see also FIRST TIME USAGE) * when installing future updates of smscon settings file is not deleted. * command smscon -reset resets your complete configuration to the state after your smscon package installation. (deleting boot, config, code & log file) * smscon_daemon will stop if no SIM card is found. (smscon has no use then) * For smscon to work properly set in Nokia menu Settings --> Internet connection to 'Any connection'.
FUTURE DEVELOPMENT
* smscon will be set to load at boot at installation of smscon; this can later be undone with the -unboot option if needed. * new commands: "Trackon" / "Trackoff"; smscon will continually send (after x time) a sms with current gps coordinates. * smscon will lock the device after first valid sms command is received (user configurable). * rewriting connection handeling by smscon. * storing all smscon_config user variables in gconf database. * saving the phone number where you send your sms messages from in smscon_config (in VALIDSENDERNUMBER). At the moment it is lost after reboot and uses the initial number stored in VALIDSENDERNUMBER.
DISCLAMER:
If this software does harmfull/unwanted things (not to be expected) to your device in any way the developers can't be responsible for this.