SMSCON

Please Note: Update for 0.9.16++ is in progress for this page. In particular section "Usage" still needs updates.... -- yablacky 00:20, 24 January 2012 (UTC)

Contents

Introduction

SMSCON provides complete control of your N900 by sending SMS commands to it. Other methods are supported as well - we come this is later - but SMS is easiest way and it is the reason why this app is named SMSCON.

Remote controlling your phone is particularly handy in case you cannot find it, for example if it has been lost or even stolen. The first approach to find the phone is giving it a usual phone call awaiting to hear it ringing somewhere in your coat-pocket or the like. If this doesn't help, SMSCON comes into play.

SMSCON can't guarantee that you will find your phone again, but it will provide the maximum chance to recover it. If this application ever helps you to recover your phone please tell the story on Maemo.org! The best way is of course to never lose your phone or let it get stolen...

SMSCON Editor is a GUI helper application to configure and even test SMSCON operation. We recommend normal users of the phone to use SMSCON Editor. Note that this is a separate application that installs additionally to SMSCOM.

Configuring SMSCON without SMSCON Editor is possible but you need some experience in unix command line. As almost ever, the command line offers maximum possibilities to adjust the application to your own needs.

WARNING: This application can send (multiple) SMS messages automatically (in the background). Be aware that SMS sending is not free and it's costs depends on the used telephone subscription with your Nokia device. Sending many SMS might be a minor problem for those having a SMS-flat-rate...

Where to get more help

Please read this wiki first. If you have further questions, suggestions, compliments or bad marks then check the forum SMSCON at talk.maemo.org. Don't hesitate to post your statement there.

How to report bugs

Click here to report a bug or post them in the forum.

Features

The are a bag full of features offered by SMSCON. Here's an overview:

General

  • Looking for commands in received SMS messages.
  • 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.
  • 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.
  • 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.
  • Stores personal settings encrypted.

Locating the phone

  • Send notification about current GPS location coordinates via SMS message and/or EMAIL. Those EMAIL have even attached a GoogleMaps picture with your phone's location on it.
  • 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 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.

Locking and Unlocking

  • Optionally lock the phone on receiving any known command.
  • Explicitly lock the phone by command. Nobody can use your locked phone until it receives an unlock command (as long unlock code is unknown, of course).
  • Optionally unlock the phone on detection of SIM card change. -- Why unlocking? Well, unlocking makes sense when regular phone owner is more interested on finding the actual device than as keeping its private/sensitive phone data protected/locked. A locked phone prevents even to enter the SIM card PIN. Consequently telephone functions do not work either. This is very secure but makes it almost impossible to contact the phone after booting with unknown SIM card installed. Note that a finder may remove the SD-memory card to read its content.

Direct control

  • Run directly a pre-defined shell command through SMS message where command output is immediately reported.
  • Run a pre-defined (and user-configurable) shell script to start other programs, delete files etc. May be used to wipe out sensitive data from phone. Direct wipe commands are not provided by SMSCON. Writing (and testing) a script doing so is at your own risk.
  • Open a (reverse-)SSH connection to your own (home-)server to control the phone at command-line level from your own home (or any other) computer.

Automatic notifications

  • Detect changing battery charge level and send notification about that.
  • Detect keyboard slider movement and send notification about that. Keyboard usage might indicate that somebody has found your phone.

System

  • 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.
  • 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.
  • Stop & restart SMSCON activity by SMS command. On trouble, this might be preferred operation instead of rebooting the phone.
  • Send notifications if SMSCON crashes on activity. Should this ever happen, you're encouraged to forward them to the SMSCON developer team (make a bug report).

Installation

Always install the latest stable version on your phone; previous version can have bugs and have less functionality!

Where to get from

The latest stable versions are available in the Extras repository and can be installed simply using the phones Application Manager (HAM). Therefore, in HAM ensure Extras repository is enabled then open the "ALL" category and search for "smscon".

Alternatively the packages can be found here: SMSCON and there: SMSCON Editor.

If you are willing to try unstable versions and help testing the application, consider to install packages from here: SMSCON Releases and there: SMSCON Editor Releases. Be warned.

Incompatibilities

Read this section to find out applications known to be not perfectly compatible with SMSCON operation:

  • The [fMMS]: application (send and receive MMS) may cause use of wrong 3G connection. Problem: The MMS related connection usually does allow access to internet in general. Solution: Don't have a MMS related GRPS access point defined (those that fMMS would use). Reason: The phone, if in automatic connection search, may select the wrong 3G connection even if SMSCON is not installed. So this is not really a SMSCON issue. The solution for proper SMSCON operation is to have only one GPRS/3G APN defined. The pure installation of fMMS is no harm while no additional APN is configured.

Installation details

On very first installation, SMSCON generates

  • a default settings file with all the user settings of SMSCON.
  • an IMSI database to store IMSI numbers of SIM cards allowed. Other SIM cards will cause detection of SIM card change and optionally unlock of the device on boot.
  • a default smscon_script file with example code for COM_CUSTOM command.
  • a default alarm.wav file for COM_ALARM command.
  • a SMSCON logfile.
  • a smscon command for use on unix command line.

On installation of update versions (since 0.9.*) , SMSCON

  • updates the settings file to disable obsolete settings.
  • updates the settings file to add new settings.
  • leaves IMSI database untouched.
  • leaves smscon_script file untouched.
  • leaves alarm.wav file untouched.
  • tries to repair previous SMSCON installation.
  • adds entries to SMSCON logfile.
  • updates the smscon command.

Before using SMSCON the first time

It is highly recommended to review all user settings and adjust them to your needs. Since this is a lot for the first time, there are a few important things for you to setup (no must but recommended):

We recommend use of SMSCON Editor to review and change settings. Alternatively open Xterm and use the smscon command on unix command line. Do not use both methods at the same time: keep SMSCON Editor closed while you operate smscon on the command line. Otherwise results are unpredictable.

Set the master number

The master number is a phone number, namely the phone number of the main controlling phone. It can but should not be number of your N900 being controlled - this would be nonsense. It can also be left empty if you don't want to use the functionality that master-number offers. Best choice is to use the number of a second phone in your phone-portfolio. The number of your boy- or girlfriend's phone also does. No matter if that is a N900 as well.

Controlling your N900 is not restricted to the master number's phone. Any phone in the world can be used to send controlling SMS to your N900 and SMSCON sends SMS responses to it. One role of master numbers's phone is to receive a blind copy of all SMS that SMSCON sends to other phones.

Another role of master number comes into play if you start to control your N900 using different methods than SMS. We come to that later.

Further, the master number receives a notification if the password for SMSCON Editor got changed.

Last not least, the master number serves as a kind of password for some functions. This is also the case if you leave the master number empty. Then the password is just the empty password.

