Editing SMSCON
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
Warning: This page is 64 kilobytes long; some browsers may have problems editing pages approaching or longer than 32kb. Please consider breaking the page into smaller sections.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
- | + | '''Please Note: Update for 0.9.18++ is in progress for this page. In particular section "Usage" still needs updates...'''. --[[User:yablacky|yablacky]] 21:00, 12 May 2012 (UTC) | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | Update for 0.9. | + | |
==Introduction== | ==Introduction== | ||
Line 37: | Line 32: | ||
* Looking for commands in received SMS messages. | * Looking for commands in received SMS messages. | ||
- | * Asking a remote command server for commands | + | * Asking a remote command server for commands (available only if you setup and maintain such a server). |
* Sending notifications, responses and query results by SMS and/or by EMAIL. | * Sending notifications, responses and query results by SMS and/or by EMAIL. | ||
- | * Send help about all currently recognized SMS commands. | + | * Send help about all currently recognized SMS commands, e.g. if you've forgotten them. This way you need just to remember the code of one single command (the COM_CHECK command). |
* Supports use of multiple SIM cards. | * Supports use of multiple SIM cards. | ||
- | * Detect SIM card change. | + | * Detect SIM card change. It will send a notification containing the new SIM card's phone number, IMSI code & telecom operator name. This scenario happens if your phone's finder or thief replaces your SIM by his/hers own SIM card. |
- | + | ||
* Optionally turn the phone silent on receiving a known command. | * Optionally turn the phone silent on receiving a known command. | ||
* Stores personal settings encrypted. | * Stores personal settings encrypted. | ||
Line 51: | Line 45: | ||
* Track the phone's GPS location and location changes by let it automatically send repeated notifications in a selectable time interval. | * Track the phone's GPS location and location changes by let it automatically send repeated notifications in a selectable time interval. | ||
* Let front camera take pictures and send them via email notification. With a some luck you may see where your phone is or who is using it. | * Let front camera take pictures and send them via email notification. With a some luck you may see where your phone is or who is using it. | ||
- | |||
* Let the phone make a voice call to your controlling phone. Once the call is established you can listen where your phone is. | * Let the phone make a voice call to your controlling phone. Once the call is established you can listen where your phone is. | ||
* Play a pre- and user-defined sound file (only WAV supported). May be used instead of just let the phone ring and let it say a special message. | * Play a pre- and user-defined sound file (only WAV supported). May be used instead of just let the phone ring and let it say a special message. | ||
Line 75: | Line 68: | ||
* Autoloads at boot. This ensures that SMSCON is active (that means is listening for commands) even after device (re)boot. Autoload is enabled by default during installation of a SMSCON package. | * Autoloads at boot. This ensures that SMSCON is active (that means is listening for commands) even after device (re)boot. Autoload is enabled by default during installation of a SMSCON package. | ||
- | * Create and keep a log file on the device. The log file can be queried remotely by SMS command as well as locally via command line | + | * Create and keep a log file on the device. The log file can be queried remotely by SMS command as well as locally via command line. |
* Reboot the phone. Albeit this is possible it is not generally recommended if your SIM card has a PIN: If nobody enters the PIN correctly, the phone would boot but could not connect to GPRS network. | * Reboot the phone. Albeit this is possible it is not generally recommended if your SIM card has a PIN: If nobody enters the PIN correctly, the phone would boot but could not connect to GPRS network. | ||
* Shutdown the phone. Also just possible but not generally recommended. | * Shutdown the phone. Also just possible but not generally recommended. | ||
Line 177: | Line 170: | ||
All phone numbers should be entered with country prefix. Not only ensures this that SMS are send successfully regardless where your phone actually is located. It further is essential to make phone numbers comparable. | All phone numbers should be entered with country prefix. Not only ensures this that SMS are send successfully regardless where your phone actually is located. It further is essential to make phone numbers comparable. | ||
- | |||
- | |||
===After installation=== | ===After installation=== | ||
Line 228: | Line 219: | ||
* 'COM_REMOTEON': Command to start outgoing ssh connection. | * 'COM_REMOTEON': Command to start outgoing ssh connection. | ||
* 'COM_REMOTEOFF': Command to stop outgoing ssh connection. | * 'COM_REMOTEOFF': Command to stop outgoing ssh connection. | ||
- | * 'COM_CAMERA': Command to take | + | * 'COM_CAMERA': Command to take picture. |
* 'COM_CALL': Command to start an outgoing call. | * 'COM_CALL': Command to start an outgoing call. | ||
* 'COM_LOCK': Command to lock the phone. | * 'COM_LOCK': Command to lock the phone. | ||
Line 236: | Line 227: | ||
* 'COM_CUSTOM': Command to run a predefined [[#Files intended to be edited by user directly | user script]]. The script runs asynchronously until it terminates itself.<br>Version 0.9.18 supports definition of command text that accepts one or more arbitrary text parts. This parts are extracted and passed to the user script. This indirectly adds support for multiple, unlimited number of user scripts. See [[#Variable text parts in command definitions | below]] for details. | * 'COM_CUSTOM': Command to run a predefined [[#Files intended to be edited by user directly | user script]]. The script runs asynchronously until it terminates itself.<br>Version 0.9.18 supports definition of command text that accepts one or more arbitrary text parts. This parts are extracted and passed to the user script. This indirectly adds support for multiple, unlimited number of user scripts. See [[#Variable text parts in command definitions | below]] for details. | ||
* 'COM_CUSTOMLOG': Command to ask for output of last COM_CUSTOM command. | * 'COM_CUSTOMLOG': Command to ask for output of last COM_CUSTOM command. | ||
- | * 'COM_SHELL': The command text must be a unix shell command. It is directly passed to a unix shell for execution. In contrast to COM_CUSTOM, the | + | * 'COM_SHELL': The command text must be a unix shell command. It is directly passed to a unix shell for execution. In contrast to COM_CUSTOM, the command does not execute in background and its output is immediately returned as notification SMS and/or EMAIL.<br>Version 0.9.18 supports definition of command text that accepts one or more arbitrary text parts. This allows to modify the shell command on a per sms-basis. See [[#Variable text parts in command definitions | below]] for details. |
* 'COM_ALARM': Command to play once a predefined [[#Files intended to be edited by user directly | sound file]]. Alarm duration depends on sound file content; there is no command to stop playing the alarm sound. | * 'COM_ALARM': Command to play once a predefined [[#Files intended to be edited by user directly | sound file]]. Alarm duration depends on sound file content; there is no command to stop playing the alarm sound. | ||
* 'COM_RESTART': Command to restart the daemon. | * 'COM_RESTART': Command to restart the daemon. | ||
Line 302: | Line 293: | ||
For COM_SHELL the assignment of message chars to placeholders is not important. Placeholder just indicate variable parts of the message here. The unix command being executed consist of the complete message anyway (after message prefix/suffix was stripped away). | For COM_SHELL the assignment of message chars to placeholders is not important. Placeholder just indicate variable parts of the message here. The unix command being executed consist of the complete message anyway (after message prefix/suffix was stripped away). | ||
- | + | This smscon_script demonstrates how to manage multiple user scripts. It is an example that may serve as a basis for your own dispatching script. Note that it does not depend on how COM_CUSTOM is actually defined (unless it has at least 3 placeholders): | |
- | + | ||
- | + | ||
<pre> | <pre> | ||
#!/bin/sh | #!/bin/sh | ||
Line 367: | Line 356: | ||
</pre> | </pre> | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
===Prefix/suffix for all SMS command strings=== | ===Prefix/suffix for all SMS command strings=== | ||
Line 567: | Line 501: | ||
</pre> | </pre> | ||
- | These commands can be changed using [[SMSCON Editor]] | + | These commands can be changed using the [[SMSCON Editor]] and also at the command-line with the <code>smscon -set </code> command (see SMSCON command-line options). |
- | + | * When sending 'Check' to you phone it sends one or more SMS messages with all the available SMSCON commands. | |
+ | * Sending 'Reboot' it will reboot your phone. | ||
+ | * Sending 'Poweroff' is will shutdown your phone. | ||
+ | * Sending 'Location' is will send it's current position by SMS or EMAIL (or both). | ||
+ | * Sending 'Remoteon' it will enable the SSH connection to your (home-)server. 'Remoteoff' will kill the connection. | ||
+ | * Sending 'Camera' will send a frontcam picture by email. | ||
+ | * Sending 'Call' will call you. | ||
+ | * Sending 'Lock' will lock the device, so nobody can use your phone. 'Unlock' will remove the device lock. | ||
+ | * Sending 'Trackon' will continiously send SMS or email (or both) with location of the device & 'Trackoff' will disable this. | ||
+ | * Sending 'Script' will run a predefined by user shell script (<code>/opt/smscon/smscon_script</code>). | ||
+ | * Sending 'uptime' (an example shell command) will execute the shell command on your phone and returns the output. | ||
+ | * Sending 'Alarm' will play once a user selectable file (only WAV format and must be named <code>alarm.wav</code> in <code>/opt/smscon</code> directory) '''NEW IN 0.8.1''' | ||
+ | * Sending 'Restart' will kill the smscon_daemon and restart it. '''NEW IN 0.8.1''' | ||
- | * | + | USAGE EXAMPLE: |
- | + | * To trigger any of the commands the phone should receive an SMS having in the subject its defined name. E.g. to trigger the <code>'''COM_LOCATION'''</code> command the phone should receive: <code>'''Location'''</code>. | |
- | + | * The commands can use spaces in them and can be altered in a command only you know what it is and what it means. | |
- | + | * the alarm audio file (only WAV format and must be named <code>alarm.wav</code>) must be placed, if the option is used, in <code>/opt/smscon</code>. '''NEW IN 0.8.1''' | |
- | + | ||
- | + | ||
- | + | ||
- | * | + | |
- | + | ||
- | * | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | ===Remote command server | + | ===Remote command server=== |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | To trigger any of the commands by a remote file on your own server (when option ENABLECHECKHOST is enabled), the file only must contain one of the following values from 00, 01 to 19 or -1: | |
<pre> | <pre> | ||
Line 625: | Line 549: | ||
19 = COM_LOG | 19 = COM_LOG | ||
</pre> | </pre> | ||
- | This two character code must be contained in the first two characters of the file. Further data is simply ignored but may be | + | This two character code must be contained in the first two characters of the file. Further data is simply ignored but may be tranferred with each query. So better keep the file small. |
- | + | It is of course necessary that the file on your server can be read by your N900 via the http protocol (or the protocol you set). Otherwise it won't work. If it don't work, check the log for ''CHECKHOST'' errors. | |
- | + | The default CHECKTIME is 15 minutes but can be changed via CHECKTIME setting. Note that after giving a command via remote command server, it can take up to CHECKTIME minutes to execute the command. | |
- | + | ||
- | + | ||
- | + | ||
- | The default CHECKTIME is 15 minutes but can be changed via CHECKTIME setting. Note that after giving a command via remote command server, it can take up to CHECKTIME minutes to | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
===Example config file=== | ===Example config file=== | ||
Line 655: | Line 559: | ||
Shown is an example config file as stored in <code>smscon_config</code>. This is presented for the gentle user only. Normal users never need to see nor edit this directly. Please use smscon command line or SMSCON Editor to edit settings. | Shown is an example config file as stored in <code>smscon_config</code>. This is presented for the gentle user only. Normal users never need to see nor edit this directly. Please use smscon command line or SMSCON Editor to edit settings. | ||
+ | ====Recent version==== | ||
<pre> | <pre> | ||
# smscon user settings (initially written by version 0.9.16) | # smscon user settings (initially written by version 0.9.16) | ||
Line 866: | Line 771: | ||
===Remote SSH connection=== | ===Remote SSH connection=== | ||
- | + | When the (reverse-)SSH connection is made (default command 'Remoteon' / 'Remoteoff') you can from the server side (your own server) connect to your Nokia device with the following command: | |
- | + | ||
- | + | ||
<pre> | <pre> | ||
ssh -p 8080 localhost -l root | ssh -p 8080 localhost -l root | ||
</pre> | </pre> | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
==Files== | ==Files== | ||
Line 944: | Line 837: | ||
More information about each available version is [http://maemo.org/packages/view/smscon/ here]. | More information about each available version is [http://maemo.org/packages/view/smscon/ here]. | ||
- | === 0.9. | + | === 0.9.18-1 (Current [[Extras-devel]], [[Extras-testing]]) === |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
'''Changelog''' | '''Changelog''' | ||
Line 1,152: | Line 1,034: | ||
This page has been accessed 42,375 times. --[[User:yablacky|yablacky]] 15:30, 28 April 2012 (UTC)<br> | This page has been accessed 42,375 times. --[[User:yablacky|yablacky]] 15:30, 28 April 2012 (UTC)<br> | ||
This page has been accessed 43,315 times. --[[User:yablacky|yablacky]] 00:14, 13 May 2012 (UTC)<br> | This page has been accessed 43,315 times. --[[User:yablacky|yablacky]] 00:14, 13 May 2012 (UTC)<br> | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
[[Category:Software]] | [[Category:Software]] | ||
[[Category:N900]] | [[Category:N900]] |
Learn more about Contributing to the wiki.