Editing SMSCON

Warning: You are not logged in. Your IP address will be recorded in this page's edit history.

Warning: This page is 70 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:
-
==Preface: Early Development/Release Info==
+
'''Please Note: Update for 0.9.19++ is in progress for this page. In particular section "Usage" still needs updates...'''. --[[User:yablacky|yablacky]] 00:14, 23 May 2012 (UTC)
-
 
+
-
Info not yet present in regular part of this wiki:
+
-
[http://talk.maemo.org/showpost.php?p=1236734&postcount=1213 smscon 0.10.6-1].
+
-
 
+
-
Update for 0.9.19++ is in progress for this wiki. In particular section "Usage" still needs updates.
+
==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. Details are [[ #Remote command server setup and use | here]].
+
* Asking a remote command server for commands.<br/>This functionality is available if you have a file under your control that is accessible via internet. A private homepage that allows you to serve an extra file might be all you need.
* 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. Details are [[ #List of known sms commands | here]].
+
* Send help about all currently recognized SMS commands.<br/>This is very handy if you've forgotten them. This way you need just to remember the code of one single command (the COM_CHECK command and its prefix/suffix).
* Supports use of multiple SIM cards.
* Supports use of multiple SIM cards.
-
* Detect SIM card change. Details are [[ #SIM card change detection | here]].
+
* Detect SIM card change.<br/>The first time an unknown SIM is detected, SMSCON will send a notification. It contains 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.
-
* Detect SIM card removal. Details are [[ #SIM card removal detection | here]].
+
* Detect SIM card removal [since version 0.9.19].<br/>Each time the phone boots without a SIM card, SMSCON tries to send an email notification (SMS is not possible without SIM). Email might work if the phone has somehow connected to an already known WLAN. Send retry option applies. In this case there is a chance to control the phone at least via CHECKHOST method.<br/>
 +
'''Note:''' On device boot it is possible to simply skip the SIM-card PIN-code question. To SMSCON this appears the same as SIM card removal. Consequently the email subject sent is "No or skipped SIM".
 +
'''Hint:''' Some user complained about being notified that they use their N900 albeit they use it without SIM in a home WLAN. Well, its not a bug, its a feature. Previously SMSCON throws away all possibilities being controlled and
 +
just terminates itself. Should you use your phone this way and don't want any notifications, then do the same thing and stop SMSCON explicitly.
* 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 75: Line 73:
* 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 or [[SMSCON Editor]].
+
* 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 175:
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.
-
 
-
Prevent common mistake: If you receive the same SMSCON reply messages twice on a controlling phone, then check and ensure the MASTERNUMBER you've defined starts with international country prefix.
 
===After installation===
===After installation===
Line 400: Line 396:
                                       host your-computer.com on port 4321
                                       host your-computer.com on port 4321
  CameraON,your-computer.com:4321  --> ditto
  CameraON,your-computer.com:4321  --> ditto
-
  Camera1,your-computer.com:4321  --> ditto (the 1 behind Camera is a 'one')
+
  Camera1,your-computer.com:4321  --> ditto
  Camera1,your-computer.com        --> ditto, but uses default port 5000
  Camera1,your-computer.com        --> ditto, but uses default port 5000
-
  Camera0,your-computer.com        --> request to stop video (the 0 behind Camera is a 'zero')
+
  Camera0,your-computer.com        --> request to stop video
  Camera0                          --> ditto
  Camera0                          --> ditto
  CameraOFF                        --> ditto
  CameraOFF                        --> ditto
Line 415: Line 411:
                       live stream. Default port number is 5000.
                       live stream. Default port number is 5000.
-
If the video receiving computer is in a LAN behind a (DSL-)router (and the phone isn't) then you need to configure the router to forward the port for the UDP protocol.
+
If the video receiving computer is in a LAN behind a (DSL-)router (and the phone isn't but currently has a 2G or 3G IP) then you need to configure the router to do port forwarding. This is almost the same thing as for CHECKHOST (but video is sent via udp, CHECKHOST checks via tcp).
By design SMSCON does not support a pre-configured video receiving host. It must be specified in each COM_CAMERA command explicitly. This gives you a wide range of possible computers where to watch the video.
By design SMSCON does not support a pre-configured video receiving host. It must be specified in each COM_CAMERA command explicitly. This gives you a wide range of possible computers where to watch the video.
Line 588: Line 584:
* 'Restart' will stop and start again the smscon_daemon.
* 'Restart' will stop and start again the smscon_daemon.
-
===Remote command server setup and use===
+
===Remote command server===
-
 
+
-
To use this functionality you need a file that is accessible via internet and you must be able to change the content of that file somehow. A private or company homepage that allows you to serve a small extra file in some inconsiderable subdirectory might be all you need.
+
-
 
+
-
Find out the URL to retrieve the file and test the URL in a web-browser. Then setup SMSCON to query your remote command server as follows:
+
-
 
+
-
smscon -set CHECKHOST "http://my-homepage.example.com/privat/phone/control.txt"
+
-
smscon -set CHECKTIME 15                  # minutes
+
-
smscon -set ENABLECHECKHOST yes
+
-
 
+
-
Once done, you can trigger any SMS commands by changing the content of the control.txt file (the file referred to by above URL which is an example only).
+
-
The file only must contain one of the following codes from 00, 01 to 19 or -1:
+
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 611:
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 transferred with each query. So better keep the file small.
+
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.
-
Note that it currently is not possible to specify values for placeholders that may be defined in a sms command (e.g. COM_CAMERA command etc).
+
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.
-
 
+
-
SMSCON checks the content of the file and executes the corresponding command if the content '''changed''' since last check. This prevents repeated command execution. On the other hand, to give the same command again explicitly, you have to switch to a "no comand" in between, which has code 00. Don't change the command codes too early. Wait for at least CHECKTIME minutes.
+
-
 
+
-
If the phone has problems when reading the file from your server via the http protocol (or the protocol you set), then 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 detect and execute the command.
+
-
 
+
-
===SIM card change detection===
+
-
 
+
-
The first time an unknown SIM is detected, SMSCON will send a notification. It contains 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.
+
-
 
+
-
An unknown SIM is then entered to the SIM card database and will no longer generate a SIM card change notification.
+
-
 
+
-
===SIM card removal detection===
+
-
 
+
-
[since version 0.9.19] Each time the phone boots without a SIM card inserted, SMSCON tries to send an email notification (SMS is not possible without SIM). Email might work if the phone has somehow connected to an already known WLAN. The send retry option applies.
+
-
 
+
-
If email could be sent without SIM, there is a chance to control the phone at least via remote command server.
+
-
 
+
-
'''Note:''' On device boot it is possible to simply skip the SIM-card PIN-code question. To SMSCON this appears the same as SIM card removal. Consequently the email subject sent is "No or skipped SIM".
+
-
'''Hint:''' Some user complained about being notified that they use their N900 albeit they use it without SIM in a home WLAN. Well, its not a bug, its a feature. Previously SMSCON versions throw away all possibilities being controlled by terminating itself. Should you use your phone this way and don't want any notifications et all, then do the same thing and stop SMSCON explicitly.
+
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===
===Example config file===
Line 866: Line 832:
===Remote SSH connection===
===Remote SSH connection===
-
If SMSCON receives a COM_REMOTEON command (default command code 'Remoteon') it starts a ssh-server on the phone which tries to connect the host defined by REMOTEHOST setting, the "server side" (your own server). Values of REMOTEUSER and REMOTEPASSWORD settings are used to authenticate when contacting REMOTEHOST. This connection is (the reverse) part of the SSH connection tunnel being built.
+
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:
-
 
+
-
Once this (reverse-)SSH connection is made you can from the server side (=REMOTEHOST) connect to your Nokia device with the following shell command:
+
<pre>
<pre>
ssh -p 8080 localhost -l root
ssh -p 8080 localhost -l root
</pre>
</pre>
-
 
-
The hostname (''localhost'' in this example) was defined by the REMOTELISTENIP setting. The hostname ''localhost'' has special meaning, namely that you have to be logged in at your own server already when giving the above command.
 
-
 
-
The port number (''8080'' in this example) is a port number on REMOTEHOST and was defined by the REMOTELISTENPORT setting.
 
-
 
-
Above command contacts your phone at port 22 (or what ever port is defined by REMOTE2LOCALPORT setting). On the phone at this port the ssh-server is listening for incoming 'please open the door at the end of the tunnel' requests.
 
-
 
-
When you start making experiences with remote SSH connection you should leave all settings to their default, except REMOTEHOST, REMOTEUSER and REMOTEPASSWORD which must suit your own server name, user account on that server and its password.
 
-
 
-
On top of that, the remote SSH connection is even more powerful: If configured accordingly, it allows to contact the phone not only when you are logged in at REMOTEHOST. It supports connecting the phone from any (or particular) hosts in the internet as long as they are able to contact REMOTEHOST. In this case REMOTEHOST forwards  traffic to/from to the phone. Details on how to do this will follow.
 
==Files==
==Files==
Line 944: Line 898:
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.19-1 (Current [[Extras-devel]]) ===
+
=== 0.9.18-1 (Current [[Extras-devel]], [[Extras-testing]]) ===
-
 
+
-
'''Changelog'''
+
-
FIX: Fix poor image quality on COM_CAMERA command. SMSCON now uses ambient light sensor to select proper exposure and gain values for camera.
+
-
 
+
-
FIX: Fix leaving temp files on smsmcon installation/upgrade.
+
-
 
+
-
ADD/CHANGE: SMSCON now keeps running rather than terminating itself if it does not detect a SIM card. This offers a litte chance that the phone connects to the internet via wlan which in turn allows to use CHECKHOST to control the phone. Note: If user skips the SIM code question on device boot, the phone treats this the same as if no SIM is present. SMSCON makes no difference. Now SMSCON makes an attempt to send a notification via email if no SIM was detected.
+
-
 
+
-
ADD: The COM_CAMERA command does now accept up to 3 parameters. To use them a user has to define the COM_CAMERA command on his phone to contain at least three (recommended optional) placeholders (a placeholder is written as ** or * char). More details see SMSCON wiki.
+
-
 
+
-
=== 0.9.18-1 ([[Extras-testing]]) ===
+
'''Changelog'''
'''Changelog'''
Line 1,152: Line 1,095:
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>
-
This page has been accessed 43,675 times. --[[User:yablacky|yablacky]] 06:51, 16 May 2012 (UTC) wow, 10,000 :))<br>
+
This page has been accessed 43,675 times. --[[User:yablacky|yablacky]] 06:51, 16 May 2012 (UTC) wow, 10.000 :))<br>
This page has been accessed 44,554 times. --[[User:yablacky|yablacky]] 02:45, 23 May 2012 (UTC)<br>
This page has been accessed 44,554 times. --[[User:yablacky|yablacky]] 02:45, 23 May 2012 (UTC)<br>
-
This page has been accessed 44,921 times. --[[User:yablacky|yablacky]] 21:33, 24 May 2012 (UTC)<br>
 
-
This page has been accessed 48,809 times. --[[User:yablacky|yablacky]] 21:19, 8 June 2012 (UTC)<br>
 
-
This page has been accessed 55,671 times. --[[User:yablacky|yablacky]] 16:21, 13 July 2012 (UTC) 22,000!!<br>
 
-
This page has been accessed 77,263 times. --[[User:yablacky|yablacky]] 16:37, 20 May 2013 (UTC)<br>
 
[[Category:Software]]
[[Category:Software]]
[[Category:N900]]
[[Category:N900]]

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)