Here is how to set the master number:

  • A typo-aware way to set the master number to a particular phone's number is using SMSCON Editor version 0.9.8 or higher and it goes like this:
  1. Open SMSCON Editor, ensure daemon runs, quit SMSCON Editor.
  2. From the particular phone, send a command to your N900. The default SMS message text for COM_CHECK is just Check (note upper/lower case letters!).
  3. Wait until your N900 received that SMS.
  4. Again open SMSCON Editor go to "General" settings page.
  5. Enter the "last sender" number exactly as shown in the "master number" field above.
  6. Close "General" settings page and quit SMSCON Editor
  • Set master number directly:
    • Open SMSCON Editor go to "General" settings page, fill in "master number" field. Leave the field empty if you don't want to use master-number features.
    • Alternativly, on unix command line do this:
 $ smscon -set MASTERNUMBER +xxyyyyyyyyyy     # or
 $ smscon -set MASTERNUMBER "" # no master number

Set the phone's lock/unlock code

The N900 has a standard device locking function which on the phone can be configured at 888 --> Phone settings --> Miscellaneous Settings --> Device lock.

This lock has two settings: (1) Autolock and (2) Lock code. The lock state itself goes locked when (1) the phone is idle and Autolock is enabled or (2) if explicitly locked by user via Main-on/off-Button --> Lock Device.

With SMSCON the lock state can also be controlled remotely by SMS commands.

Fortunately (from users point of view) the N900 device locking function has a feature that prevents a user from accidentally lock out himself: Unless the lock code was explicitly set once in the Device Lock settings, the phone will not lock until the lock code was entered; this means you need the code to even lock the phone. Locking can be canceled at this time! Unfortunately (from SMSCON point of view) this is also true if locking was requested by a SMSCON command.

Obviously locking via SMSCON command makes sense only if the the phone goes locked immediately without asking the current user for a code before.

In order to achieve this, each user of SMSCON is encouraged to at least once set an explicit device lock code on his/her phone. No matter if the code you choose is the same as the default code 12345 (which re-use is of course not recommended) and no matter if Autolock is enabled or not.

Phone number format

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

SMSCON installes to autoload at boot, this can be disabled with the command-line command smscon -unboot and re-enabled by smscon -boot or with SMSCON Editor.

After you made initial settings start SMSCON activity like this:

Nokia-N900:~$ smscon -start
INFO: Daemon smscon_daemon requested to start.
INFO: Daemon smscon_daemon started [PID=17137].

This starts a background daemon which

  • loads the configured user settings file
  • stores your current IMSI code in the IMSI code database
  • waits for commands until stopped or phone shutdown.

When later a new SIM card is inserted the new IMSI code is verified with the code in the stored in IMSI database. This is how the "SIM card change" will be detected.

Configuration

Prior to use SMSCON you have to configure it. Do this by assigning various settings a value. Settings have an internal name, such as MASTERNUMBER. Most settings have useful default values. But some need to be set to personalized values.

To keep your privacy, SMSCON stores personal settings encrypted in the config file. Note that this is not bullet proof to the maximum extend. Experienced hackers are able to decrypt that.

Following is a categorized list of all currently known settings with their internal names and a short description. To get and set the current value of a user setting enter these the commands:

$ smscon -get NAMEOFSETTING "default value"   # query a setting
$ smscon -set NAMEOFSETTING "the new value"   # assign new value

If querying a setting that is not known or not set, the default value is displayed. An attempt to assign an invalid value is denied.

SMS command source

  • 'SENDERNUMBER': SMS number of recent controller. Receives SMS notifications.
    This setting is automatically updated each time SMSCON receives a known command via SMS message.
  • 'MASTERNUMBER': SMS number of master controller (encrypted).
    This setting is never automatically updated by SMSCON except on upgrading from older version to 0.9.x where it is set to the currently stored SENDERNUMBER.

List of known sms commands

  • 'COM_CHECK': Command to ask for help.
  • 'COM_REBOOT': Command to reboot the phone.
  • 'COM_POWEROFF': Command to shutdown the phone.
  • 'COM_POWER': Command to ask for phone battery status and many other status information.
  • 'COM_LOCATION': Command to ask current GPS location.
  • 'COM_REMOTEON': Command to start outgoing ssh connection.
  • 'COM_REMOTEOFF': Command to stop outgoing ssh connection.
  • 'COM_CAMERA': Command to take picture.
  • 'COM_CALL': Command to start an outgoing call.
  • 'COM_LOCK': Command to lock the phone.
  • 'COM_UNLOCK': Command to unlock the phone (encrypted).
  • 'COM_TRACKON': Command to start GPS tracking.
  • 'COM_TRACKOFF': Command to stop GPS tracking.
  • 'COM_CUSTOM': Command to run predefined user script.
  • 'COM_CUSTOMLOG': Command to ask for user script output.
  • 'COM_SHELL': Command to execute that shell command. Returns output as notification.
  • 'COM_ALARM': Command to play once the predefined alarm.wav sound file. Alarm duration depends on alarm.wav content; there is no command to stop playing the alarm sound.
  • 'COM_RESTART': Command to restart the daemon.
  • 'COM_LOG': Command to ask for application log (encrypted).

Prefix/suffix for all SMS command strings

  • 'SMS_COMPREFIX': Prefix that must be present before all COM_XXX commands [even COM_SHELL] (encrypted).
  • 'SMS_COMSUFFIX': Suffix that must be present behind all COM_XXX commands [even COM_SHELL] (encrypted).

These two settings play the role of passwords to protect your phone from being controlled via SMS by someone else than you. Would you leave all the command codes to their default and prefix and suffix is also empty, then I could shutdown your phone if only I have your number.

Instead of explicitly define all your SMS control commands (COM_xxx) to start with a unique prefix and/or suffix, you simply define a prefix and/or suffix that is implicitly used. If you have very cryptic codes defined you may leave "SMS_COMPREFIX" and/or "SMS_COMSUFFIX" empty. But advantage of using "SMS_COMPREFIX" and "SMS_COMSUFFIX" is:

  1. Prefix and suffix can be changed easily while embedded COM_xxx codes remain unchanged.
  2. Prefix and suffix apply to COM_SHELL command as well.

Example for COM_SHELL: With the configuration set to:

COM_SHELL=uptime
SMS_COMPREFIX=aaa.
SMS_COMSUFFIX=.bbb

The recognized SMS command message to execute the shell command "uptime" is: aaa.uptime.bbb

Note for upgraders: In versions before 0.9.x the command message for COM_SHELL was differently.

Remote command server

  • 'ENABLECHECKHOST': Enable checking URL for commands.
  • 'CHECKHOST': The URL to check (encoded).
  • 'CHECKTIME': Minutes between URL checks.

Email settings

  • 'EMAILADDRESS': Recipient of EMAIL notifications (regular owner of this phone, please contact him!).
  • 'USER': SMTP username for EMAILFROM (encrypted).
  • 'PASSWORD': SMTP password for EMAILFROM (encrypted).
  • 'EMAILFROM': Sender address of EMAIL notification (encrypted).
  • 'MAILSERVER': SMTP server hostname or IP (encrypted).
  • 'MAILPORT': SMTP server port number.

SSH settings

  • 'REMOTEHOST': ssh server hostname or IP [to build tunnel] (encrypted).
  • 'REMOTEPORT': ssh server port number [to build tunnel].
  • 'REMOTEUSER': ssh server username [to build tunnel] (encrypted).
  • 'REMOTEPASSWORD': ssh server password [to build tunnel] (encrypted).
  • 'REMOTELISTENIP': ssh server IP address [entry of tunnel itself] that will be forwarded to phone (*|localhost|IP).
  • 'REMOTELISTENPORT': ssh server port number [entry of tunnel itself] that will be forwarded to phone.
  • 'REMOTE2LOCALPORT': Local port number to be forwarded to [exit of tunnel itself] on the phone.

If you want to use the SSH connection feature (COM_REMOTEON and COM_REMOTEOFF commands), you also need a fixed IP address (or a dyndns.org domain name) on your preconfigured remote server for the SSH (default port 22) connection.

Notification settings

  • 'COMMANDREPLY': Send notification if command accepted (yes|no).
  • 'MESSAGESEND': How to send notifications (sms|email|both|none).
  • 'ENABLERESEND': On failure try to re-send reply message (yes|no).
  • 'RESENDTIME': Minutes between message re-send tries.
  • 'RESENDMAXTRY': Maximum number of message re-send tries (0=no limit).
  • 'SMS_PARTS_LIMIT': SMS notification produces no more than this number of single SMS (0=no limit).
  • 'LOG_TIMEFORMAT': Format to use for timestamps (see strftime).

GPS settings

  • 'GPSSEND': How to send GPS notifications (sms|email|both).
    Read further to understand good reasons to report GPS notifications differently then others (of which sending is defined by MESSAGESEND).
  • 'GPSTIMEOUT': Seconds until give up acquiring GPS coordinates.
    Timeout counting restarts after each successfully received coordinate. In order to give the GPS subsystem a chance to download the complete almanac from satellites this could be a reasonable high value. E.g. 600 seconds (5 minutes) or even more.
  • 'GPSINTERVAL': Seconds between GPS coordinate acquisitions. Applies to COM_TRACKON and COM_LOCATION commands.
  • 'GPSPOLLING': Minimum number of GPS coordinate acquisitions for COM_LOCATION's best accuracy of.
  • 'GPSMAXDEVIATION': Meters of minimum accuracy of a GPS coordinate for COM_LOCATION request.

On a COM_LOCATION command the phone acquires a series of GPS coordinates and reports the best one of them. At least GPSPOLLING coordinates are acquired for no longer than GPSPOLLING x GPSINTERVAL seconds. The timeout is utilized only so far the best coordinate's accuracy exceeds GPSMAXDEVIATION.

On a COM_TRACKON command the phone repeatedly acquires GPS coordinates and reports them in an almost GPSINTERVAL seconds interval. GPSPOLLING and GPSMAXDEVIATION play no role for COM_TRACKON mode. Repeated reports might be a lot stuff and it could be really expensive if GPSSEND includes sending via SMS. Consider to set GPSSEND accordingly.

A COM_TRACKON command - after a reasonable while - should be followed by a COM_TRACKOFF or COM_LOCATION command to stop the phone from sending further notifications. Otherwise the battery runs out of breath too fast. (To be precise, COM_SHUTDOWN or COM_RESTART also stop things but are obviously not recommended for this purpose).

Miscellaneous settings

  • 'SILENCEDEVICE': Set phone silent before executing command (yes|no).
  • 'AUTODEVICELOCK': Lock phone before executing any command except un/lock (yes|no).
    This saves you from sending explicit COM_LOCK commands and may be used in conjunction with SIMUNLOCK setting enabled. The scenario is as follows:

    A finder/thief replaces the SIM card and reboots. SMSCON detects SIM change, unlocks (if locked et all) then connects to GPRS (of new SIM) and sends you a SIM-change notification. As you receive that, you know the new number of your phone. To prevent finder/thief from operating your phone you may immediately send COM_LOCK or - with AUTODEVICELOCK enabled - even any other command to take control of your phone.

  • 'SIMUNLOCK': Automatically unlock phone when new SIM is inserted (yes|no).

Sensor detections

  • 'KEYBOARDDETECT': Send notification if keyboard is sliding (yes|no).
  • 'AUTOBATREPORT': Send notification on battery discharge (yes|no).

The SMSCON log

All user action and activity of smscon_daemon will be logged. To query the log file use SMSCON Editor or enter a smscon -log command like this:

Nokia-N900:~$ smscon -log
2012-01-15 00:16:34[SMSCON] INFO: Daemon smscon_daemon requested to start.
2012-01-15 00:16:35[SMSCON] INFO: Daemon smscon_daemon started [PID=17137].
2012-01-15 00:16:35[DAEMON] CRITICAL: smscon_daemon is starting.
2012-01-15 00:16:35[DAEMON] INFO: Successfully loaded "/opt/smscon/smscon_config" file.
2012-01-15 00:16:36[DAEMON] INFO: Found 1 IMSI code(s) in "/opt/smscon/smscon_code" file.
2012-01-15 00:16:36[DAEMON] INFO: Authorized IMSI code found.
2012-01-15 00:16:36[DAEMON] INFO: Phone battery charge is 45%, charging.
2012-01-15 00:16:36[DAEMON] INFO: Preferred GPS query interval is 20 sec.
2012-01-15 00:16:36[DAEMON] INFO: Keyboard slider change detection is off.
2012-01-15 00:16:36[DAEMON] INFO: Battery status change detection is off.
2012-01-15 00:16:36[DAEMON] INFO: (CHECKHOST) After 0 errors since 2012-01-14 23:16:35 GMT: Successfully read remote file.
2012-01-15 00:16:36[DAEMON] INFO: (CHECKHOST) smscon_daemon is deactivated (00) by remote host file.
2012-01-15 00:16:36[DAEMON] INFO: (CHECKHOST) Checkhost is on. Checking each 30.0 minutes.
2012-01-15 00:16:36[DAEMON] INFO: smscon auto-loads at boot. OK.

By default smscon -log outputs the log information in a way that privacy data is somehow anonymous. But no guarantee! To view the log containing all data "as is" you need to provide the master number as a password like this:

Nokia-N900:~$ smscon -pw "+4912345678901" -log

Where the value behind -pw option is your master number.

When having trouble with SMSCON always check the log! Note that the log file itself (smscon.log) is not readable by normal users. You need to use the smscon -log command or use SMSCON Editor to display it (or be a super user ...).

Usage

This section explains how to operate in case you need to control your phone remotely. You need at least one of this:

  • the ability to send SMS to your phone, or
  • access to the remote command server your phone is polling.

To send SMS any phone does. Security note: From a foreign phone, remember to remove all SMS you sent from that phones SMS-sent-history. Otherwise someone else may send them later again. If you're lucky to hold your N900 in hands again, then defining different command prefix/suffix asap is a recommended alternative or additional security option.

Won't miss to say: For using a remote command server, SMSCON and the command server must be setup and configured accordingly before you lost your phone.

No matter if SMSCON is triggered by a SMS message or by remote command server, it will first and optionally reply an acknowledge message and then execute the command in the background.

Commands usually generate a reponse that SMSCON sends as an SMS-reply, EMAIL, both (SMS and EMAIL) or not et all. If SMS replies are enabled, they go to the phone that sent the command and to the master number if one is defined (only once if both numbers are the same). If the command comes from remote command server and SMS replies are enabled, they go to the master number if one is defined.

Commands

The (default) predefined SMS commands are:

Nokia-N900:~$ smscon -sms
COM_ALARM        = Alarm   /* NEW IN 0.8.1 */
COM_CALL         = Call
COM_CAMERA       = Camera
COM_CHECK        = Help
COM_CUSTOM       = Script
COM_CUSTOMLOG    = Script.log    /* NEW IN 0.9.x */
COM_LOCATION     = Location
COM_LOCK         = Lock
COM_LOG          = Log           /* NEW IN 0.9.x */
COM_POWER        = Power
COM_POWEROFF     = Poweroff
COM_REBOOT       = Reboot
COM_REMOTEOFF    = Remoteoff
COM_REMOTEON     = Remoteon
COM_RESTART      = Restart   /* NEW IN 0.8.1 */
COM_SHELL        = uptime    /* CHANGE: Better no i/o redirection since 0.9.x */
COM_TRACKOFF     = Trackoff
COM_TRACKON      = Trackon
COM_UNLOCK       = Unlock

These commands can be changed using the SMSCON Editor and also at the command-line with the smscon -set 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 (/opt/smscon/smscon_script).
  • 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 alarm.wav in /opt/smscon 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 COM_LOCATION command the phone should receive: Location.
  • 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 alarm.wav) must be placed, if the option is used, in /opt/smscon. NEW IN 0.8.1

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:

-1 = COM_RESTART (behaves exactly like 17 since version 0.9.14 )
00 = no command
01 = COM_CHECK
02 = COM_REBOOT
03 = COM_POWEROFF
04 = COM_POWER
05 = COM_LOCATION
06 = COM_REMOTEON
07 = COM_REMOTEOFF
08 = COM_CAMERA
09 = COM_CALL
10 = COM_LOCK
11 = COM_UNLOCK
12 = COM_TRACKON
13 = COM_TRACKOFF
14 = COM_CUSTOM
15 = COM_SHELL
16 = COM_ALARM
17 = COM_RESTART
18 = COM_CUSTOMLOG
19 = COM_LOG

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.

Example config file

Shown is an example config file as stored in smscon_config. 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

# smscon user settings (initially written by version 0.9.16)

# smscon configuration file written by:
@APPVERSION      = '0.9.16'

# Send notification on battery discharge (yes|no):
AUTOBATREPORT    = 'no'

# Lock phone before executing any command except un/lock (yes|no):
AUTODEVICELOCK   = 'no'

# The URL to check (encoded):
CHECKHOST        = 'olbwLcsXidpecUsoyn63PzlmI6FcWazAIQzrVsS0qE1CuD0='

# Minutes between URL checks:
CHECKTIME        = '15.0'

# Send notification if command accepted (yes|no):
COMMANDREPLY     = 'no'

# Command to play predefined alarm.wav:
COM_ALARM        = 'Alarm'

# Command to start an outgoing call:
COM_CALL         = 'Call'

# Command to take picture:
COM_CAMERA       = 'Camera'

# Command to ask for help:
COM_CHECK        = 'Check'

# Command to run predefined user script:
COM_CUSTOM       = 'Script'

# Command to ask for user script output:
COM_CUSTOMLOG    = 'Script.log'

# Command to ask current GPS location:
COM_LOCATION     = 'Location'

# Command to lock the phone:
COM_LOCK         = 'Lock'

# Command to ask for application log (encrypted):
COM_LOG          = 'mCJtpl2x/hOmXJvthib0PZe0pA=='

# Command to ask for phone battery status:
COM_POWER        = 'Power'

# Command to shutdown the phone:
COM_POWEROFF     = 'Poweroff'

# Command to reboot the phone:
COM_REBOOT       = 'Reboot'

# Command to stop outgoing ssh connection:
COM_REMOTEOFF    = 'Remoteoff'

# Command to start outgoing ssh connection:
COM_REMOTEON     = 'Remoteon'

# Command to restart the daemon:
COM_RESTART      = 'Restart'

# Command to execute that shell command. Returns output as notification:
COM_SHELL        = 'uptime'

# Command to stop GPS tracking:
COM_TRACKOFF     = 'Trackoff'

# Command to start GPS tracking:
COM_TRACKON      = 'Trackon'

# Command to unlock the phone (encrypted):
COM_UNLOCK       = '5hIkR2JXO5Rh/DKvujfWs3Ixsg=='

# A csv with debugging options (for development use only)
DEBUGFLAGS       = ''

# Recipient of EMAIL notifications (regular owner of this phone, please contact him!):
EMAILADDRESS     = 'to@example.com'

# Sender address of EMAIL notification (encrypted):
EMAILFROM        = 'KgJG37AvcSCzgc+fNB1BbtyMpPHrQadT5gqkM5/zM9bSywc='

# Enable checking URL for commands:
ENABLECHECKHOST  = 'no'

# On failure try to re-send reply message (yes|no):
ENABLERESEND     = 'no'

# Seconds between GPS coordinate acquisitions for COM_TRACKON and COM_LOCATION:
GPSINTERVAL      = 10

# Meters of minimum accuracy of a GPS coordinate for COM_LOCATION request:
GPSMAXDEVIATION  = 50

# Number of minimum GPS coordinate acquisitions for COM_LOCATIONs best of:
GPSPOLLING       = 8

# How to send GPS notifications (sms|email|both):
GPSSEND          = 'sms'

# Seconds until give up acquiring GPS coordinates:
GPSTIMEOUT       = 1800

# Send notification if keyboard is sliding (yes|no):
KEYBOARDDETECT   = 'no'

# Format to use for timestamps (see strftime):
LOG_TIMEFORMAT   = '%Y-%m-%d %H:%M:%S'

# SMTP server port number:
MAILPORT         = 25

# SMTP server hostname or IP (encrypted):
MAILSERVER       = 'R15CnDU7WEzfK0KXN92XMRY1AvHrQadT5gqkM5/zM9bSywc='

# How to send notifications (sms|email|both|none):
MESSAGESEND      = 'sms'

# SMTP password for EMAILFROM (encrypted):
PASSWORD         = '9pfb8B3RUW0HzfsoCPC9ybIkOw=='

# Local port number to be forwarded to [exit of tunnel itself] on the phone:
REMOTE2LOCALPORT = 22

# ssh server hostname or IP [to build tunnel] (encrypted):
REMOTEHOST       = 'mqoUsM3+9k3n5VD+xNYSpTM5WQ1T+fy7Qek0+9iEtxxVjHg='

# ssh server IP address [entry of tunnel itself] that will be forwarded to phone (*|localhost|IP):
REMOTELISTENIP   = 'thMYuBGLYAoSYzwNIGmZtbB6iw=='

# ssh server port number [entry of tunnel itself] that will be forwarded to phone:
REMOTELISTENPORT = 'Fu7Jok9QmKAQNW4D364fISC97A=='

# ssh server password [to build tunnel] (encrypted):
REMOTEPASSWORD   = 'zoaD1+tPV/rjchz5kH49YvTLzA=='

# ssh server port number [to build tunnel]:
REMOTEPORT       = 22

# ssh server username [to build tunnel] (encrypted):
REMOTEUSER       = 'YIRJIwUpcrLjk5NMreAbcxG6tA=='

# Maximum number of message re-send tries (0=no limit):
RESENDMAXTRY     = 10

# Minutes between message re-send tries:
RESENDTIME       = '15.0'

# SMS number of recent controller. Receives SMS notifications:
SENDERNUMBER     = '+0000000000'

# Set phone silent before executing command (yes|no):
SILENCEDEVICE    = 'no'

# Automatically unlock phone when new SIM is inserted (yes|no):
SIMUNLOCK        = 'no'

# Prefix that must be present before all COM_XXX commands [even COM_SHELL] (encrypted):
SMS_COMPREFIX    = 'lCrge4igqhEBwf79LjQemKXTFA=='

# Suffix that must be present behind all COM_XXX commands [even COM_SHELL] (encrypted):
SMS_COMSUFFIX    = 'MQyE8gLfhntAx0LmedKshcfEuA=='

# A SMS notification produces no more than this number of single SMS (0=no limit):
SMS_PARTS_LIMIT  = 10

# SMTP username for EMAILFROM (encrypted):
USER             = 'h90Sc0FT1T+ktlwqlUHyP3nW1Q=='

# SMS number of master controller (encrypted):
MASTERNUMBER     = 'CLS61ljsGhXGsZAMN58l8II96w=='

Older version

The config file of older version 0.8 may look like this:

# smscon user settings (v0.8.1)
# (DO NOT edit the encrypted user settings below, use SMSCON-editor or SMSCON!)

# SMS number
SENDERNUMBER      = '+1234567890'

# SMS commands
COM_CHECK         = 'Check'
COM_REBOOT        = 'Reboot'
COM_POWEROFF      = 'Poweroff'
COM_POWER         = 'Power'
COM_LOCATION      = 'Location'
COM_REMOTEON      = 'Remoteon'
COM_REMOTEOFF     = 'Remoteoff'
COM_CAMERA        = 'Camera'
COM_CALL          = 'Call'
COM_LOCK          = 'Lock'
COM_UNLOCK        = 'Unlock'
COM_TRACKON       = 'Trackon'
COM_TRACKOFF      = 'Trackoff'
COM_CUSTOM        = 'Script'
COM_SHELL         = 'uptime >> /tmp/commandlog'
COM_ALARM         = 'Alarm'   /* NEW IN 0.8.1 */
COM_RESTART       = 'Restart'   /* NEW IN 0.8.1 */

# REMOTE command   /* NEW IN 0.8.1 */
# (check server file at remote host to trigger smscon: 'yes', 'no')
ENABLECHECKHOST   = 'no'
# (check host)
CHECKHOST         = 'www.bla.com/filetocheck'
# (check interval in minutes)
CHECKTIME         = 15

# Email settings
EMAILADDRESS      = 'bla@bla.com'
# (encrypted setting)
USER              = '<ENCRYPTED>'
# (encrypted setting)
PASSWORD          = '<ENCRYPTED>'
EMAILFROM         = 'bla@bla.com'
MAILSERVER        = 'www.bla.com'
MAILPORT          = 25

# SSH settings
REMOTEHOST        = 'www.bla.com'
REMOTEPORT        = 22
# (encrypted setting)
REMOTEUSER        = '<ENCRYPTED>'
# (encrypted setting)
REMOTEPASSWORD    = '<ENCRYPTED>'

# Reply message settings
# (method to send reply messages: 'sms' / 'email' / 'both' / 'none')
MESSAGESEND       = 'sms'
# (enable resending of reply message after <RESENDTIME> minutes
#  until successful sending; 'yes' / 'no')
ENABLERESEND      = 'no'
# (resend waiting time in minutes)
RESENDTIME        = 15

# Send acknowledge SMS
# (send acknowledge SMS after receiving valid SMS command: 'yes' / 'no')
COMMANDREPLY      = 'no'

# Detect keyboard use
# (send acknowledge SMS if keyboard is sliding: 'yes' / 'no')
KEYBOARDDETECT    = 'no'

# Device lock
# (lock device after receiving valid SMS command: 'yes' / 'no')
AUTODEVICELOCK    = 'yes'

# Auto battery status SMS report
# (sends SMS when SMSCON is set active with a SMS command & battery
#  is depleting: 'yes' / 'no')
AUTOBATREPORT     = 'no'

# Auto device unlock
# (unlocks device when new SIM is inserted; 'yes' / 'no')
SIMUNLOCK         = 'no'

# Silence the phone 
# (disable all phone sounds when SMSCON is set active with a SMS command: 'yes' / 'no')
SILENCEDEVICE     = 'no'

# GPS settings
# (if no GPS coordinates after <GPSTIMEOUT> seconds then stop aquiring)
GPSTIMEOUT        = 1800
# (number of GPS coordinates to acquire and use the most accurate in "Location"-mode)
GPSPOLLING        = 3
# (time between sending GPS coordinate SMS in "Trackon"-mode: 10 / 20 / 30 / 60 / 120)
GPSINTERVAL       = 60
# (method to send GPS coordinates: 'email' / 'sms' / 'both')
GPSSEND           = 'sms'

SMSCON command line options

The basically available command-line options for SMSCON are as follows. There are more options e.g. to export and import all settings via command line. They are not shown here; should you ever need to use them, use -help2 option for help.

Nokia-N900:~$ smscon -help
== smscon 0.9.13 - Nokia N900 remote control utility ==
usage: smscon [Options]...
 Options:
   -start             : Start smscon_daemon
   -restart           : Stop & restart smscon_daemon
   -stop              : Stop smscon_daemon
   -status            : Get smscon_daemon status
   -log               : Show log file. Anonymized if no or wrong -pw option seen before.
   -del log           : Delete log file
   -sms               : Show SMS commands
   -set name "value"  : Set user setting (name = "value")
   -config            : Show config file
   -script            : Show script file
   -scriptlog         : Show script.log file
   -del scriptlog     : Delete script.log file
   -boot              : Enable smscon_daemon to start at phone boot
   -unboot            : Disable smscon_daemon to start at phone boot
   -add imsi          : Add IMSI code of current SIM to code file
   -remove imsi       : Remove IMSI code of current SIM from code file
   -pw password       : Password to enable non-anonymized output. MASTERNUMBER is password.
   -version           : Show version number
   -help              : This help menu
   -help2             : More help (special options, rarely used).

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:

ssh -p 8080 localhost -l root

Files

This section is a description of what you get when installing SMSCON. This is not a must-read when getting in touch with SMSCON for the first time.

If not otherwise stated, the location of all files mentioned in this section is /opt/smscon.

SMSCON is a command line application whose executables parts are mainly:

  • smscon, the command-line control part and
  • smscon_daemon the daemon part, running in the background.

SMSCON is highly configurable and all the settings are stored in the smscon_config file. Many settings are stored encrypted, so - from version 0.9.3 on - do not edit the file directly. See below for how to change settings.

Files intended to be edited by user directly

  • smscon_script, a unix shell script to extend SMSCON functionality. This script is intended to be edited by the gentle user. The installation of SMSCON provides a file with some non-destructive example code. SMSCON executes the script in the background with root-rights when receiving a COM_CUSTOM command. You need to be root to change smscon_script.
  • alarm.wav, a WAV-format sound file. SMSCON plays the sound when receiving a COM_ALARM command. A special sound file (suitable to all languages) is provided by default. You're encuraged to replace it by your own sound. Write it to /opt/smscon/alarm.wav. Note: currently only WAV sound is supported by SMSCON.

Files used internally

None of these files are intended to be viewed or even edited by a user directly. So don't do it. Use SMSCON commands to view and change them in a consistent way:

  • application program files and libraries
  • several log files
  • internal configuration files
  • temporary files to hold camera pictures, google maps etc.
  • last not least, there are some internal files not stored in /opt/smscon.

Names of internal files are not mentioned here by design. They are matter to change without notice as is the existence of this files itself.

Files from other packages

The installation of SMSCON via application manager ("HAM") usually installs other software packages implicitly. They are also de-installed on SMSCON's de-installation (via HAM) in case they are no longer referenced otherwise.

Besides python2.5 this is:

python-crypto 
python-gobject
python-location
python-dbus
pexpect
gstreamer-tools 
openssh-client
openssh-server
alsa-utils   /* NEEDED IN >= 0.8.1 */

As said above, regular use of SMSCON does not require knowledge of files nor packages used.

(More or less) Frequently Asked Questions

  • Q: I don't have a 2g connection. Can the email functionality send via 3G rather than try and connect to gprs?
    A: That should be no problem. smscon does not handle 2G and 3G connections differently. It you have internet connection et all it's no matter whether it is 3G or 2G. Some telecom networks support both and the phone is even switching between both types every now and then without affecting smscon operation.
  • Q: Is there a "stolen mode"?
    A: No, nothing special. Smscon makes use of the N900's standard device lock function and may
    • explicitly lock/unlock the phone on receiving a command or
    • automatically on detecting some events.

Versions

0.9.17-1 (development)

Availability: Extras-devel

Changelog

FIX: Notification SMS were sent twice some times due to a too short timeout value. Now a longer timeout will hopefuly fix that.

0.9.16-1 (current extras testing) (current extras)

Availability: Extras-testing Availability: Extras

Changelog

FIX: Fixed some typos.
FIX: On some N900 devices the gps location test does not proceed until another test was started. This is fixed now.
FIX: A GPS Error is now reported rather than it potentially aborts the SMSCON daemon.

0.9.15-1

Changelog

FIX: The COM_LOCATION (and COM_TRACKON) command fail if accuracy of a received GPS coord is "not a number".
FIX: Several issues if GSP device is also used by different application at the same time (GPSJinni, OVI maps, ...) are fixed.
FIX: Fix behaviour if COM_LOCATION/COM_TRACKON commands are received while the other one is active. Now the mode is just switched.
CHANGE: The COM_LOCATION command now takes even more than GPSPOLLING samples if best accuracy is above 50 meters and timeout (which is GPSINTERVAL * GPSPOLLING) is not reached yet. The tolerance (50) is configurable via new GPSMAXDEVIATION setting.
ADD: New setting GPSMAXDEVIATION: Meters of minimim accuracy of a GPS coordinate for COM_LOCATION request. Default is 50 meters.

0.9.14-1

Changelog

FIX: Remove double log message on received command.
FIX: If alarm command changes profile for playing sound, it was not restored after alarm. Now it is restored.
FIX: No longer treat CHECKHOST commands -1 and 17 differently. They behave the same now and will restart the smscon daemon exactly once (like only -1 did before).
FIX: Fix missing application homepage URL in package description.
FIX: On GPS location request, dismiss the very first GPS location delivered by GPS receiver because this sometimes seems to be the last fix from a long-time-ago somewhere-else location.
ADD: Introduce a 'DEBUGFLAGS' setting to enable/disable generation of debug information in the log (for developer use only).

0.9.12-1

Changelog

FIX: Issues on reading smscon settings of older versions and/or invalid settings. <yablacky>
   * Invalid settings now generate a warning on start but are left unchanged and will show up in the editor fields.
   * If user does not change them, they again will generate error messages when editor pages are closed.
CHANGE: Restructure and modification of text in the General window (minor).
FIX: Allow characters in the "Listen IP" field; "*" and "localhost" are valid inputs.

0.9.11-2

Changelog

FIX: Fixed repeated resending of sms or email in almost zero-time intervals in case resend-time interval was configured to less than 1 minute.
ADD: Anonymized log files. Can be used to post logs in bug reports etc. Works like this: Logfile shown by command "smscon -log" is now anonymized by default (phone numbers, host names, IP-addresses)
  IMPORTANT NOTE(1): Anonymizing takes place with ABSOLUTELY NO guarantee!
  IMPORTANT NOTE(2): It is NOT A BUG if there is too much or "wrong" anonymizing. If new option "-pw password" was seen on command line before -log, then logfile is shown un-anonymized as before. And of course a super user has not limits anyway.
CHANGE: Logfile is no longer readable by normal user.
FIX(MINOR): Fixed typos and added more comments.	

0.9.10-1

Changelog

FIX: If called in user mode, prevent -export or -export! option to create/write files that user has no permissin to create or write.
FIX: Fix crash: TypeError: can only concatenate tuple (not "list") to tuple	

0.9.9-1

Changelog

CHANGE: Deamon does no longer need to restart for switching between test mode and normal operation mode.
FIX: Daemon now reads test command requests from a named pipe and works them off sequentially (allows to quickly start several tests in a short time).
FIX: Fixed that COM_REMOTEOFF command did not work.
FIX: Fixed daemon crash ("need more than 3 values to unpack")
FIX (AGAIN): Force using busybox ps-command to ensure that process information like PID is at expected place.	

0.9.8-1

Changelog

FIX: Fixed problems with daemon process ids on devices with extended "ps" command installed. This bug might prevent power users from using smscon. So this fix is reason for early release of new version.
FIX: Fixed interchanged message parameters in smscon -init! command output.
ADD: Added usage hints to initial smscon_script file (minor change).	

0.9.7-1

Changelog

FIX: Send battery status notification if charge is below 10% AND discharging (not OR discharning). If devices can't tell change/discharge status; discharge is assumed.
FIX: Don't check for bootloader if in test mode.
FIX: Wrong error message that daemon did not start on devices with extended "ps" command installed.

0.9.3-1

Changelog

 REFACTURING:
          * Extracted common code to a library (smsconlib.py) which is now used by smscon_daemon, smscon control program and smscon-editor.
          * Added a lot of code comments.
          * Encapsulated many code into classes. E.g. the complete encyption stuff is now transparent to smscon control program and smsmcon editor.
          * Restructured code, written new and renamed a lot of old stuff.
          * Moved code from files "smscon" and "smscon_daemon" to pure python-modules (smscon_master.py and smscon_service.py respectively). The original files are now just jackets calling main() in associated python module. This allows to compile the modules and hiding source code.
 NEW:    Encryption now uses salt (formerly encrypted data can be read).
 FIX:    Encryption does no longer fail on text ending with curly open brace.
 NEW:    "MASTERNUMBER" concept: A SMS number stored in the config file that  does NOT change due to SMS commands like "SENDERNUMBER" does. Each SMS is send to both (only once if they are the same numbers, of course). SMS replies to commands which are not introduced by SMS (e.g. via CHECKHOST) are sent to the MASTERNUMBER only. On upgrading, the default MASTERNUMBER is set to the current SENDERNUMBER.
 NEW:    "COM_CUSTOMLOG" command: A SMS command to retreive the output of the last "COM_CUSTOM" command. Will be sent via email only - would send too much SMS...
 NEW:    "COM_LOG" command: A SMS command to retreive the smscon.log file. Will be sent via email only - would send too much SMS...
 NEW:    The output of "COM_SHELL" SMS command is now sent as a command reply. You may have to remove output redirections from your shell command to get non-empty reply.
 NEW:    "SMS_PARTS_LIMIT": A number to limit the number of single SMS that would otherwise be generated to send a too long SMS message. Zero means no limit.
 NEW:    "LOG_TIMEFORMAT": Format to be used in time stamps of SMS and EMAIL messages.
 NEW:    "SMS_COMPREFIX" and "SMS_COMSUFFIX": Instead of explicitly define all your SMS control commands (COM_xxx) to start with a unique prefix and/or suffix, you might now separately define a prefix and/or suffix that is implicitely used. While "SMS_COMPREFIX" and "SMS_COMSUFFIX" are empty, all your commands do as in older versions. Advantage of using "SMS_COMPREFIX" and "SMS_COMSUFFIX":
          * Prefix and suffix can be changed easyly while embedded COM_xxx remain unchanged.
          * Prefix and suffix apply to COM_SHELL command as well. Example:
              With the configuration set to:
                  COM_SHELL=uptime
                  SMS_COMPREFIX=aaa.
                  SMS_COMSUFFIX=.bbb
              The recognized SMS command to execute the shell command "uptime" is:
                  aaa.uptime.bbb
 FIX:    It is no longer possible to define two SMS commands as the same string except the empty string, which means to disable that command being given via SMS.
 FIX:    SMS command recognition is no longer restricted to ASCII characters. The complete GSM 7 bit default alphabet may be used now (but not unicode). This gives you a greather variete of chars to use for your SMS commands.
 NEW:    The config file will now upgrade automagically from any previous version. New options are set to their default, obsolete options are commented out.
 NEW:    New function to export and import settings to/from arbitrary file. (see smscon -export and -import options). smscon editor makes now use of this functions to retrieve a and deploy editable configuration.
 NEW:    The smscon_daemon does no longer need to be restarted explicitly if smscon changes a setting. The daemon detects changes automagically and will read and apply the new configuration automatically.
 NEW:    The smscon_daemon now maintains a "last known good" configuration and uses that as a fallback in case the "official" configuration of smscon can't properly loaded by the daemon.
 NEW:    Camera picture and GSP Location requests do no longer force unconditional switching to GPRS network connection. The current connection will be used if the internet is reachable. Should a GPRS connection be required to reach internet, the GPRS connection is established but the previous network is re-activated after picture and/or location has been replied.
 NEW:    A LOGGER is now used wherever possible. So the smscon.log file becomes really interesting.
 NEW:    The "CHECKHOST" URL is now extended by "?LASTMCD=nn&CHECKTIME=minutes" which will allow the URL being a script that may use this information.
 CHANGE: "CHECKHOST" now works more clear as follows: While polling for commands, a command is executed once, if it differs from the last polled command. The last polled command is initialized to "-1" on daemon start. Code "-1" is "restart daemon" and this obviously is what happened on daemon start. Code "17" (COM_RESTART) is deprecated as a CHECKHOST command. Since it is different from "-1" it may restart the daemon repeatedly. Use code "-1" to restart the daemon via CHECKHOST instead. Of course, before a change to code "-1" is recognized by the daemon, you must have give it a different command code. If in doubt use "01" (COM_CHECK) because it gives you feedback that the command has been seen.
 CHANGE: "CHECKTIME" may now be a float to specify fractional parts of a minute: 0.25 is 15 seconds.  
 NEW:    The "CHECKHOST" URL may now have a protocol prefix and it may be different from "http://". If the URL has no protocol prefix, then "http://" is supplied as default as in former versions (e.g. your config file remains valid in this point as well).
 NEW:    The battery status is logged before a command is about to be executed.
 NEW:    "REMOTELISTENIP", "REMOTELISTENPORT" and "REMOTE2LOCALPORT": These settings give you greather flexibility of setting up a tunnel to remote control your phone via a reverse ssh-connection: Use "REMOTELISTENIP" and "REMOTELISTENPORT" to define the tunnel entry maintained by the remote ssh-server (which must be setup to allow setting LISTENIP and PORT this way). "REMOTELISTENPORT" defaults to 8080 and "REMOTELISTENIP" defaults to "localhost" as in former versions. With these defaults you must be logged in at the ssh-server to start a remote control connection of your phone. While setting up "REMOTELISTENIP" you may even control the phone from somewhere else (in which case the ssh-server act as a proxy or relay). On the tunnel exit side, which is on your phone, the "REMOTE2LOCALPORT" is the port number where your phone's ssh-daemon is listening (usually 22).
 CHANGE: The "smscon -devconfig" command now requires a password to show the uncrypted configuration. The MASTERNUMBER is the password.
 NEW:    "RESENDMAXTRY": This option defines the maximum number of message re-send tries. Applies to SMS and EMAIL as well. (0=no limit) On configuration upgrade this is initialized to 10.
 NEW:    smscon now has a -sendsms option to send SMS immediately. Despite being a nice feature by itself, it makes smscon editor independent from smssend program which requires an extra package.
 NEW:    smscon now allows all options to start with the usual double dash as well.

0.8.1-3

Changelog

  • CHANGE/FIX: bug in ENABLECHECKHOST option; would execute wrong command & updated wiki because of some changes. See WIKI/Usage!

Issues

  • Using Wrong 3G connection when fMMS is installed (MMS connection instead)(unconfirmed by Vanvan)

* The "_" character does not get decoded correctly on reception and any command having this fails to execute. Recommended: until a fix is made avoid using this character in the commands. (confirmed) -- fixed in 0.9.x yablacky 08:46, 16 January 2012 (UTC)

0.8.1-2

Changelog

  • MINOR FIX: removed debug line in smscon code.

Issues

  • Using Wrong 3G connection when fMMS is installed (MMS connection instead)(unconfirmed by Vanvan)

0.8.1-1

Changelog

  • FIX: shutdown & reboot routine (EnablePoweroff & EnableReboot) give internal error.
  • NEW/CHANGE: expanded user setting MESSAGESEND ('sms', 'email', 'both' & 'none')
  • CHANGE: Removed DISABLESMS user setting. This is superseded by MESSAGESEND user setting!
  • CHANGE: with unauthorized SIM card change, SMS always will be send regardless of MESSAGESEND setting.
  • NEW: added smscon command (RESTART); user can restart smscon_daemon by SMS command.
  • NEW: added smscon command (COM_ALARM); phone will play user configurable sound file (only WAV format and must be named alarm.wav and placed in /opt/smscon directory) when command is received.
  • NEW: smscon_daemon sends SMS/email message if smscon_daemon crashes.
  • CHANGE: changed user setting ENABLERESEND ('yes', 'no'). Resending of messages will again be experimental feature!!!
  • CHANGE: removed MAXRESEND user setting (didn't work properly).
  • CHANGE: some log text changed/added.
  • CHANGE: removed updatechecker during installation of smscon (failed to work previously).
  • CHANGE: some changes in GPS message sending code.
  • CHANGE: AUTODEVICELOCK message is only send if COMMANDREPLY is enabled.
  • FIX: small bug in SMSsend().
  • FIX: bug in GPSINTERVAL handeling; GPSINTERVAL was always set at 60 sec. regardless of user setting.
  • CHANGE: The log file location changed from /tmp/smscon.log to /opt/smscon/smscon.log (whereas location of /tmp/smscon_boot.log did not change).

Issues

  • Using Wrong 3G connection when fMMS is installed (MMS connection instead)(unconfirmed by Vanvan)


Versions 0.8, 0.7, 0.6, 0.5 & 0.4

Please don't use these anymore. Update to 0.9 or higher.

Future development ideas

Feel free to add requests below.

  • Add a provision for SMS reception without the UI being notified (so that SMSCON control is silent). INFO: Remote command server (CHECKHOST) already offers silent control.
  • saving all smscon_config user variables in gconf database. No need for smscon_config file anymore. (WONT IMPLEMENT)
  • add setting for user's country mobile number prefix.
  • add setting for alternative number (where alternative is a number sent a command and does not match the default) and option to choose where reply should be send, i.e. default number, alternative or both. Default number should not be replaced. INFO: Since 0.9.x there is a MASTERNUMBER concept. This is a default number that is never replaced
  • add setting to choose the default internet connection (WLAN, GPRS, or ANY).
  • when the "Camera" command is sent, the process should wait for keyboard action to capture a picture and send the mail. In that way, there will be more chances to get better face portrait of the "new" user.
  • Add the ability to run more than one custom command.
  • Application must be included in the ROM itself so that it cannot be removed. (CAN'T BE IMPLEMENTED)
  • Add a password so that no one else but the legitimate user can send an SMS to the phone and see where the phone is. (INFO: Use the prefix/suffix option in smscon editor application or set SMS_COMPREFIX/SMS_COMSUFFIX options via command-line)
  • Auto remove the received SMS from conversations.
  • Disable PhoneSpeakerSwitch on receipt of 'call' command.
  • EmailCON: check an specified email inbox, reading it with the program itself and not the built in default mail prog, at a given frequency, paying attention to commands written in the subject and/or body, accepting all the commands that are accepted via SMS. (WONT IMPLEMENT)
  • Improve handling of front camera to reduce the odds of crappy or plain blank black pictures being taken. (CAN'T BE IMPLEMENTED)
  • When in "stolen" mode, replace the front cam "recording" LED pattern with a on-lighting pattern for stealthiness.
  • Email, or post online somewhere you choose, any new photography taken with the main camera, geotagging whenever possible, preferably without showing any signs it's happening (if possible with an option to re-dimension the picture before sending).
  • There should be an option to send email as text or as multipart html and text.
  • For encryption of user settings secret code key could be based on device serial number (no more predefined key in script); this enhances security.

Testers needed

Please test this software, I like to hear if it works for you or not. Please post on forum. I only can test the software with two Vodafone SIM cards from The Netherlands, I want to know if it also works with other cards and networks in other countries...

Watch Packages in QA testing queue if SMSCON and/or SMSCON Editor is present there. You're encouraged to test and tell your positive or negative feedback there (thumbs up or down). Thereby following the rules of Quality Assurance criteria.

Should you find bugs, here's how to report bugs.

License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 only.

Disclaimer

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Wiki access history

Some statistics... Updated every now and then.

This page has been accessed 33,640 times. --yablacky 00:42, 24 January 2012 (UTC)
This page has been accessed 33,870 times. --yablacky 09:04, 27 January 2012 (UTC)
This page has been accessed 34,654 times. --yablacky 08:43, 4 February 2012 (UTC)
This page has been accessed 35,120 times. --yablacky 07:46, 8 February 2012 (UTC)
This page has been accessed 36,505 times. --yablacky 21:33, 22 February 2012 (UTC)
This page has been accessed 37,061 times. --yablacky 23:26, 28 February 2012 (UTC)
This page has been accessed 38,145 times. --yablacky 08:01, 11 March 2012 (UTC)
This page has been accessed 39,024 times. --yablacky 08:51, 18 March 2012 (UTC)
This page has been accessed 41,132 times. --yablacky 00:57, 13 April 2012 (UTC)
This page has been accessed 42,375 times. --yablacky 15:30, 28 April 2012 (UTC)