<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://maemo.octonezd.me/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=82.201.1.161</id>
	<title>Maemo Wiki Mirror - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://maemo.octonezd.me/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=82.201.1.161"/>
	<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php/Special:Contributions/82.201.1.161"/>
	<updated>2026-04-22T07:09:54Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=SMSCON&amp;diff=37076</id>
		<title>SMSCON</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=SMSCON&amp;diff=37076"/>
		<updated>2010-09-10T13:51:07Z</updated>

		<summary type="html">&lt;p&gt;82.201.1.161: /* Current version v0.4.0 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SMSCON provides complete control of your [[Nokia N900|N900]] by sending SMS messages to it. This is particularly handy in case you cannot find your phone, for example if it has been lost or stolen.&lt;br /&gt;
 &lt;br /&gt;
SMSCON is a two part Python script running in CLI; &amp;lt;code&amp;gt;smscon&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;smscon_daemon&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;smscon&amp;lt;/code&amp;gt; is the CLI control part and &amp;lt;code&amp;gt;smscon_daemon&amp;lt;/code&amp;gt; is the &amp;quot;running in the background&amp;quot; part. The configuration file for all the user settings is in the &amp;lt;code&amp;gt;smscon_config&amp;lt;/code&amp;gt; file.&lt;br /&gt;
 &lt;br /&gt;
=Functionality=&lt;br /&gt;
&lt;br /&gt;
SMSCON can:&lt;br /&gt;
&lt;br /&gt;
* autoload at boot (this is default set at install of smscon package); when device reboots it loads &amp;lt;code&amp;gt;smscon_daemon&amp;lt;/code&amp;gt; in the background.&lt;br /&gt;
* creates a log file (on the device)&lt;br /&gt;
* detect SIM card change and sends new phonenumber and IMSI code (returns SMS) to other known mobile number; if somebody has stolen your phone and put his/hers own SIM card in it.&lt;br /&gt;
* send current GPS location coordinates (returns SMS or EMAIL with GoogleMaps picture with location on it).&lt;br /&gt;
* reboot the phone; only works if your SIM card hasn&#039;t a lock code.&lt;br /&gt;
* shutdown the phone.&lt;br /&gt;
* open a reverse ssh connection to your own server (GPRS connection); control the device at CLI level from your own home.&lt;br /&gt;
* email a frontcam picture to your email address (GPRS connection); to see where your phone is or who is using it.&lt;br /&gt;
* send the current remaining battery charge (returns SMS).&lt;br /&gt;
* make the phone call you; you can listen where your phone is (returns phonecall)&lt;br /&gt;
* lock the device; nobody can control your device anymore.&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
&lt;br /&gt;
SMSCON is writen in Python and needs the following packages installed on your device to install and run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apt-get install maemo-python-device-env&lt;br /&gt;
apt-get install python-location &lt;br /&gt;
apt-get install pexpect&lt;br /&gt;
apt-get install gstreamer-tools &lt;br /&gt;
apt-get install openssh &lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The two (&amp;lt;code&amp;gt;smscon&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;smscon_daemon&amp;lt;/code&amp;gt;) are placed in the &amp;lt;code&amp;gt;/usr/bin&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
 &lt;br /&gt;
Also you need a fixed IP address on your remote server for the reverse-ssh (port 22) connection, if you want to use the &#039;Remoteon&#039; / &#039;Remoteoff&#039; function.&lt;br /&gt;
 &lt;br /&gt;
=Usage=&lt;br /&gt;
 &lt;br /&gt;
SMSCON is triggered by a SMS message with a predefined known command and then will execute the task in the background. If so it will send a reply SMS with the information.&lt;br /&gt;
&lt;br /&gt;
==Commands== &lt;br /&gt;
The default commands are: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Nokia-N900:~# smscon -sms&lt;br /&gt;
COM_CHECK = &#039;Check&#039;&lt;br /&gt;
COM_REBOOT = &#039;Reboot&#039;&lt;br /&gt;
COM_POWEROFF = &#039;Poweroff&#039;&lt;br /&gt;
COM_POWER = &#039;Power&#039;&lt;br /&gt;
COM_LOCATION = &#039;Location&#039;&lt;br /&gt;
COM_REMOTEON = &#039;Remoteon&#039;&lt;br /&gt;
COM_REMOTEOFF = &#039;Remoteoff&#039;&lt;br /&gt;
COM_CAMERA = &#039;Camera&#039;&lt;br /&gt;
COM_CALL = &#039;Call&#039;&lt;br /&gt;
COM_LOCK = &#039;Lock&#039;&lt;br /&gt;
COM_UNLOCK = &#039;Unlock&#039;&lt;br /&gt;
COM_TRACKON = &#039;Trackon&#039;&lt;br /&gt;
COM_TRACKOFF = &#039;Trackoff&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These commands can be altered in the &amp;lt;code&amp;gt;smscon_config&amp;lt;/code&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# smscon user settings (v0.4.0)&lt;br /&gt;
# (edit only the user settings below!)&lt;br /&gt;
&lt;br /&gt;
# Sms settings&lt;br /&gt;
SENDERNUMBER      = &#039;+XXXXXXXXXXX&#039;&lt;br /&gt;
&lt;br /&gt;
# Sms commands&lt;br /&gt;
COM_CHECK         = &#039;Check&#039;&lt;br /&gt;
COM_REBOOT        = &#039;Reboot&#039;&lt;br /&gt;
COM_POWEROFF      = &#039;Poweroff&#039;&lt;br /&gt;
COM_POWER         = &#039;Power&#039;&lt;br /&gt;
COM_LOCATION      = &#039;Location&#039;&lt;br /&gt;
COM_REMOTEON      = &#039;Remoteon&#039;&lt;br /&gt;
COM_REMOTEOFF     = &#039;Remoteoff&#039;&lt;br /&gt;
COM_CAMERA        = &#039;Camera&#039;&lt;br /&gt;
COM_CALL          = &#039;Call&#039;&lt;br /&gt;
COM_LOCK          = &#039;Lock&#039;&lt;br /&gt;
COM_UNLOCK        = &#039;Unlock&#039;&lt;br /&gt;
COM_TRACKON       = &#039;Trackon&#039;&lt;br /&gt;
COM_TRACKOFF      = &#039;Trackoff&#039;&lt;br /&gt;
&lt;br /&gt;
# Email settings&lt;br /&gt;
# (only works for smtp access without secure authentication!)&lt;br /&gt;
EMAILADDRESS      = &#039;XXXXX@XXXXXXXXXXX.XX&#039;&lt;br /&gt;
USER              = &#039;XXXXXXXX&#039;&lt;br /&gt;
PASSWORD          = &#039;XXXXXXXX&#039;&lt;br /&gt;
EMAILFROM         = &#039;XXXXXXXX@XXXXXX.XX&#039;&lt;br /&gt;
MAILSERVER        = &#039;XXXX.XXXXXX.XX&#039;&lt;br /&gt;
MAILPORT          = 25&lt;br /&gt;
&lt;br /&gt;
# Reverse-ssh settings&lt;br /&gt;
REMOTEHOST        = &#039;XXXXXXXXXXX.XX&#039;&lt;br /&gt;
REMOTEPORT        = 22&lt;br /&gt;
REMOTEUSER        = &#039;XXXXXXXXXXXXX&#039;&lt;br /&gt;
REMOTEPASSWORD    = &#039;XXXXXXXXXX&#039;&lt;br /&gt;
&lt;br /&gt;
# Send acknowledge sms&lt;br /&gt;
# (send acknowledge sms after receiving valid sms command: &#039;yes&#039; / &#039;no&#039;)&lt;br /&gt;
COMMANDREPLY      = &#039;no&#039;&lt;br /&gt;
&lt;br /&gt;
# Device lock&lt;br /&gt;
# (lock device after receiving valid sms command: &#039;yes&#039; / &#039;no&#039;)&lt;br /&gt;
AUTODEVICELOCK    = &#039;no&#039;&lt;br /&gt;
&lt;br /&gt;
# Gps setings&lt;br /&gt;
# (if no gps coordinates acquired after 600 seconds then stop)&lt;br /&gt;
GPSTIMEOUT        = 600&lt;br /&gt;
# (number of gps coordinates to acquire and use the most accurate in &amp;quot;Location&amp;quot; mode)&lt;br /&gt;
GPSPOLLING        = 4&lt;br /&gt;
# (time between sending coordinate sms in &#039;Trackon&#039; mode: 10 / 20 / 30 / 60 / 120)&lt;br /&gt;
GPSINTERVAL       = 60&lt;br /&gt;
# (method to send gps coordinates: &#039;email&#039; / &#039;sms&#039;)&lt;br /&gt;
GPSSEND           = &#039;email&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==Options==&lt;br /&gt;
The available options for SMSCON are:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;Nokia-N900:~# smscon&lt;br /&gt;
== smscon v0.4.0 - Nokia N900 remote control utility ==&lt;br /&gt;
 Options:&lt;br /&gt;
  -start      : start smscon_daemon&lt;br /&gt;
  -stop       : stop smscon_daemon&lt;br /&gt;
  -status     : get smscon_daemon status&lt;br /&gt;
  -log        : show log file&lt;br /&gt;
  -del log    : erase log file&lt;br /&gt;
  -sms        : show sms commands&lt;br /&gt;
  -help       : this help menu&lt;br /&gt;
 Special options:&lt;br /&gt;
  -boot       : start smscon_daemon at device boot&lt;br /&gt;
  -unboot     : remove start of smscon_daemon at device boot&lt;br /&gt;
  -reset      : factory default&lt;br /&gt;
  -imsi       : show imsi code file&lt;br /&gt;
  -del imsi   : delete smscon_code file&lt;br /&gt;
  -init       : create default smscon_config&lt;br /&gt;
  -del config : delete smscon_config file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SMSCON is intended for people who have Python programming / Linux experience so you can adjust the script to their own needs.&lt;br /&gt;
&lt;br /&gt;
==After installation==&lt;br /&gt;
&lt;br /&gt;
After installation &amp;lt;code&amp;gt;smscon&amp;lt;/code&amp;gt; will generate a new configuration file (&amp;lt;code&amp;gt;/usr/bin/smscon_config&amp;lt;/code&amp;gt;) which you *must* edit to your own needs (change all &amp;quot;xxxxxxx&amp;quot;&#039;s). Warning: Use Putty / WinSCP on Windows for this. Don&#039;t use a Windows editor, this may break the config file! SMSCON will also be installed to autoload at boot, this can be disabled with the command &amp;quot;&amp;lt;code&amp;gt;smscon -unboot&amp;lt;/code&amp;gt;&amp;quot; and re-enabled by &amp;quot;&amp;lt;code&amp;gt;smscon -boot&amp;lt;/code&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The first time you start SMSCON (&amp;lt;code&amp;gt;smscon -start&amp;lt;/code&amp;gt;) it loads the configured user settings file and is now active. &amp;lt;code&amp;gt;smscon_daemon&amp;lt;/code&amp;gt; then stores your valid IMSI code in a file (&amp;lt;code&amp;gt;/usr/bin/smscon_code&amp;lt;/code&amp;gt;) if the file doesn&#039;t exist.  When later a new SIM card is inserted the new IMSI code is verified with the code in the stored file. This is the &amp;quot;SIM card change detect&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Nokia-N900:~# smscon -start&lt;br /&gt;
smscon_daemon started.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All user action and behavior of &amp;lt;code&amp;gt;smscon_daemon&amp;lt;/code&amp;gt; will be logged in the log file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Nokia-N900:~# smscon -log&lt;br /&gt;
SMSCON INFO: smscon_daemon active (09-09-2010 11:00:48)&lt;br /&gt;
DAEMON INFO: user settings succesfully loaded from &amp;quot;smscon_config&amp;quot; file (09-09-2010 11:00:49)&lt;br /&gt;
DAEMON INFO: reading valid IMSI code (XXXXXXXXXXXXXXX) from file (09-09-2010 11:00:49)&lt;br /&gt;
DAEMON INFO: authorized IMSI code found (09-09-2010 11:00:49)&lt;br /&gt;
DAEMON INFO: smscon autoloads at boot (09-09-2010 11:00:49)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Remote SSH connection==&lt;br /&gt;
&lt;br /&gt;
When the (reverse-)SSH connection is made (default command &#039;Remoteon&#039; / &#039;Remoteoff&#039;) you can from the server side (your own server) connect to your Nokia device with the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh -p 8080 localhost -l root&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
=Current version v0.4.1=&lt;br /&gt;
&lt;br /&gt;
REMOVE PREVIOUS VERSION FROM NOKIA BEFORE USING 0.4.0 or higher &lt;br /&gt;
(reason: major change in &amp;lt;code&amp;gt;smscon_config&amp;lt;/code&amp;gt; file)!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* bug fixes, bug fixes, bug fixes in data connection handling (I hope, you test it).&lt;br /&gt;
* sms commands have changed; you can now use spaces in commands.&lt;br /&gt;
* &amp;lt;code&amp;gt;smscon_daemon&amp;lt;/code&amp;gt; will use only GPRS connection for sending email and reverse-ssh connection.&lt;br /&gt;
* &amp;lt;code&amp;gt;smscon_daemon&amp;lt;/code&amp;gt; will lock the device after first valid sms command is received (user configurable).&lt;br /&gt;
* &amp;lt;code&amp;gt;smscon_daemon&amp;lt;/code&amp;gt; now stores the phonenumber where you send your control sms&#039;s from into &amp;lt;code&amp;gt;smscon_config&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;SENDERNUMBER&amp;lt;/code&amp;gt;).&lt;br /&gt;
* added new control command &amp;quot;Lock&amp;quot; and &amp;quot;Unlock&amp;quot;; you now can lock and unlock your device so nobody can use your device.&lt;br /&gt;
* added new control command &amp;quot;Trackon&amp;quot; and &amp;quot;Trackoff&amp;quot;; continiously send (after &amp;lt;code&amp;gt;GPSINTERVAL&amp;lt;/code&amp;gt; time) sms&#039;s (with current location) or email messages (HTML email with current location as a GoogleMaps picture!).&lt;br /&gt;
* at the moment SMSCON can only connect to a smtp server (for sending email) without secure authentication. (will be solved in the future I hope).&lt;br /&gt;
* email sending and ssh connection -only works- through GPRS connection.&lt;br /&gt;
* when installing future updates of SMSCON user settings file (&amp;lt;code&amp;gt;smscon_config&amp;lt;/code&amp;gt;) is not deleted or overwritten.&lt;br /&gt;
* command smscon -reset resets your complete configuration to the state after your smscon package installation. (deleting boot, config, code and log file)&lt;br /&gt;
* &amp;lt;code&amp;gt;smscon_daemon&amp;lt;/code&amp;gt; will stop if no SIM card is found at boot. No SMS sending/receiving capability --&amp;gt; no control.&lt;br /&gt;
* changed the way the log file is shown.&lt;br /&gt;
&lt;br /&gt;
=Previous version v0.4.0=&lt;br /&gt;
&lt;br /&gt;
* may not work due to a bug (typo in variable name)&lt;br /&gt;
&lt;br /&gt;
=Future development=&lt;br /&gt;
&lt;br /&gt;
* saving all &amp;lt;code&amp;gt;smscon_config&amp;lt;/code&amp;gt; user variables in gconf database. No need for &amp;lt;code&amp;gt;smscon_config&amp;lt;/code&amp;gt; file anymore.&lt;br /&gt;
* only send camera picture (command &amp;quot;Camera&amp;quot;) when keyboard slider is opened.&lt;br /&gt;
&lt;br /&gt;
=Testers needed=&lt;br /&gt;
 &lt;br /&gt;
Please test this software, I like to hear if it works for you or not. I only could test it with two Vodafone SIM cards from The Netherlands, I want to know if it also works with other cards and networks in other countries...&lt;br /&gt;
&lt;br /&gt;
=Disclaimer=&lt;br /&gt;
&lt;br /&gt;
If this software does harmfull/unwanted things (not to be expected) to your device in any way I can&#039;t be responsible for this.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;br /&gt;
[[Category:N900]]&lt;/div&gt;</summary>
		<author><name>82.201.1.161</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Phone_control&amp;diff=31820</id>
		<title>Phone control</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Phone_control&amp;diff=31820"/>
		<updated>2010-08-13T11:18:53Z</updated>

		<summary type="html">&lt;p&gt;82.201.1.161: /* Turn loudspeaker off */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Recommended phone usage}}&lt;br /&gt;
&lt;br /&gt;
=D-Bus=&lt;br /&gt;
&lt;br /&gt;
These D-Bus commands can be run from terminal or as shell scripts. Useful for scheduling events with [[fcron]], executing from [[Desktop Command Execution Widget scripts|Desktop Command Execution Widget]] or [[Queen BeeCon Widget]], startup events, install scripts, etc. They should be run as:&lt;br /&gt;
&lt;br /&gt;
 run-standalone.sh SCRIPT.sh&lt;br /&gt;
 run-standalone.sh dbus-send COMMAND&lt;br /&gt;
&lt;br /&gt;
This is important to set up the environment correctly otherwise they may barf. If run as user &amp;quot;user&amp;quot; this is not needed.&lt;br /&gt;
&lt;br /&gt;
Also note that most commands don&#039;t need &amp;quot;--print-reply&amp;quot; option. Those that don&#039;t need it should be &#039;&#039;&#039;tested without it&#039;&#039;&#039; and this page should be edited.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Phone==&lt;br /&gt;
&lt;br /&gt;
===Open Phone application===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.HildonDesktop.AppMgr /com/nokia/HildonDesktop/AppMgr com.nokia.HildonDesktop.AppMgr.LaunchApplication string:&amp;quot;rtcom-call-ui&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Make a phone call===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --print-reply --dest=com.nokia.csd.Call /com/nokia/csd/call com.nokia.csd.Call.CreateWith string:&amp;quot;$NUMBER&amp;quot; uint32:0&lt;br /&gt;
&lt;br /&gt;
Change $NUMBER to phone number you want to call.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===End current phone call===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --print-reply --dest=com.nokia.csd.Call /com/nokia/csd/call com.nokia.csd.Call.Release&lt;br /&gt;
&lt;br /&gt;
This will release/end/hangup/reject the current call (or possibly all calls if more then one call is active) or do nothing if no calls are active.&lt;br /&gt;
&lt;br /&gt;
===Answer current phone call===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --print-reply --dest=com.nokia.csd.Call /com/nokia/csd/call/1 com.nokia.csd.Call.Instance.Answer&lt;br /&gt;
&lt;br /&gt;
This will answer/pickup the current (first) call. &lt;br /&gt;
&lt;br /&gt;
If you answer the call immediately as you receive the Call Coming DBUS message the phone seems to be in a specific call state where answering yields a &amp;lt;tt&amp;gt;com.nokia.csd.Call.Error.NotAllowed&amp;lt;/tt&amp;gt; exception.&lt;br /&gt;
&lt;br /&gt;
You need to answer the call after a delay of e.g. 1 s.&lt;br /&gt;
&lt;br /&gt;
Another (probably better) approach is to register to the CallStatus DBUS message (&amp;lt;tt&amp;gt;com.nokia.csd.Call&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;/com/nokia/csd/call/1&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;com.nokia.csd.Call.Instance.CallStatus&amp;lt;/tt&amp;gt;) and wait for a call status &amp;gt;= 2 (=&amp;lt;tt&amp;gt;CSD_CALL_STATUS_COMING&amp;lt;/tt&amp;gt;) after the &amp;quot;Coming&amp;quot; message.&lt;br /&gt;
&lt;br /&gt;
===Get [[:wikipedia:International_Mobile_Equipment_Identity|IMEI]]===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --print-reply --dest=com.nokia.phone.SIM /com/nokia/phone/SIM/security Phone.Sim.Security.get_imei&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Get [[:wikipedia:International_Mobile_Subscriber_Identity|IMSI]]===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --print-reply --dest=com.nokia.phone.SIM /com/nokia/phone/SIM Phone.Sim.get_imsi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Get cellular signal strength===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --print-reply --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.get_signal_strength&lt;br /&gt;
&lt;br /&gt;
First line is percentage, second is dBm, third unknown.&lt;br /&gt;
&lt;br /&gt;
===Get cellular registration status===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --print-reply --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.get_registration_status&lt;br /&gt;
&lt;br /&gt;
===Turn loudspeaker on===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.osso_hp_ls_controller /com/nokia/osso_hp_ls_controller com.nokia.osso_hp_ls_controller.loudspeaker.force_loudspeaker_on&lt;br /&gt;
&lt;br /&gt;
===Turn loudspeaker off===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.osso_hp_ls_controller /com/nokia/osso_hp_ls_controller com.nokia.osso_hp_ls_controller.loudspeaker.force_loudspeaker_off&lt;br /&gt;
&lt;br /&gt;
===Start vibrating===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --print-reply --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_vibrator_pattern_activate string:PatternIncomingCall&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Stop vibrating===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --print-reply --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_vibrator_pattern_deactivate string:PatternIncomingCall&lt;br /&gt;
&lt;br /&gt;
==Profiles==&lt;br /&gt;
&lt;br /&gt;
===Set General===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:&amp;quot;general&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Set Silent===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:&amp;quot;silent&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Query current profile===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --print-reply --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.get_profile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===List all profiles===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --print-reply --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.get_profiles&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==LED==&lt;br /&gt;
&lt;br /&gt;
===Activate LEDs===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_led_pattern_activate string:&amp;quot;PatternCommunicationIM&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Deactivate LEDs===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_led_pattern_deactivate string:&amp;quot;PatternCommunicationIM&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Messaging==&lt;br /&gt;
&lt;br /&gt;
===New e-mail===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.modest /com/nokia/modest com.nokia.modest.MailTo string:&amp;quot;mailto:&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Send and receive e-mail===&lt;br /&gt;
&lt;br /&gt;
It works, but it takes up to 2 minutes for modest to start refreshing and after that it depends on the speed of the connection how fast it is going to be completed, usually up to 5 seconds, 2G can be a bit slower.&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.modest /com/nokia/modest com.nokia.modest.SendReceive&lt;br /&gt;
&lt;br /&gt;
===Set presence===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --print-reply --dest=org.freedesktop.Telepathy.MissionControl /org/freedesktop/Telepathy/MissionControl org.freedesktop.Telepathy.MissionControl.SetPresence uint32:2 string:&amp;quot;I&#039;m here&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Change peak_schedule settings===&lt;br /&gt;
&lt;br /&gt;
Check:&lt;br /&gt;
 run-standalone.sh gconftool-2 -R /apps/activesync&lt;br /&gt;
&lt;br /&gt;
Set (check if yours is named ActiveSyncAccount1):&lt;br /&gt;
 run-standalone.sh gconftool-2 --set /apps/activesync/ActiveSyncAccount1/schedule/peak_schedule --type=int 15&lt;br /&gt;
Where the last number is one of the following (as standard in GUI):&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0&#039;&#039;&#039; = Always on&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-1&#039;&#039;&#039; = Manual&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;15&#039;&#039;&#039; = Every 15 minutes&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;30&#039;&#039;&#039; = Every 30 minutes&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;60&#039;&#039;&#039; = Every hour&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;240&#039;&#039;&#039; = Every 4 hours&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;720&#039;&#039;&#039; = Every 12 hours&lt;br /&gt;
&lt;br /&gt;
==Media player==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Open file in media player===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --print-reply --dest=com.nokia.mediaplayer /com/nokia/mediaplayer com.nokia.mediaplayer.mime_open string:&amp;quot;file:///$1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pause what&#039;s currently playing===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.renderer.pause&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Stop what&#039;s currently playing===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.renderer.stop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Play what&#039;s currently selected===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.renderer.play&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Play next mediafile===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.renderer.next&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Play previous mediafile===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.renderer.previous&lt;br /&gt;
&lt;br /&gt;
==Notifications==&lt;br /&gt;
&lt;br /&gt;
===Send notification (orange one line popup)===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&amp;quot;NOTIFICATION&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Send dialog notification (orange multi line popup requiring user interaction)===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteDialog string:&amp;quot;QUESTION?&amp;quot; uint32:0 string:&amp;quot;OK&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Not sure what string &amp;quot;OK&amp;quot; does, but it is needed and can be anything.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Securing==&lt;br /&gt;
&lt;br /&gt;
===Lock===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.system_ui /com/nokia/system_ui/request com.nokia.system_ui.request.devlock_open string:&amp;quot;com.nokia.mce&amp;quot; string:&amp;quot;/com/nokia/mce/request&amp;quot; string:&amp;quot;com.nokia.mce.request&amp;quot; string:&amp;quot;devlock_callback&amp;quot; uint32:&#039;3&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Unlock===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.system_ui /com/nokia/system_ui/request com.nokia.system_ui.request.devlock_close string:&amp;quot;com.nokia.mce&amp;quot; string:&amp;quot;/com/nokia/mce/request&amp;quot; string:&amp;quot;com.nokia.mce.request&amp;quot; string:&amp;quot;devlock_callback&amp;quot; uint32:&#039;0&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Lock screen and keys===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_tklock_mode_change string:&amp;quot;locked&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Unlock screen and keys===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_tklock_mode_change string:&amp;quot;unlocked&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Networking==&lt;br /&gt;
&lt;br /&gt;
===Connect to specific saved connection===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.icd /com/nokia/icd com.nokia.icd.connect string:&amp;quot;IAP_ID&amp;quot; uint32:0&lt;br /&gt;
&lt;br /&gt;
IAP_ID is internet access point identifier and can be obtained with the following command:&lt;br /&gt;
&lt;br /&gt;
 gconftool -R /system/osso/connectivity/IAP&lt;br /&gt;
&lt;br /&gt;
Find lines which matches /system/osso/connectivity/IAP/&amp;lt;IAP_ID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For GPRS connections replace &amp;quot;@32@&amp;quot; with a space in IAP_ID string.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that phone has to be disconnected in order to connect via this call.&lt;br /&gt;
If not, an error message will occur if you add --print-reply to the dbus-send command.&lt;br /&gt;
&lt;br /&gt;
===Connect to any saved connection===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.icd /com/nokia/icd com.nokia.icd.connect string:&amp;quot;[ANY]&amp;quot; uint32:0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Disconnect internet===&lt;br /&gt;
&lt;br /&gt;
====ICD2====&lt;br /&gt;
&lt;br /&gt;
 dbus-send --print-reply --system --dest=com.nokia.icd2 /com/nokia/icd2 com.nokia.icd2.disconnect_req uint32:0x8000&lt;br /&gt;
&lt;br /&gt;
====ICD====&lt;br /&gt;
 dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true&lt;br /&gt;
&lt;br /&gt;
On PR1.2 :&lt;br /&gt;
Error org.freedesktop.DBus.Error.UnknownMethod: Method &amp;quot;disconnect&amp;quot; with signature &amp;quot;b&amp;quot; on interface &amp;quot;com.nokia.icd_ui&amp;quot; doesn&#039;t exist&lt;br /&gt;
&lt;br /&gt;
===Connect (show change connection UI)===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.icd_ui /com/nokia/icd_ui com.nokia.icd_ui.show_conn_dlg boolean:false&lt;br /&gt;
&lt;br /&gt;
If &amp;quot;boolean:true&amp;quot; at the end, one-line notification saying &amp;quot;No saved connections available&amp;quot; appears. Maybe affects more than that?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Enable cellular radio===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.phone.SSC /com/nokia/phone/SSC com.nokia.phone.SSC.set_radio boolean:true&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Disable cellular radio===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.phone.SSC /com/nokia/phone/SSC com.nokia.phone.SSC.set_radio boolean:false&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Radio mode==&lt;br /&gt;
&lt;br /&gt;
===2G===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===3G===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Dual===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Bluetooth==&lt;br /&gt;
&lt;br /&gt;
===Identify adapter path===&lt;br /&gt;
&lt;br /&gt;
You need to know adapter path in order to send D-Bus call to the right place. You can get it with entering this command into the terminal:&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager.ListAdapters | awk -F&#039;&amp;quot;&#039; &#039;/at/ {print $2}&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Enable===&lt;br /&gt;
&lt;br /&gt;
Using the adapter path value returned with previous command, for example &#039;&#039;/org/bluez/906/hci0&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=org.bluez /org/bluez/906/hci0 org.bluez.Adapter.SetProperty string:Powered variant:boolean:true&lt;br /&gt;
&lt;br /&gt;
This one automatically inserts adapter path:&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=org.bluez $(dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager.ListAdapters | awk -F&#039;&amp;quot;&#039; &#039;/at/ {print $2}&#039;) org.bluez.Adapter.SetProperty string:Powered variant:boolean:true&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Disable===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=org.bluez /org/bluez/906/hci0 org.bluez.Adapter.SetProperty string:Powered variant:boolean:false&lt;br /&gt;
&lt;br /&gt;
With auto-discovery of adapter path:&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=org.bluez $(dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager.ListAdapters | awk -F&#039;&amp;quot;&#039; &#039;/at/ {print $2}&#039;) org.bluez.Adapter.SetProperty string:Powered variant:boolean:false&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Connect to specific device===&lt;br /&gt;
&lt;br /&gt;
 devmac=00:11:22:33:44:55&lt;br /&gt;
 service=AudioSink&lt;br /&gt;
 &lt;br /&gt;
 adapter=$(dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager.ListAdapters | awk -F&#039;&amp;quot;&#039; &#039;/at/ {print $2}&#039;)&lt;br /&gt;
 device=$(dbus-send --system --print-reply --dest=org.bluez ${adapter} org.bluez.Adapter.FindDevice string:${devmac} | sed -ne &#039;s/^.*object path //p&#039; -e &#039;s/&amp;quot;//g&#039;)&lt;br /&gt;
 dbus-send --system --type=method_call --print-reply --dest=org.bluez ${device} org.bluez.${service}.Connect&lt;br /&gt;
&lt;br /&gt;
Change the AudoSink to any service and the devmac to the MAC of bluetooth device.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Check for updates==&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.hildon_application_manager /com/nokia/hildon_application_manager com.nokia.hildon_application_manager.check_for_updates&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Open link in browser==&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.osso_browser /com/nokia/osso_browser/request com.nokia.osso_browser.load_url string:&amp;quot;google.com&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Set volume==&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.extension.set_extension_property string:volume variant:uint32:50&lt;br /&gt;
&lt;br /&gt;
The value can be between 0 and 100.&lt;br /&gt;
&lt;br /&gt;
==Reboot==&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --print-reply --dest=com.nokia.mce &amp;quot;/com/nokia/mce/request&amp;quot; com.nokia.mce.request.req_reboot&lt;br /&gt;
This is same as rebooting from power key menu (needs uncommenting in certain XML file to appear) and has been identified as insecure way to reboot the device (no filesystem synchronization, etc.). Better command is to simply enter &amp;quot;reboot&amp;quot; in root terminal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Shutdown==&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --print-reply --dest=com.nokia.mce &amp;quot;/com/nokia/mce/request&amp;quot; com.nokia.mce.request.req_shutdown&lt;br /&gt;
See warning at reboot D-Bus call (needs testing).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Show dashboard==&lt;br /&gt;
&lt;br /&gt;
 dbus-send /com/nokia/hildon_desktop com.nokia.hildon_desktop.exit_app_view&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other==&lt;br /&gt;
&lt;br /&gt;
===D-Bus Scripts===&lt;br /&gt;
&lt;br /&gt;
You can also use [[DbusScripts|dbus-scripts]] to execute any command when various actions are triggered on D-Bus.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Panucci (pause)===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=org.panucci.panucciInterface /panucciInterface org.panucci.panucciInterface.playPause&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=GConf=&lt;br /&gt;
&lt;br /&gt;
==Reset GPRS data counter==&lt;br /&gt;
&lt;br /&gt;
The commands are PR1.2 compliant and do not work on previous versions.&lt;br /&gt;
&lt;br /&gt;
 gconftool-2 -u /system/osso/connectivity/network_type/GPRS/gprs_home_rx_bytes&lt;br /&gt;
 gconftool-2 -u /system/osso/connectivity/network_type/GPRS/gprs_home_tx_bytes&lt;br /&gt;
 gconftool-2 -s /system/osso/connectivity/network_type/GPRS/gprs_home_reset_time --type=string $(date +%s)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Command line=&lt;br /&gt;
&lt;br /&gt;
==Enable FM Transmitter==&lt;br /&gt;
&lt;br /&gt;
 /usr/bin/fmtx_client -p 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Disable FM Transmitter==&lt;br /&gt;
&lt;br /&gt;
 /usr/bin/fmtx_client -p 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=GStreamer=&lt;br /&gt;
&lt;br /&gt;
==Take a picture with front camera==&lt;br /&gt;
&lt;br /&gt;
 gst-launch v4l2src device=/dev/video1 num-buffers=1 ! ffmpegcolorspace ! jpegenc ! filesink location=frontcam.jpg&lt;br /&gt;
&lt;br /&gt;
==Shoot photo after 10 seconds==&lt;br /&gt;
&lt;br /&gt;
The camera application must be off for it to work. And of course the camera shutter must be open...gst-launch comes with gstreamer-tools (or gst-launch-0.10 and gstreamer0.10-tools)&lt;br /&gt;
&lt;br /&gt;
 /bin/sleep 10 ; /usr/bin/gst-launch v4l2camsrc device=/dev/video0 num-buffers=1 \! video/x-raw-yuv,width=2592,height=1968  \! ffmpegcolorspace \! jpegenc \! filesink location=/home/user/MyDocs/DCIM/photo.jpg&lt;br /&gt;
&lt;br /&gt;
To shoot from the front camera, change &#039;&#039;&#039;/dev/video0&#039;&#039;&#039; to &#039;&#039;&#039;/dev/video1&#039;&#039;&#039; and the proper resolution:&lt;br /&gt;
&lt;br /&gt;
 /bin/sleep 10 ; /usr/bin/gst-launch v4l2camsrc device=/dev/video1 num-buffers=1 \! video/x-raw-yuv,width=640,height=480  \! ffmpegcolorspace \! jpegenc \! filesink location=/home/user/MyDocs/DCIM/photo.jpg&lt;br /&gt;
&lt;br /&gt;
Other way:&lt;br /&gt;
&lt;br /&gt;
 /bin/sleep 10; /usr/bin/gst-launch v4l2camsrc ! ffmpegcolorspace ! jpegenc ! identity error-after=1 ! filesink location=/home/user/MyDocs/DCIM/photo.jpg&lt;br /&gt;
&lt;br /&gt;
=Python=&lt;br /&gt;
&lt;br /&gt;
==Make a phone call==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import dbus&lt;br /&gt;
def place_call(number):&lt;br /&gt;
  bus = dbus.SystemBus()&lt;br /&gt;
  csd_call = dbus.Interface(bus.get_object(&#039;com.nokia.csd&#039;,&lt;br /&gt;
                                           &#039;/com/nokia/csd/call&#039;),&lt;br /&gt;
                                           &#039;com.nokia.csd.Call&#039;)&lt;br /&gt;
  csd_call.CreateWith(str(number), dbus.UInt32(0))&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Send SMS==&lt;br /&gt;
&lt;br /&gt;
From:&lt;br /&gt;
http://talk.maemo.org/showpost.php?p=548948&amp;amp;postcount=52&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#!/usr/bin/env python2.5&lt;br /&gt;
&lt;br /&gt;
import pexpect&lt;br /&gt;
import time&lt;br /&gt;
from subprocess import *&lt;br /&gt;
&lt;br /&gt;
child = pexpect.spawn(&#039;pnatd&#039;);&lt;br /&gt;
child.send(&#039;at\r&#039;);&lt;br /&gt;
time.sleep(0.25);&lt;br /&gt;
child.send(&#039;at+cmgf=1\r&#039;);&lt;br /&gt;
time.sleep(0.25);&lt;br /&gt;
child.send(&#039;at+cmgs=&amp;quot;+XXXXXXX&amp;quot;\r&#039;);&lt;br /&gt;
child.send(&#039;SMSTEXTSMSTEXTSMSTEXT&#039;);&lt;br /&gt;
child.send(chr(26));&lt;br /&gt;
child.send(chr(26));&lt;br /&gt;
child.sendeof();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There&#039;s also a python script that uses DBUS instead from http://talk.maemo.org/showpost.php?p=558430&amp;amp;postcount=57:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#!/usr/bin/env python2.5          &lt;br /&gt;
import sched, time                &lt;br /&gt;
import dbus                       &lt;br /&gt;
import gobject                    &lt;br /&gt;
from dbus.mainloop.glib import DBusGMainLoop&lt;br /&gt;
&lt;br /&gt;
def octify(str):&lt;br /&gt;
        &#039;&#039;&#039;     &lt;br /&gt;
        Returns a list of octet bytes representing&lt;br /&gt;
        each char of the input str.               &lt;br /&gt;
        &#039;&#039;&#039;                                       &lt;br /&gt;
&lt;br /&gt;
        bytes = map(ord, str)&lt;br /&gt;
        bitsconsumed = 0     &lt;br /&gt;
        referencebit = 7     &lt;br /&gt;
        octets = []          &lt;br /&gt;
&lt;br /&gt;
        while len(bytes):&lt;br /&gt;
                byte = bytes.pop(0)&lt;br /&gt;
                byte = byte &amp;gt;&amp;gt; bitsconsumed&lt;br /&gt;
                                           &lt;br /&gt;
                try:                       &lt;br /&gt;
                        nextbyte = bytes[0]&lt;br /&gt;
                        bitstocopy = (nextbyte &amp;amp; (0xff &amp;gt;&amp;gt; referencebit)) &amp;lt;&amp;lt; referencebit&lt;br /&gt;
                        octet = (byte | bitstocopy)                                     &lt;br /&gt;
&lt;br /&gt;
                except:&lt;br /&gt;
                        octet = (byte | 0x00)&lt;br /&gt;
&lt;br /&gt;
                if bitsconsumed != 7:&lt;br /&gt;
                        octets.append(byte | bitstocopy)&lt;br /&gt;
                        bitsconsumed += 1               &lt;br /&gt;
                        referencebit -= 1               &lt;br /&gt;
                else:                                   &lt;br /&gt;
                        bitsconsumed = 0                &lt;br /&gt;
                        referencebit = 7                &lt;br /&gt;
&lt;br /&gt;
        return octets&lt;br /&gt;
&lt;br /&gt;
def semi_octify(str):&lt;br /&gt;
        &#039;&#039;&#039;          &lt;br /&gt;
        Expects a string containing two digits.&lt;br /&gt;
        Returns an octet -                     &lt;br /&gt;
        first nibble in the octect is the first&lt;br /&gt;
        digit and the second nibble represents &lt;br /&gt;
        the second digit.                      &lt;br /&gt;
        &#039;&#039;&#039;                                    &lt;br /&gt;
        try:                                   &lt;br /&gt;
                digit_1 = int(str[0])          &lt;br /&gt;
                digit_2 = int(str[1])          &lt;br /&gt;
                octet = (digit_2 &amp;lt;&amp;lt; 4) | digit_1&lt;br /&gt;
        except:                                 &lt;br /&gt;
                octet = (1 &amp;lt;&amp;lt; 4) | digit_1      &lt;br /&gt;
&lt;br /&gt;
        return octet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
def deoctify(arr):&lt;br /&gt;
&lt;br /&gt;
        referencebit = 1&lt;br /&gt;
        doctect = []    &lt;br /&gt;
        bnext = 0x00    &lt;br /&gt;
&lt;br /&gt;
        for i in arr:&lt;br /&gt;
&lt;br /&gt;
                bcurr = ((i &amp;amp; (0xff &amp;gt;&amp;gt; referencebit)) &amp;lt;&amp;lt; referencebit) &amp;gt;&amp;gt; 1&lt;br /&gt;
                bcurr = bcurr | bnext                                      &lt;br /&gt;
&lt;br /&gt;
                if referencebit != 7:&lt;br /&gt;
                        doctect.append( bcurr )&lt;br /&gt;
                        bnext = (i &amp;amp; (0xff &amp;lt;&amp;lt; (8 - referencebit)) ) &amp;gt;&amp;gt; 8 - referencebit&lt;br /&gt;
                        referencebit += 1                                              &lt;br /&gt;
                else:                                                                  &lt;br /&gt;
                        doctect.append( bcurr )                                        &lt;br /&gt;
                        bnext = (i &amp;amp; (0xff &amp;lt;&amp;lt; (8 - referencebit)) ) &amp;gt;&amp;gt; 8 - referencebit&lt;br /&gt;
                        doctect.append( bnext )                                        &lt;br /&gt;
                        bnext = 0x00                                                   &lt;br /&gt;
                        referencebit = 1                                               &lt;br /&gt;
&lt;br /&gt;
        return &#039;&#039;.join([chr(i) for i in doctect])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
def createPDUmessage(number, msg):&lt;br /&gt;
        &#039;&#039;&#039;                       &lt;br /&gt;
        Returns a list of bytes to represent a valid PDU message&lt;br /&gt;
        &#039;&#039;&#039;                                                     &lt;br /&gt;
        numlength = len(number)                                 &lt;br /&gt;
        if (numlength % 2) == 0:                                &lt;br /&gt;
                rangelength = numlength                         &lt;br /&gt;
        else:                                                   &lt;br /&gt;
                number = number + &#039;F&#039;                           &lt;br /&gt;
                rangelength = len(number)                       &lt;br /&gt;
&lt;br /&gt;
        octifiednumber = [ semi_octify(number[i:i+2]) for i in range(0,rangelength,2) ]&lt;br /&gt;
        octifiedmsg = octify(msg)                                                      &lt;br /&gt;
        HEADER = 1                                                                     &lt;br /&gt;
        FIRSTOCTETOFSMSDELIVERMSG = 10                                                 &lt;br /&gt;
        ADDR_TYPE = 129 #unknown format                                                &lt;br /&gt;
        number_length = len(number)                                                    &lt;br /&gt;
        msg_length = len(msg)                                                          &lt;br /&gt;
        pdu_message = [HEADER, FIRSTOCTETOFSMSDELIVERMSG, number_length, ADDR_TYPE]    &lt;br /&gt;
        pdu_message.extend(octifiednumber)                                             &lt;br /&gt;
        pdu_message.append(0)                                                          &lt;br /&gt;
        pdu_message.append(0)                                                          &lt;br /&gt;
        pdu_message.append(msg_length)                                                 &lt;br /&gt;
        pdu_message.extend(octifiedmsg)                                                &lt;br /&gt;
        return pdu_message                                                             &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
def sendmessage(number, message):&lt;br /&gt;
&lt;br /&gt;
        bus = dbus.SystemBus()&lt;br /&gt;
        smsobject = bus.get_object(&#039;com.nokia.phone.SMS&#039;, &#039;/com/nokia/phone/SMS/ba212ae1&#039;)&lt;br /&gt;
        smsiface = dbus.Interface(smsobject, &#039;com.nokia.csd.SMS.Outgoing&#039;)&lt;br /&gt;
        arr = dbus.Array(createPDUmessage(number.replace(&#039;+&#039;, &#039;00&#039;), message))&lt;br /&gt;
&lt;br /&gt;
        msg = dbus.Array([arr])&lt;br /&gt;
        smsiface.Send(msg,&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
def callback(pdumsg, msgcenter, somestring, sendernumber):&lt;br /&gt;
&lt;br /&gt;
        msglength = int(pdumsg[18])&lt;br /&gt;
        msgarray = pdumsg[19:len(pdumsg)]&lt;br /&gt;
&lt;br /&gt;
        msg = deoctify(msgarray)&lt;br /&gt;
&lt;br /&gt;
        if msg &amp;gt; 0:&lt;br /&gt;
               print &#039;New message received from %s&#039; % sendernumber&lt;br /&gt;
               print &#039;Message length %d&#039; % msglength&lt;br /&gt;
               print &#039;Message: %s&#039; % msg&lt;br /&gt;
&lt;br /&gt;
               if msg == &amp;quot;ping&amp;quot;:&lt;br /&gt;
                       print &amp;quot;Sending reply: pong&amp;quot;&lt;br /&gt;
                       sendmessage(sendernumber.replace(&amp;quot;+&amp;quot;,&amp;quot;00&amp;quot;), &amp;quot;pong&amp;quot;)&lt;br /&gt;
               else:&lt;br /&gt;
                       print &amp;quot;Unknown command&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
def listen():&lt;br /&gt;
        DBusGMainLoop(set_as_default=True)&lt;br /&gt;
        bus = dbus.SystemBus() #should connect to system bus instead of session because the former is where the incoming signals come from&lt;br /&gt;
        bus.add_signal_receiver(callback, path=&#039;/com/nokia/phone/SMS&#039;, dbus_interface=&#039;Phone.SMS&#039;, signal_name=&#039;IncomingSegment&#039;)&lt;br /&gt;
        gobject.MainLoop().run()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if __name__ == &#039;__main__&#039;:&lt;br /&gt;
  import time&lt;br /&gt;
  &lt;br /&gt;
  def schedule_task(schedule, fn, *args):&lt;br /&gt;
      import sched&lt;br /&gt;
      s = sched.scheduler(time.time, time.sleep)&lt;br /&gt;
      startTime = time.mktime(time.strptime(schedule, &#039;%b %d %H:%M %Y&#039;))&lt;br /&gt;
      s.enterabs(startTime, 0, fn, args)&lt;br /&gt;
      s.run()&lt;br /&gt;
&lt;br /&gt;
  import getopt, sys&lt;br /&gt;
  try:  &lt;br /&gt;
    opts, args = getopt.getopt(sys.argv[1:],&amp;quot;hlt:&amp;quot;, [&amp;quot;help&amp;quot;,&amp;quot;listen&amp;quot;,&amp;quot;time=&amp;quot;])&lt;br /&gt;
&lt;br /&gt;
  except getopt.GetoptError, err:&lt;br /&gt;
    # print help information and exit:&lt;br /&gt;
    print str(err) # will print something like &amp;quot;option -a not recognized&amp;quot;&lt;br /&gt;
    usage()&lt;br /&gt;
    sys.exit(2)  &lt;br /&gt;
  listening = False &lt;br /&gt;
  timeofday = &#039;&#039;&lt;br /&gt;
  for opt, arg in opts:&lt;br /&gt;
    if opt in (&amp;quot;-h&amp;quot;, &amp;quot;--help&amp;quot;):&lt;br /&gt;
      usage()                     &lt;br /&gt;
      sys.exit()                  &lt;br /&gt;
    elif opt in (&amp;quot;-l&amp;quot;, &amp;quot;--listen&amp;quot;):&lt;br /&gt;
      listening = True                 &lt;br /&gt;
    elif opt in (&amp;quot;-t&amp;quot;, &amp;quot;--time&amp;quot;):&lt;br /&gt;
      timeofday = arg                           &lt;br /&gt;
    else:&lt;br /&gt;
      assert False, &amp;quot;unhandled option&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  number = args[0]           &lt;br /&gt;
  msg = args[1]&lt;br /&gt;
  if msg != &#039;&#039;:&lt;br /&gt;
    if timeofday == &#039;&#039;:&lt;br /&gt;
        sendmessage(number, msg)&lt;br /&gt;
    else:&lt;br /&gt;
        today = time.strftime(&#039;%b %d x %Y&#039;, time.localtime())&lt;br /&gt;
        schedule = today.replace(&#039;x&#039;, timeofday)&lt;br /&gt;
        schedule_task(schedule, sendmessage, number, msg)&lt;br /&gt;
  if listening:&lt;br /&gt;
    listen()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Send dialog notification (orange multi line popup requiring user interaction)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import dbus&lt;br /&gt;
def show_notification_dialog(message, mode=&amp;quot;single&amp;quot;):&lt;br /&gt;
  bus = dbus.SystemBus()&lt;br /&gt;
  iface = dbus.Interface(bus.get_object(&#039;org.freedesktop.Notifications&#039;,&lt;br /&gt;
                                        &#039;/org/freedesktop/Notifications&#039;),&lt;br /&gt;
                                        &#039;org.freedesktop.Notifications&#039;)&lt;br /&gt;
  if mode == &amp;quot;single&amp;quot;:&lt;br /&gt;
      iface.SystemNoteInfoprint(message)&lt;br /&gt;
  elif mode == &amp;quot;multiline&amp;quot;:&lt;br /&gt;
      iface.SystemNoteDialog(str(message), dbus.UInt32(0), &#039;Ok&#039;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function allows you to show notification either with multiline (on maemo pre-5 it will show a dialog with an &amp;quot;Ok&amp;quot; button) or single line (tiny notifications hiding automatically).&lt;br /&gt;
&lt;br /&gt;
==Take a screenshot==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 import gtk.gdk&lt;br /&gt;
 &lt;br /&gt;
 w = gtk.gdk.get_default_root_window()&lt;br /&gt;
 sz = w.get_size()&lt;br /&gt;
 print &amp;quot;The size of the window is %d x %d&amp;quot; % sz&lt;br /&gt;
 pb = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB,False,8,sz[0],sz[1])&lt;br /&gt;
 pb = pb.get_from_drawable(w,w.get_colormap(),0,0,0,0,sz[0],sz[1])&lt;br /&gt;
 if (pb != None):&lt;br /&gt;
   pb.save(&amp;quot;screenshot.png&amp;quot;,&amp;quot;png&amp;quot;)&lt;br /&gt;
   print &amp;quot;Screenshot saved to screenshot.png.&amp;quot;&lt;br /&gt;
 else:&lt;br /&gt;
   print &amp;quot;Unable to get the screenshot.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Credits: took code from [http://stackoverflow.com/questions/69645/take-a-screenshot-via-a-python-script-linux here], where there is also a Qt way to do it.&lt;br /&gt;
&lt;br /&gt;
[[Category:Power users]]&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>82.201.1.161</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Phone_control&amp;diff=31821</id>
		<title>Phone control</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Phone_control&amp;diff=31821"/>
		<updated>2010-08-13T11:18:16Z</updated>

		<summary type="html">&lt;p&gt;82.201.1.161: /* Turn loudspeaker on */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Recommended phone usage}}&lt;br /&gt;
&lt;br /&gt;
=D-Bus=&lt;br /&gt;
&lt;br /&gt;
These D-Bus commands can be run from terminal or as shell scripts. Useful for scheduling events with [[fcron]], executing from [[Desktop Command Execution Widget scripts|Desktop Command Execution Widget]] or [[Queen BeeCon Widget]], startup events, install scripts, etc. They should be run as:&lt;br /&gt;
&lt;br /&gt;
 run-standalone.sh SCRIPT.sh&lt;br /&gt;
 run-standalone.sh dbus-send COMMAND&lt;br /&gt;
&lt;br /&gt;
This is important to set up the environment correctly otherwise they may barf. If run as user &amp;quot;user&amp;quot; this is not needed.&lt;br /&gt;
&lt;br /&gt;
Also note that most commands don&#039;t need &amp;quot;--print-reply&amp;quot; option. Those that don&#039;t need it should be &#039;&#039;&#039;tested without it&#039;&#039;&#039; and this page should be edited.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Phone==&lt;br /&gt;
&lt;br /&gt;
===Open Phone application===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.HildonDesktop.AppMgr /com/nokia/HildonDesktop/AppMgr com.nokia.HildonDesktop.AppMgr.LaunchApplication string:&amp;quot;rtcom-call-ui&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Make a phone call===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --print-reply --dest=com.nokia.csd.Call /com/nokia/csd/call com.nokia.csd.Call.CreateWith string:&amp;quot;$NUMBER&amp;quot; uint32:0&lt;br /&gt;
&lt;br /&gt;
Change $NUMBER to phone number you want to call.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===End current phone call===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --print-reply --dest=com.nokia.csd.Call /com/nokia/csd/call com.nokia.csd.Call.Release&lt;br /&gt;
&lt;br /&gt;
This will release/end/hangup/reject the current call (or possibly all calls if more then one call is active) or do nothing if no calls are active.&lt;br /&gt;
&lt;br /&gt;
===Answer current phone call===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --print-reply --dest=com.nokia.csd.Call /com/nokia/csd/call/1 com.nokia.csd.Call.Instance.Answer&lt;br /&gt;
&lt;br /&gt;
This will answer/pickup the current (first) call. &lt;br /&gt;
&lt;br /&gt;
If you answer the call immediately as you receive the Call Coming DBUS message the phone seems to be in a specific call state where answering yields a &amp;lt;tt&amp;gt;com.nokia.csd.Call.Error.NotAllowed&amp;lt;/tt&amp;gt; exception.&lt;br /&gt;
&lt;br /&gt;
You need to answer the call after a delay of e.g. 1 s.&lt;br /&gt;
&lt;br /&gt;
Another (probably better) approach is to register to the CallStatus DBUS message (&amp;lt;tt&amp;gt;com.nokia.csd.Call&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;/com/nokia/csd/call/1&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;com.nokia.csd.Call.Instance.CallStatus&amp;lt;/tt&amp;gt;) and wait for a call status &amp;gt;= 2 (=&amp;lt;tt&amp;gt;CSD_CALL_STATUS_COMING&amp;lt;/tt&amp;gt;) after the &amp;quot;Coming&amp;quot; message.&lt;br /&gt;
&lt;br /&gt;
===Get [[:wikipedia:International_Mobile_Equipment_Identity|IMEI]]===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --print-reply --dest=com.nokia.phone.SIM /com/nokia/phone/SIM/security Phone.Sim.Security.get_imei&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Get [[:wikipedia:International_Mobile_Subscriber_Identity|IMSI]]===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --print-reply --dest=com.nokia.phone.SIM /com/nokia/phone/SIM Phone.Sim.get_imsi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Get cellular signal strength===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --print-reply --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.get_signal_strength&lt;br /&gt;
&lt;br /&gt;
First line is percentage, second is dBm, third unknown.&lt;br /&gt;
&lt;br /&gt;
===Get cellular registration status===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --print-reply --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.get_registration_status&lt;br /&gt;
&lt;br /&gt;
===Turn loudspeaker on===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.osso_hp_ls_controller /com/nokia/osso_hp_ls_controller com.nokia.osso_hp_ls_controller.loudspeaker.force_loudspeaker_on&lt;br /&gt;
&lt;br /&gt;
===Turn loudspeaker off===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.osso_hp_ls_controller /com/nokia/osso_hp_ls_controller com.nokia.osso_hp_ls_controller.loudspeaker.force_loudspeaker_on&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Start vibrating===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --print-reply --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_vibrator_pattern_activate string:PatternIncomingCall&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Stop vibrating===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --print-reply --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_vibrator_pattern_deactivate string:PatternIncomingCall&lt;br /&gt;
&lt;br /&gt;
==Profiles==&lt;br /&gt;
&lt;br /&gt;
===Set General===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:&amp;quot;general&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Set Silent===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:&amp;quot;silent&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Query current profile===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --print-reply --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.get_profile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===List all profiles===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --print-reply --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.get_profiles&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==LED==&lt;br /&gt;
&lt;br /&gt;
===Activate LEDs===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_led_pattern_activate string:&amp;quot;PatternCommunicationIM&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Deactivate LEDs===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_led_pattern_deactivate string:&amp;quot;PatternCommunicationIM&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Messaging==&lt;br /&gt;
&lt;br /&gt;
===New e-mail===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.modest /com/nokia/modest com.nokia.modest.MailTo string:&amp;quot;mailto:&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Send and receive e-mail===&lt;br /&gt;
&lt;br /&gt;
It works, but it takes up to 2 minutes for modest to start refreshing and after that it depends on the speed of the connection how fast it is going to be completed, usually up to 5 seconds, 2G can be a bit slower.&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.modest /com/nokia/modest com.nokia.modest.SendReceive&lt;br /&gt;
&lt;br /&gt;
===Set presence===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --print-reply --dest=org.freedesktop.Telepathy.MissionControl /org/freedesktop/Telepathy/MissionControl org.freedesktop.Telepathy.MissionControl.SetPresence uint32:2 string:&amp;quot;I&#039;m here&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Change peak_schedule settings===&lt;br /&gt;
&lt;br /&gt;
Check:&lt;br /&gt;
 run-standalone.sh gconftool-2 -R /apps/activesync&lt;br /&gt;
&lt;br /&gt;
Set (check if yours is named ActiveSyncAccount1):&lt;br /&gt;
 run-standalone.sh gconftool-2 --set /apps/activesync/ActiveSyncAccount1/schedule/peak_schedule --type=int 15&lt;br /&gt;
Where the last number is one of the following (as standard in GUI):&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0&#039;&#039;&#039; = Always on&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-1&#039;&#039;&#039; = Manual&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;15&#039;&#039;&#039; = Every 15 minutes&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;30&#039;&#039;&#039; = Every 30 minutes&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;60&#039;&#039;&#039; = Every hour&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;240&#039;&#039;&#039; = Every 4 hours&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;720&#039;&#039;&#039; = Every 12 hours&lt;br /&gt;
&lt;br /&gt;
==Media player==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Open file in media player===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --print-reply --dest=com.nokia.mediaplayer /com/nokia/mediaplayer com.nokia.mediaplayer.mime_open string:&amp;quot;file:///$1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Pause what&#039;s currently playing===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.renderer.pause&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Stop what&#039;s currently playing===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.renderer.stop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Play what&#039;s currently selected===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.renderer.play&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Play next mediafile===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.renderer.next&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Play previous mediafile===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.renderer.previous&lt;br /&gt;
&lt;br /&gt;
==Notifications==&lt;br /&gt;
&lt;br /&gt;
===Send notification (orange one line popup)===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:&amp;quot;NOTIFICATION&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Send dialog notification (orange multi line popup requiring user interaction)===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteDialog string:&amp;quot;QUESTION?&amp;quot; uint32:0 string:&amp;quot;OK&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Not sure what string &amp;quot;OK&amp;quot; does, but it is needed and can be anything.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Securing==&lt;br /&gt;
&lt;br /&gt;
===Lock===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.system_ui /com/nokia/system_ui/request com.nokia.system_ui.request.devlock_open string:&amp;quot;com.nokia.mce&amp;quot; string:&amp;quot;/com/nokia/mce/request&amp;quot; string:&amp;quot;com.nokia.mce.request&amp;quot; string:&amp;quot;devlock_callback&amp;quot; uint32:&#039;3&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Unlock===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.system_ui /com/nokia/system_ui/request com.nokia.system_ui.request.devlock_close string:&amp;quot;com.nokia.mce&amp;quot; string:&amp;quot;/com/nokia/mce/request&amp;quot; string:&amp;quot;com.nokia.mce.request&amp;quot; string:&amp;quot;devlock_callback&amp;quot; uint32:&#039;0&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Lock screen and keys===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_tklock_mode_change string:&amp;quot;locked&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Unlock screen and keys===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_tklock_mode_change string:&amp;quot;unlocked&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Networking==&lt;br /&gt;
&lt;br /&gt;
===Connect to specific saved connection===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.icd /com/nokia/icd com.nokia.icd.connect string:&amp;quot;IAP_ID&amp;quot; uint32:0&lt;br /&gt;
&lt;br /&gt;
IAP_ID is internet access point identifier and can be obtained with the following command:&lt;br /&gt;
&lt;br /&gt;
 gconftool -R /system/osso/connectivity/IAP&lt;br /&gt;
&lt;br /&gt;
Find lines which matches /system/osso/connectivity/IAP/&amp;lt;IAP_ID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For GPRS connections replace &amp;quot;@32@&amp;quot; with a space in IAP_ID string.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that phone has to be disconnected in order to connect via this call.&lt;br /&gt;
If not, an error message will occur if you add --print-reply to the dbus-send command.&lt;br /&gt;
&lt;br /&gt;
===Connect to any saved connection===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.icd /com/nokia/icd com.nokia.icd.connect string:&amp;quot;[ANY]&amp;quot; uint32:0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Disconnect internet===&lt;br /&gt;
&lt;br /&gt;
====ICD2====&lt;br /&gt;
&lt;br /&gt;
 dbus-send --print-reply --system --dest=com.nokia.icd2 /com/nokia/icd2 com.nokia.icd2.disconnect_req uint32:0x8000&lt;br /&gt;
&lt;br /&gt;
====ICD====&lt;br /&gt;
 dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true&lt;br /&gt;
&lt;br /&gt;
On PR1.2 :&lt;br /&gt;
Error org.freedesktop.DBus.Error.UnknownMethod: Method &amp;quot;disconnect&amp;quot; with signature &amp;quot;b&amp;quot; on interface &amp;quot;com.nokia.icd_ui&amp;quot; doesn&#039;t exist&lt;br /&gt;
&lt;br /&gt;
===Connect (show change connection UI)===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.icd_ui /com/nokia/icd_ui com.nokia.icd_ui.show_conn_dlg boolean:false&lt;br /&gt;
&lt;br /&gt;
If &amp;quot;boolean:true&amp;quot; at the end, one-line notification saying &amp;quot;No saved connections available&amp;quot; appears. Maybe affects more than that?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Enable cellular radio===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.phone.SSC /com/nokia/phone/SSC com.nokia.phone.SSC.set_radio boolean:true&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Disable cellular radio===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.phone.SSC /com/nokia/phone/SSC com.nokia.phone.SSC.set_radio boolean:false&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Radio mode==&lt;br /&gt;
&lt;br /&gt;
===2G===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===3G===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Dual===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Bluetooth==&lt;br /&gt;
&lt;br /&gt;
===Identify adapter path===&lt;br /&gt;
&lt;br /&gt;
You need to know adapter path in order to send D-Bus call to the right place. You can get it with entering this command into the terminal:&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager.ListAdapters | awk -F&#039;&amp;quot;&#039; &#039;/at/ {print $2}&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Enable===&lt;br /&gt;
&lt;br /&gt;
Using the adapter path value returned with previous command, for example &#039;&#039;/org/bluez/906/hci0&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=org.bluez /org/bluez/906/hci0 org.bluez.Adapter.SetProperty string:Powered variant:boolean:true&lt;br /&gt;
&lt;br /&gt;
This one automatically inserts adapter path:&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=org.bluez $(dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager.ListAdapters | awk -F&#039;&amp;quot;&#039; &#039;/at/ {print $2}&#039;) org.bluez.Adapter.SetProperty string:Powered variant:boolean:true&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Disable===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=org.bluez /org/bluez/906/hci0 org.bluez.Adapter.SetProperty string:Powered variant:boolean:false&lt;br /&gt;
&lt;br /&gt;
With auto-discovery of adapter path:&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=org.bluez $(dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager.ListAdapters | awk -F&#039;&amp;quot;&#039; &#039;/at/ {print $2}&#039;) org.bluez.Adapter.SetProperty string:Powered variant:boolean:false&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Connect to specific device===&lt;br /&gt;
&lt;br /&gt;
 devmac=00:11:22:33:44:55&lt;br /&gt;
 service=AudioSink&lt;br /&gt;
 &lt;br /&gt;
 adapter=$(dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager.ListAdapters | awk -F&#039;&amp;quot;&#039; &#039;/at/ {print $2}&#039;)&lt;br /&gt;
 device=$(dbus-send --system --print-reply --dest=org.bluez ${adapter} org.bluez.Adapter.FindDevice string:${devmac} | sed -ne &#039;s/^.*object path //p&#039; -e &#039;s/&amp;quot;//g&#039;)&lt;br /&gt;
 dbus-send --system --type=method_call --print-reply --dest=org.bluez ${device} org.bluez.${service}.Connect&lt;br /&gt;
&lt;br /&gt;
Change the AudoSink to any service and the devmac to the MAC of bluetooth device.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Check for updates==&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.hildon_application_manager /com/nokia/hildon_application_manager com.nokia.hildon_application_manager.check_for_updates&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Open link in browser==&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --dest=com.nokia.osso_browser /com/nokia/osso_browser/request com.nokia.osso_browser.load_url string:&amp;quot;google.com&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Set volume==&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.extension.set_extension_property string:volume variant:uint32:50&lt;br /&gt;
&lt;br /&gt;
The value can be between 0 and 100.&lt;br /&gt;
&lt;br /&gt;
==Reboot==&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --print-reply --dest=com.nokia.mce &amp;quot;/com/nokia/mce/request&amp;quot; com.nokia.mce.request.req_reboot&lt;br /&gt;
This is same as rebooting from power key menu (needs uncommenting in certain XML file to appear) and has been identified as insecure way to reboot the device (no filesystem synchronization, etc.). Better command is to simply enter &amp;quot;reboot&amp;quot; in root terminal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Shutdown==&lt;br /&gt;
&lt;br /&gt;
 dbus-send --system --type=method_call --print-reply --dest=com.nokia.mce &amp;quot;/com/nokia/mce/request&amp;quot; com.nokia.mce.request.req_shutdown&lt;br /&gt;
See warning at reboot D-Bus call (needs testing).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Show dashboard==&lt;br /&gt;
&lt;br /&gt;
 dbus-send /com/nokia/hildon_desktop com.nokia.hildon_desktop.exit_app_view&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other==&lt;br /&gt;
&lt;br /&gt;
===D-Bus Scripts===&lt;br /&gt;
&lt;br /&gt;
You can also use [[DbusScripts|dbus-scripts]] to execute any command when various actions are triggered on D-Bus.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Panucci (pause)===&lt;br /&gt;
&lt;br /&gt;
 dbus-send --type=method_call --dest=org.panucci.panucciInterface /panucciInterface org.panucci.panucciInterface.playPause&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=GConf=&lt;br /&gt;
&lt;br /&gt;
==Reset GPRS data counter==&lt;br /&gt;
&lt;br /&gt;
The commands are PR1.2 compliant and do not work on previous versions.&lt;br /&gt;
&lt;br /&gt;
 gconftool-2 -u /system/osso/connectivity/network_type/GPRS/gprs_home_rx_bytes&lt;br /&gt;
 gconftool-2 -u /system/osso/connectivity/network_type/GPRS/gprs_home_tx_bytes&lt;br /&gt;
 gconftool-2 -s /system/osso/connectivity/network_type/GPRS/gprs_home_reset_time --type=string $(date +%s)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Command line=&lt;br /&gt;
&lt;br /&gt;
==Enable FM Transmitter==&lt;br /&gt;
&lt;br /&gt;
 /usr/bin/fmtx_client -p 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Disable FM Transmitter==&lt;br /&gt;
&lt;br /&gt;
 /usr/bin/fmtx_client -p 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=GStreamer=&lt;br /&gt;
&lt;br /&gt;
==Take a picture with front camera==&lt;br /&gt;
&lt;br /&gt;
 gst-launch v4l2src device=/dev/video1 num-buffers=1 ! ffmpegcolorspace ! jpegenc ! filesink location=frontcam.jpg&lt;br /&gt;
&lt;br /&gt;
==Shoot photo after 10 seconds==&lt;br /&gt;
&lt;br /&gt;
The camera application must be off for it to work. And of course the camera shutter must be open...gst-launch comes with gstreamer-tools (or gst-launch-0.10 and gstreamer0.10-tools)&lt;br /&gt;
&lt;br /&gt;
 /bin/sleep 10 ; /usr/bin/gst-launch v4l2camsrc device=/dev/video0 num-buffers=1 \! video/x-raw-yuv,width=2592,height=1968  \! ffmpegcolorspace \! jpegenc \! filesink location=/home/user/MyDocs/DCIM/photo.jpg&lt;br /&gt;
&lt;br /&gt;
To shoot from the front camera, change &#039;&#039;&#039;/dev/video0&#039;&#039;&#039; to &#039;&#039;&#039;/dev/video1&#039;&#039;&#039; and the proper resolution:&lt;br /&gt;
&lt;br /&gt;
 /bin/sleep 10 ; /usr/bin/gst-launch v4l2camsrc device=/dev/video1 num-buffers=1 \! video/x-raw-yuv,width=640,height=480  \! ffmpegcolorspace \! jpegenc \! filesink location=/home/user/MyDocs/DCIM/photo.jpg&lt;br /&gt;
&lt;br /&gt;
Other way:&lt;br /&gt;
&lt;br /&gt;
 /bin/sleep 10; /usr/bin/gst-launch v4l2camsrc ! ffmpegcolorspace ! jpegenc ! identity error-after=1 ! filesink location=/home/user/MyDocs/DCIM/photo.jpg&lt;br /&gt;
&lt;br /&gt;
=Python=&lt;br /&gt;
&lt;br /&gt;
==Make a phone call==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import dbus&lt;br /&gt;
def place_call(number):&lt;br /&gt;
  bus = dbus.SystemBus()&lt;br /&gt;
  csd_call = dbus.Interface(bus.get_object(&#039;com.nokia.csd&#039;,&lt;br /&gt;
                                           &#039;/com/nokia/csd/call&#039;),&lt;br /&gt;
                                           &#039;com.nokia.csd.Call&#039;)&lt;br /&gt;
  csd_call.CreateWith(str(number), dbus.UInt32(0))&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Send SMS==&lt;br /&gt;
&lt;br /&gt;
From:&lt;br /&gt;
http://talk.maemo.org/showpost.php?p=548948&amp;amp;postcount=52&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#!/usr/bin/env python2.5&lt;br /&gt;
&lt;br /&gt;
import pexpect&lt;br /&gt;
import time&lt;br /&gt;
from subprocess import *&lt;br /&gt;
&lt;br /&gt;
child = pexpect.spawn(&#039;pnatd&#039;);&lt;br /&gt;
child.send(&#039;at\r&#039;);&lt;br /&gt;
time.sleep(0.25);&lt;br /&gt;
child.send(&#039;at+cmgf=1\r&#039;);&lt;br /&gt;
time.sleep(0.25);&lt;br /&gt;
child.send(&#039;at+cmgs=&amp;quot;+XXXXXXX&amp;quot;\r&#039;);&lt;br /&gt;
child.send(&#039;SMSTEXTSMSTEXTSMSTEXT&#039;);&lt;br /&gt;
child.send(chr(26));&lt;br /&gt;
child.send(chr(26));&lt;br /&gt;
child.sendeof();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There&#039;s also a python script that uses DBUS instead from http://talk.maemo.org/showpost.php?p=558430&amp;amp;postcount=57:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#!/usr/bin/env python2.5          &lt;br /&gt;
import sched, time                &lt;br /&gt;
import dbus                       &lt;br /&gt;
import gobject                    &lt;br /&gt;
from dbus.mainloop.glib import DBusGMainLoop&lt;br /&gt;
&lt;br /&gt;
def octify(str):&lt;br /&gt;
        &#039;&#039;&#039;     &lt;br /&gt;
        Returns a list of octet bytes representing&lt;br /&gt;
        each char of the input str.               &lt;br /&gt;
        &#039;&#039;&#039;                                       &lt;br /&gt;
&lt;br /&gt;
        bytes = map(ord, str)&lt;br /&gt;
        bitsconsumed = 0     &lt;br /&gt;
        referencebit = 7     &lt;br /&gt;
        octets = []          &lt;br /&gt;
&lt;br /&gt;
        while len(bytes):&lt;br /&gt;
                byte = bytes.pop(0)&lt;br /&gt;
                byte = byte &amp;gt;&amp;gt; bitsconsumed&lt;br /&gt;
                                           &lt;br /&gt;
                try:                       &lt;br /&gt;
                        nextbyte = bytes[0]&lt;br /&gt;
                        bitstocopy = (nextbyte &amp;amp; (0xff &amp;gt;&amp;gt; referencebit)) &amp;lt;&amp;lt; referencebit&lt;br /&gt;
                        octet = (byte | bitstocopy)                                     &lt;br /&gt;
&lt;br /&gt;
                except:&lt;br /&gt;
                        octet = (byte | 0x00)&lt;br /&gt;
&lt;br /&gt;
                if bitsconsumed != 7:&lt;br /&gt;
                        octets.append(byte | bitstocopy)&lt;br /&gt;
                        bitsconsumed += 1               &lt;br /&gt;
                        referencebit -= 1               &lt;br /&gt;
                else:                                   &lt;br /&gt;
                        bitsconsumed = 0                &lt;br /&gt;
                        referencebit = 7                &lt;br /&gt;
&lt;br /&gt;
        return octets&lt;br /&gt;
&lt;br /&gt;
def semi_octify(str):&lt;br /&gt;
        &#039;&#039;&#039;          &lt;br /&gt;
        Expects a string containing two digits.&lt;br /&gt;
        Returns an octet -                     &lt;br /&gt;
        first nibble in the octect is the first&lt;br /&gt;
        digit and the second nibble represents &lt;br /&gt;
        the second digit.                      &lt;br /&gt;
        &#039;&#039;&#039;                                    &lt;br /&gt;
        try:                                   &lt;br /&gt;
                digit_1 = int(str[0])          &lt;br /&gt;
                digit_2 = int(str[1])          &lt;br /&gt;
                octet = (digit_2 &amp;lt;&amp;lt; 4) | digit_1&lt;br /&gt;
        except:                                 &lt;br /&gt;
                octet = (1 &amp;lt;&amp;lt; 4) | digit_1      &lt;br /&gt;
&lt;br /&gt;
        return octet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
def deoctify(arr):&lt;br /&gt;
&lt;br /&gt;
        referencebit = 1&lt;br /&gt;
        doctect = []    &lt;br /&gt;
        bnext = 0x00    &lt;br /&gt;
&lt;br /&gt;
        for i in arr:&lt;br /&gt;
&lt;br /&gt;
                bcurr = ((i &amp;amp; (0xff &amp;gt;&amp;gt; referencebit)) &amp;lt;&amp;lt; referencebit) &amp;gt;&amp;gt; 1&lt;br /&gt;
                bcurr = bcurr | bnext                                      &lt;br /&gt;
&lt;br /&gt;
                if referencebit != 7:&lt;br /&gt;
                        doctect.append( bcurr )&lt;br /&gt;
                        bnext = (i &amp;amp; (0xff &amp;lt;&amp;lt; (8 - referencebit)) ) &amp;gt;&amp;gt; 8 - referencebit&lt;br /&gt;
                        referencebit += 1                                              &lt;br /&gt;
                else:                                                                  &lt;br /&gt;
                        doctect.append( bcurr )                                        &lt;br /&gt;
                        bnext = (i &amp;amp; (0xff &amp;lt;&amp;lt; (8 - referencebit)) ) &amp;gt;&amp;gt; 8 - referencebit&lt;br /&gt;
                        doctect.append( bnext )                                        &lt;br /&gt;
                        bnext = 0x00                                                   &lt;br /&gt;
                        referencebit = 1                                               &lt;br /&gt;
&lt;br /&gt;
        return &#039;&#039;.join([chr(i) for i in doctect])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
def createPDUmessage(number, msg):&lt;br /&gt;
        &#039;&#039;&#039;                       &lt;br /&gt;
        Returns a list of bytes to represent a valid PDU message&lt;br /&gt;
        &#039;&#039;&#039;                                                     &lt;br /&gt;
        numlength = len(number)                                 &lt;br /&gt;
        if (numlength % 2) == 0:                                &lt;br /&gt;
                rangelength = numlength                         &lt;br /&gt;
        else:                                                   &lt;br /&gt;
                number = number + &#039;F&#039;                           &lt;br /&gt;
                rangelength = len(number)                       &lt;br /&gt;
&lt;br /&gt;
        octifiednumber = [ semi_octify(number[i:i+2]) for i in range(0,rangelength,2) ]&lt;br /&gt;
        octifiedmsg = octify(msg)                                                      &lt;br /&gt;
        HEADER = 1                                                                     &lt;br /&gt;
        FIRSTOCTETOFSMSDELIVERMSG = 10                                                 &lt;br /&gt;
        ADDR_TYPE = 129 #unknown format                                                &lt;br /&gt;
        number_length = len(number)                                                    &lt;br /&gt;
        msg_length = len(msg)                                                          &lt;br /&gt;
        pdu_message = [HEADER, FIRSTOCTETOFSMSDELIVERMSG, number_length, ADDR_TYPE]    &lt;br /&gt;
        pdu_message.extend(octifiednumber)                                             &lt;br /&gt;
        pdu_message.append(0)                                                          &lt;br /&gt;
        pdu_message.append(0)                                                          &lt;br /&gt;
        pdu_message.append(msg_length)                                                 &lt;br /&gt;
        pdu_message.extend(octifiedmsg)                                                &lt;br /&gt;
        return pdu_message                                                             &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
def sendmessage(number, message):&lt;br /&gt;
&lt;br /&gt;
        bus = dbus.SystemBus()&lt;br /&gt;
        smsobject = bus.get_object(&#039;com.nokia.phone.SMS&#039;, &#039;/com/nokia/phone/SMS/ba212ae1&#039;)&lt;br /&gt;
        smsiface = dbus.Interface(smsobject, &#039;com.nokia.csd.SMS.Outgoing&#039;)&lt;br /&gt;
        arr = dbus.Array(createPDUmessage(number.replace(&#039;+&#039;, &#039;00&#039;), message))&lt;br /&gt;
&lt;br /&gt;
        msg = dbus.Array([arr])&lt;br /&gt;
        smsiface.Send(msg,&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
def callback(pdumsg, msgcenter, somestring, sendernumber):&lt;br /&gt;
&lt;br /&gt;
        msglength = int(pdumsg[18])&lt;br /&gt;
        msgarray = pdumsg[19:len(pdumsg)]&lt;br /&gt;
&lt;br /&gt;
        msg = deoctify(msgarray)&lt;br /&gt;
&lt;br /&gt;
        if msg &amp;gt; 0:&lt;br /&gt;
               print &#039;New message received from %s&#039; % sendernumber&lt;br /&gt;
               print &#039;Message length %d&#039; % msglength&lt;br /&gt;
               print &#039;Message: %s&#039; % msg&lt;br /&gt;
&lt;br /&gt;
               if msg == &amp;quot;ping&amp;quot;:&lt;br /&gt;
                       print &amp;quot;Sending reply: pong&amp;quot;&lt;br /&gt;
                       sendmessage(sendernumber.replace(&amp;quot;+&amp;quot;,&amp;quot;00&amp;quot;), &amp;quot;pong&amp;quot;)&lt;br /&gt;
               else:&lt;br /&gt;
                       print &amp;quot;Unknown command&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
def listen():&lt;br /&gt;
        DBusGMainLoop(set_as_default=True)&lt;br /&gt;
        bus = dbus.SystemBus() #should connect to system bus instead of session because the former is where the incoming signals come from&lt;br /&gt;
        bus.add_signal_receiver(callback, path=&#039;/com/nokia/phone/SMS&#039;, dbus_interface=&#039;Phone.SMS&#039;, signal_name=&#039;IncomingSegment&#039;)&lt;br /&gt;
        gobject.MainLoop().run()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if __name__ == &#039;__main__&#039;:&lt;br /&gt;
  import time&lt;br /&gt;
  &lt;br /&gt;
  def schedule_task(schedule, fn, *args):&lt;br /&gt;
      import sched&lt;br /&gt;
      s = sched.scheduler(time.time, time.sleep)&lt;br /&gt;
      startTime = time.mktime(time.strptime(schedule, &#039;%b %d %H:%M %Y&#039;))&lt;br /&gt;
      s.enterabs(startTime, 0, fn, args)&lt;br /&gt;
      s.run()&lt;br /&gt;
&lt;br /&gt;
  import getopt, sys&lt;br /&gt;
  try:  &lt;br /&gt;
    opts, args = getopt.getopt(sys.argv[1:],&amp;quot;hlt:&amp;quot;, [&amp;quot;help&amp;quot;,&amp;quot;listen&amp;quot;,&amp;quot;time=&amp;quot;])&lt;br /&gt;
&lt;br /&gt;
  except getopt.GetoptError, err:&lt;br /&gt;
    # print help information and exit:&lt;br /&gt;
    print str(err) # will print something like &amp;quot;option -a not recognized&amp;quot;&lt;br /&gt;
    usage()&lt;br /&gt;
    sys.exit(2)  &lt;br /&gt;
  listening = False &lt;br /&gt;
  timeofday = &#039;&#039;&lt;br /&gt;
  for opt, arg in opts:&lt;br /&gt;
    if opt in (&amp;quot;-h&amp;quot;, &amp;quot;--help&amp;quot;):&lt;br /&gt;
      usage()                     &lt;br /&gt;
      sys.exit()                  &lt;br /&gt;
    elif opt in (&amp;quot;-l&amp;quot;, &amp;quot;--listen&amp;quot;):&lt;br /&gt;
      listening = True                 &lt;br /&gt;
    elif opt in (&amp;quot;-t&amp;quot;, &amp;quot;--time&amp;quot;):&lt;br /&gt;
      timeofday = arg                           &lt;br /&gt;
    else:&lt;br /&gt;
      assert False, &amp;quot;unhandled option&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  number = args[0]           &lt;br /&gt;
  msg = args[1]&lt;br /&gt;
  if msg != &#039;&#039;:&lt;br /&gt;
    if timeofday == &#039;&#039;:&lt;br /&gt;
        sendmessage(number, msg)&lt;br /&gt;
    else:&lt;br /&gt;
        today = time.strftime(&#039;%b %d x %Y&#039;, time.localtime())&lt;br /&gt;
        schedule = today.replace(&#039;x&#039;, timeofday)&lt;br /&gt;
        schedule_task(schedule, sendmessage, number, msg)&lt;br /&gt;
  if listening:&lt;br /&gt;
    listen()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Send dialog notification (orange multi line popup requiring user interaction)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import dbus&lt;br /&gt;
def show_notification_dialog(message, mode=&amp;quot;single&amp;quot;):&lt;br /&gt;
  bus = dbus.SystemBus()&lt;br /&gt;
  iface = dbus.Interface(bus.get_object(&#039;org.freedesktop.Notifications&#039;,&lt;br /&gt;
                                        &#039;/org/freedesktop/Notifications&#039;),&lt;br /&gt;
                                        &#039;org.freedesktop.Notifications&#039;)&lt;br /&gt;
  if mode == &amp;quot;single&amp;quot;:&lt;br /&gt;
      iface.SystemNoteInfoprint(message)&lt;br /&gt;
  elif mode == &amp;quot;multiline&amp;quot;:&lt;br /&gt;
      iface.SystemNoteDialog(str(message), dbus.UInt32(0), &#039;Ok&#039;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function allows you to show notification either with multiline (on maemo pre-5 it will show a dialog with an &amp;quot;Ok&amp;quot; button) or single line (tiny notifications hiding automatically).&lt;br /&gt;
&lt;br /&gt;
==Take a screenshot==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 import gtk.gdk&lt;br /&gt;
 &lt;br /&gt;
 w = gtk.gdk.get_default_root_window()&lt;br /&gt;
 sz = w.get_size()&lt;br /&gt;
 print &amp;quot;The size of the window is %d x %d&amp;quot; % sz&lt;br /&gt;
 pb = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB,False,8,sz[0],sz[1])&lt;br /&gt;
 pb = pb.get_from_drawable(w,w.get_colormap(),0,0,0,0,sz[0],sz[1])&lt;br /&gt;
 if (pb != None):&lt;br /&gt;
   pb.save(&amp;quot;screenshot.png&amp;quot;,&amp;quot;png&amp;quot;)&lt;br /&gt;
   print &amp;quot;Screenshot saved to screenshot.png.&amp;quot;&lt;br /&gt;
 else:&lt;br /&gt;
   print &amp;quot;Unable to get the screenshot.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Credits: took code from [http://stackoverflow.com/questions/69645/take-a-screenshot-via-a-python-script-linux here], where there is also a Qt way to do it.&lt;br /&gt;
&lt;br /&gt;
[[Category:Power users]]&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>82.201.1.161</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Overclocking&amp;diff=31162</id>
		<title>Overclocking</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Overclocking&amp;diff=31162"/>
		<updated>2010-04-21T08:19:25Z</updated>

		<summary type="html">&lt;p&gt;82.201.1.161: /* Battery */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Overclocking=&lt;br /&gt;
&lt;br /&gt;
This page is about overclocking the N900.&lt;br /&gt;
For the N8x0 see [http://talk.maemo.org/showthread.php?t=12464 this]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; &#039;&#039;WORK IN PROGRESS, HELP IF YOU WANT&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Overclocking is discussed in [http://talk.maemo.org/showthread.php?t=39753 this thread].&lt;br /&gt;
Benchmark results can be found [http://talk.maemo.org/showthread.php?p=605189 here].&lt;br /&gt;
If you&#039;re more interested in power saving read [http://talk.maemo.org/showthread.php?t=49654 this].&lt;br /&gt;
&lt;br /&gt;
=Warnings=&lt;br /&gt;
&lt;br /&gt;
- Overclocking WILL VOID YOUR WARRANTY&amp;lt;br&amp;gt;&lt;br /&gt;
- The lifetime of your device will get reduced&amp;lt;br&amp;gt;&lt;br /&gt;
- You could lose the data in your device (file system corruption)&amp;lt;br&amp;gt;&lt;br /&gt;
- Every device is an individual, what is stable for others might not be for you&amp;lt;br&amp;gt;&lt;br /&gt;
- If you encounter ANY unusual problems, lower your clock frequency&amp;lt;br&amp;gt;&lt;br /&gt;
- You do it at your own responsibility. No whining afterwards. If you&#039;re unsure, don&#039;t do it.&amp;lt;br&amp;gt;&lt;br /&gt;
- [http://depot.javispedro.com/nit/thewarningtm.jpeg Nokia&#039;s overclocking warning]: 500MHz is the normal frequency. Everything above is not good for your device, even with the stock kernel.&amp;lt;br&amp;gt;&lt;br /&gt;
- Igor Stoppa&#039;s [http://talk.maemo.org/showpost.php?p=596149&amp;amp;postcount=904 warning] and [http://talk.maemo.org/showpost.php?p=603833&amp;amp;postcount=66 comment]&lt;br /&gt;
- [http://talk.maemo.org/showpost.php?p=596274&amp;amp;postcount=937 chip vendors specs]&lt;br /&gt;
&lt;br /&gt;
=Available kernels=&lt;br /&gt;
&lt;br /&gt;
Overclocking requires installation of a custom kernel.&lt;br /&gt;
There are two types of kernels:&lt;br /&gt;
# modified PR1.1 kernels by Lehto and others. The only difference to the stock Nokia kernel is that the change the available hardcoded frequencies.&lt;br /&gt;
# enhanced kernels by titan. They are compatible with PR1.2 (!) , contain lots of additional features (IPv6, NAT etc) and bugfixes. In addition they include a large set of possible frequencies (125MHz-1.15GHz) which you manually set an try out without flashing a new kernel. The defaults are set to the standard 250-600MHz range. The kernel can be installed via HAM from the extras-devel catalouge.&lt;br /&gt;
&lt;br /&gt;
== Installation of Lehto&#039;s PR1.1 kernels ==&lt;br /&gt;
&lt;br /&gt;
[http://talk.maemo.org/showpost.php?p=594200&amp;amp;postcount=309 Lehto&#039;s Kernels]&lt;br /&gt;
&lt;br /&gt;
[http://talk.maemo.org/showpost.php?p=595582&amp;amp;postcount=774 talk.maemo.org: Jakiman&#039;s Overclock Guide / Summary]&lt;br /&gt;
&lt;br /&gt;
== Installation of titan&#039;s enhanced kernels ==&lt;br /&gt;
This kernel makes it possible dynamically change the maximum frequency up to 1.15GHz (supported frequencies are 125,250,500,550,600,700,750,805,850,900,950,1000,1100,1150MHz).&lt;br /&gt;
WARNING: Overclocking may damage your device and is at your own risk! It may void your warranty and destroy your data. You have been warned.&lt;br /&gt;
&lt;br /&gt;
[http://talk.maemo.org/showthread.php?t=43420 talk.maemo.org: Discussion of the enhanded kernel]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; all commands on this page must be run as root in X Terminal (install rootsh package and enter &amp;quot;sudo gainroot&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
=== Installation of the more stable [https://maemo.org/packages/package_instance/view/fremantle_extras-testing_free_armel/kernel-power-flasher/2.6.28-maemo24/ kernel (maemo24)] from extras-testing ===&lt;br /&gt;
With this kernel you can change the frequency limits, the voltages and DSP frequencies online.&lt;br /&gt;
It requires firmware PR1.1 or newer.&lt;br /&gt;
# Install the package kernel-power-settings (section system in HAM). It will automatically also install kernel-power-flasher.&lt;br /&gt;
# shutdown and boot again. There&#039;s no need for reflashing etc.&lt;br /&gt;
[Configuring_the_kernel_settings read this for configuration]&lt;br /&gt;
&lt;br /&gt;
=== Installation of the experimental [https://maemo.org/packages/package_instance/view/fremantle_extras-devel_free_armel/kernel-power-flasher/2.6.28-maemo25/ kernel (maemo25)] from extras-devel ===&lt;br /&gt;
This kernel version contains additional experimental features and patches.&lt;br /&gt;
Changelogs are posted [https://garage.maemo.org/news/?group_id=1528 here].&lt;br /&gt;
# Install the package &amp;quot;Enhanced kernel for power users&amp;quot; (section system in HAM).&lt;br /&gt;
# shutdown and boot again. There&#039;s no need for reflashing etc.&lt;br /&gt;
Read the instructions for the stable kernel for more information.&lt;br /&gt;
&lt;br /&gt;
=== Upgrade from older versions (&amp;lt; maemo24)  ===&lt;br /&gt;
The package was previously called kernel-flasher-maemo.&lt;br /&gt;
If you have one of the older packages installed it it recommended that you upgrade in X Terminal&lt;br /&gt;
 sudo gainroot&lt;br /&gt;
 apt-get install -y kernel-power-flasher&lt;br /&gt;
 apt-get remove kernel-flasher-maemo&lt;br /&gt;
If the new kernel still doesn&#039;t boot up, try&lt;br /&gt;
 apt-get install --reinstall -y kernel-power kernel-power-flasher&lt;br /&gt;
Also try [http://talk.maemo.org/showpost.php?p=608343&amp;amp;postcount=2603 other hints] for deinstalling the old package.&lt;br /&gt;
&lt;br /&gt;
Make sure you reset /etc/pmconfig to the defaults:&lt;br /&gt;
 # Power management configuration file&lt;br /&gt;
 enable_off_mode 1&lt;br /&gt;
 sleep_while_idle 1&lt;br /&gt;
 sr_vdd1_autocomp 0&lt;br /&gt;
 sr_vdd2_autocomp 0&lt;br /&gt;
 clocks_off_while_idle 1&lt;br /&gt;
 voltage_off_while_idle 1&lt;br /&gt;
 scaling_governor ondemand&lt;br /&gt;
 scaling_max_freq 600000&lt;br /&gt;
 scaling_min_freq 125000&lt;br /&gt;
 sleep_ind 1&lt;br /&gt;
&lt;br /&gt;
=== Deinstallation ===&lt;br /&gt;
 sudo gainroot&lt;br /&gt;
 apt-get install --reinstall -y kernel kernel-flasher&lt;br /&gt;
 apt-get remove kernel-power kernel-power-modules&lt;br /&gt;
&lt;br /&gt;
=== Configuring the kernel settings ===&lt;br /&gt;
[http://talk.maemo.org/showpost.php?p=610967&amp;amp;postcount=2718 read this for more details].&lt;br /&gt;
&lt;br /&gt;
First verify, that the kernel is actually running:&lt;br /&gt;
 uname -r&lt;br /&gt;
should return &amp;quot;2.6.28.10power-omap1&amp;quot;&lt;br /&gt;
It it does not, you should reboot or try to install again&lt;br /&gt;
 apt-get install --reinstall -y kernel-power kernel-power-flasher&lt;br /&gt;
reboot, and test again.&lt;br /&gt;
&lt;br /&gt;
Make sure the packages &#039;&#039;kernel-power-settings&#039;&#039; and &#039;&#039;rootsh&#039;&#039; are installed.&lt;br /&gt;
&#039;&#039;&#039;All commands need to be run as root user.&#039;&#039;&#039;&lt;br /&gt;
If you are normal user in X Terminal either &amp;quot;sudo gainroot&amp;quot; or prepend &amp;quot;sudo&amp;quot; to every command.&lt;br /&gt;
&lt;br /&gt;
1) to try a configuration (you can replace &amp;quot;ideal&amp;quot; with default, lv, ulv, xlv or specify a file you created based on the template /usr/share/kernel-power-settings/default )&lt;br /&gt;
 /usr/sbin/kernel-load /usr/share/kernel-power-settings/ideal&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: do [[NOT]] modify the files in /usr/share/kernel-power-settings/!&lt;br /&gt;
see &#039;&#039;&#039;Creating your own configuration:&#039;&#039; below.&lt;br /&gt;
&lt;br /&gt;
2) to permanently install a default configuration&lt;br /&gt;
 rm -f /etc/default/kernel-power&lt;br /&gt;
 ln -s /usr/share/kernel-power-settings/ideal /etc/default/kernel-power&lt;br /&gt;
3) or your own config&lt;br /&gt;
 rm -f /etc/default/kernel-power&lt;br /&gt;
 cp &amp;lt;filename&amp;gt; /etc/default/kernel-power&lt;br /&gt;
4) and to immediately apply it&lt;br /&gt;
 sudo /usr/sbin/kernel-load&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;For beginners:&#039;&#039;&#039; first reboot. then try 1) and check whether the device is stable. then do 2).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Creating your own configuration&#039;&#039;&#039;&lt;br /&gt;
5) copy the template to your mydocs (when not in mass storage mode)&lt;br /&gt;
 cp /usr/share/kernel-power-settings/ideal /home/user/MyDocs/kernel.txt&lt;br /&gt;
6) edit the file &#039;&#039;/home/user/MyDocs/kernel.txt&#039;&#039;. The defaults are&lt;br /&gt;
 #UP_THRESHOLD=75 &lt;br /&gt;
 #SAMPLING_RATE=150000&lt;br /&gt;
 VDD1_OPPS_VSEL=&amp;quot;30 30 38 48 54 48 60 60 60 60 60 60 60 72 72&amp;quot;&lt;br /&gt;
 DSP_OPPS_RATE=&amp;quot;90 90 180 360 400 430 430 430 430 500 500 500 500 520 520&amp;quot;&lt;br /&gt;
 MIN_FREQ=250000&lt;br /&gt;
 MAX_FREQ=599000&lt;br /&gt;
 SMARTREFLEX_VDD1=0&lt;br /&gt;
 SMARTREFLEX_VDD2=0&lt;br /&gt;
For changing the frequency range change MIN_FREQ/MAX_FREQ (see &amp;quot;Temporarly change of the frequency limits&amp;quot; below ).&lt;br /&gt;
Either edit the file with an editor on your device (e.g., leafpad)&lt;br /&gt;
or USB mount it to edit it on the PC. unmount and unplug USB.&lt;br /&gt;
After editing load the configuration with&lt;br /&gt;
 /usr/sbin/kernel-load /home/user/MyDocs/kernel.txt&lt;br /&gt;
and repeat 6) until you&#039;re happy.&lt;br /&gt;
&lt;br /&gt;
7) to permanently install this new configuration&lt;br /&gt;
 rm -f /etc/default/kernel-power&lt;br /&gt;
 cp /home/user/MyDocs/kernel.txt  /etc/default/kernel-power&lt;br /&gt;
 /usr/sbin/kernel-load&lt;br /&gt;
&lt;br /&gt;
8) to reset the device to the defaults use&lt;br /&gt;
 rm -f /etc/default/kernel-power&lt;br /&gt;
 /usr/sbin/kernel-load /usr/share/kernel-power-settings/default&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: the package automatically detects whether a certain misconfiguration has caused &#039;&#039;&#039;reboot loop.&#039;&#039;&#039;&lt;br /&gt;
It your device reboots twice within 5 minutes, it will load the default settings (250-600Mhz) so that you can fix or remove the invalid configuration file.&lt;br /&gt;
This also means that, when for some reason you manually reboot too quickly (&amp;lt;5min) your configuration will not be loaded.&lt;br /&gt;
To load it nonetheless run after booting&lt;br /&gt;
 /usr/sbin/kernel-load&lt;br /&gt;
&lt;br /&gt;
=== Temporarly change of the frequency limits ===&lt;br /&gt;
 sudo gainroot&lt;br /&gt;
 echo 250000 &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq&lt;br /&gt;
 echo 599000 &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq&lt;br /&gt;
 cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq&lt;br /&gt;
 cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq&lt;br /&gt;
The last line shows which values were actually set.&lt;br /&gt;
To set 125MHz use 124999, for 600MHz 599999, for everthing else x000 with x=MHz.&lt;br /&gt;
This setting takes effect immediately and is cleared with the next reboot.&lt;br /&gt;
&lt;br /&gt;
=== Permanently change of the frequency limits ===&lt;br /&gt;
WARNING: Permanent overclocking is very dangerous!&lt;br /&gt;
&lt;br /&gt;
Install kernel-power-settings and follow [http://talk.maemo.org/showpost.php?p=610967&amp;amp;postcount=2718 those instructions].&lt;br /&gt;
&lt;br /&gt;
=== Battery ===&lt;br /&gt;
In kernels version &amp;gt;=maemo20 you can read out the current battery info:&lt;br /&gt;
 modprobe bq27x00_battery&lt;br /&gt;
 cat /sys/class/power_supply/bq27200-0/capacity&lt;br /&gt;
 cat /sys/class/power_supply/bq27200-0/voltage_now&lt;br /&gt;
 cat /sys/class/power_supply/bq27200-0/current_now&lt;br /&gt;
 cat /sys/class/power_supply/bq27200-0/temp&lt;br /&gt;
&lt;br /&gt;
*&#039;capacity&#039; value in percentage of battery level.&lt;br /&gt;
*&#039;voltage_now&#039; value in mV of battery voltage level.&lt;br /&gt;
*&#039;current_now&#039; value in mA of battery current consumption. (???)&lt;br /&gt;
*&#039;temp&#039; value in degrees C of battery temperature.&lt;br /&gt;
&lt;br /&gt;
To remove this kernel module use:&lt;br /&gt;
&lt;br /&gt;
 modprobe -r bq27x00_battery&lt;br /&gt;
&lt;br /&gt;
or reboot.&lt;br /&gt;
&lt;br /&gt;
=== Holding a kernel version ===&lt;br /&gt;
It your manually installed kernel should be not upgraded to the one in extras* try [http://talk.maemo.org/showpost.php?p=603915&amp;amp;postcount=2063 this]:&lt;br /&gt;
 echo kernel-power-flasher hold | dpkg --set-selections&lt;br /&gt;
 echo kernel-power hold | dpkg --set-selections&lt;br /&gt;
 echo kernel-power-modules hold | dpkg --set-selections&lt;br /&gt;
to unlock the version:&lt;br /&gt;
 echo kernel-power-flasher install | dpkg --set-selections&lt;br /&gt;
 echo kernel-power install | dpkg --set-selections&lt;br /&gt;
 echo kernel-power-modules install | dpkg --set-selections&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
# The screen calibration in settings crashes immediately. It is a known bug in the calibration app, not in the kernel. It&#039;s mentioned in the kernel package description and is due to additional evdev (joystick,mouse) support. Just calibrate once with the stock kernel before you install the fully featured kernel.&lt;br /&gt;
# The kernel supports 125MHz but this frequency is [http://talk.maemo.org/showpost.php?p=617488&amp;amp;postcount=3095 disabled by default]. In version &amp;lt;25, it is enabled by specifying &amp;quot;124999&amp;quot;, in later versions it is set in &#039;&#039;/sys/devices/system/cpu/cpu0/cpufreq/ondemand/avoid_frequencies&#039;&#039; and can be enabled with&lt;br /&gt;
 echo &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/ondemand/avoid_frequencies&lt;br /&gt;
# similarily, individual frequencies can be disabled in &amp;gt;=v25&lt;br /&gt;
 echo 125000 250000 750000 &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/ondemand/avoid_frequencies&lt;br /&gt;
# even if 125Mhz is disabled, the telephone app will always try to set the minimum freq. to 125Mhz after a phone call, but it is ignored unless you enable 125Mhz.&lt;br /&gt;
# if you enable 125MHz also set  &amp;quot;echo 1 &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice_load&amp;quot; [http://talk.maemo.org/showpost.php?p=602687&amp;amp;postcount=185 hint]&lt;br /&gt;
&lt;br /&gt;
# [http://talk.maemo.org/showpost.php?p=597703&amp;amp;postcount=141 the 125MHz issue]&lt;br /&gt;
# Installing another version of the enhanced kernel will just overwrite the older version. The stock kernel modules are preserved so that you can simply reflash the stock kernel via USB.&lt;br /&gt;
# If you for some reason get errors like this during removal or installation  &amp;quot;rm: cannot remove &#039;/lib/modules/2.6.28.10maemo-lv-omap1/modules.*&#039;: No such file or directory&amp;quot;.try this [http://talk.maemo.org/showpost.php?p=603938&amp;amp;postcount=196 workaround]. There was a bug in one of the early LV kernels but it should be fixed in more recent versions.&lt;br /&gt;
# This kernel will not conflict with the future PR1.2 upgrade. The upgrade will, however, overwrite this kernel and you&#039;ll have to install it again.&lt;br /&gt;
&lt;br /&gt;
=Additional information and hints=&lt;br /&gt;
&lt;br /&gt;
# the frequencies available in the Nokia kernel are: 250, 500, 550 and 600MHz.&lt;br /&gt;
# Nokia [http://talk.maemo.org/showpost.php?p=601691&amp;amp;postcount=1823 locks the device to 600MHz] during phone calls. This may be a bug. It also [http://talk.maemo.org/showpost.php?p=600721&amp;amp;postcount=1720 affects] Lehto&#039;s kernels.&lt;br /&gt;
# the telephone app is closed-source and broken. After a phone call it sets the maximum to 600Mhz and the minimum to 250MHz (or  125MHz if available) irrespective of what you have set before.&lt;br /&gt;
# when connected via USB the device locks the minimum frequency to 500Mhz.&lt;br /&gt;
# By default the device is configured to use 125MHz as the lowest frequency but it not enabled in the kernel [https://bugs.maemo.org/show_bug.cgi?id=7116 pmconfig bug]&lt;br /&gt;
# [http://talk.maemo.org/showpost.php?p=599870&amp;amp;postcount=170 improving responsiveness]&lt;br /&gt;
# [http://talk.maemo.org/showpost.php?p=599618&amp;amp;postcount=168 safe pmconfig configuration]&lt;br /&gt;
# the warning &amp;quot;WARNING: at arch/arm/mach-omap2/clock34xx.c:443 omap3_noncore_dpll_set_rate+0x28c/0x2dc()&amp;quot; in the kernel logs (dmesg) only happens if the invalid 800MHz frequency was selected. ignore it.&lt;br /&gt;
# [http://talk.maemo.org/showpost.php?p=603585&amp;amp;postcount=189 saving more battery power when idle]&lt;br /&gt;
# EvilJazz had photoshopped a [http://talk.maemo.org/showpost.php?p=605523&amp;amp;postcount=90 picture of a device being overclocked 1.7GHz]. It&#039;s a JOKE!&lt;br /&gt;
# reading one of the temperature sensors &amp;quot;cat /sys/devices/platform/omap34xx_temp/temp1_input&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=Useful stuff=&lt;br /&gt;
&lt;br /&gt;
==Show current CPU frequency==&lt;br /&gt;
&lt;br /&gt;
 awk &#039;{print $1/1000&amp;quot; MHz&amp;quot;}&#039; /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Set maximum CPU frequency==&lt;br /&gt;
&lt;br /&gt;
From root terminal:&lt;br /&gt;
&lt;br /&gt;
 rootsh echo 600000 &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq | echo &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Replace 600000 with desired maximum frequency. Pay attention to the two exceptions in titan&#039;s kernels (124999 and 599000). The list of available frequencies on your device/kernel can be obtained with command:&lt;br /&gt;
&lt;br /&gt;
 awk &#039;{print $1/1000&amp;quot; MHz&amp;quot;}&#039; /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state&lt;br /&gt;
&lt;br /&gt;
==Script for analyzing time_in_state (by rooted) - rev6==&lt;br /&gt;
&lt;br /&gt;
This script prints percentage of frequencies (states) used and some additional info useful for posting on the forum (debugging). It displays all frequencies, works with all kernels and it is not affected by the bug which resets minimum frequency after phone call.&lt;br /&gt;
&lt;br /&gt;
The script is in active development. I&#039;m adding new features and resolving bugs if they are reported. Please update your script to newest revision and report if something doesn&#039;t work properly.&lt;br /&gt;
&lt;br /&gt;
Temperature may not be listed if you don&#039;t have module bq27x00_battery installed or enabled. Also kernel-maemo version is not listed if you don&#039;t use titan&#039;s kernel.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 currfreq=`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq`&lt;br /&gt;
 idlefreq=`awk &#039;{if ($2 &amp;gt; 0) print $1}&#039; /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state | tail -n 1`&lt;br /&gt;
 tis1=`awk &#039;{sum += $2} END {print sum}&#039; /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state`&lt;br /&gt;
 tis2=`awk &#039;$1 == &amp;quot;&#039;&amp;quot;$idlefreq&amp;quot;&#039;&amp;quot; {idle = $2} {sum += $2} END {print sum-idle}&#039; /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state`&lt;br /&gt;
 &lt;br /&gt;
 echo -e &amp;quot;&lt;br /&gt;
 SCRIPT FOR ANALYZING TIME_IN_STATE&lt;br /&gt;
 By rooted (maemo.org)&lt;br /&gt;
 Revision 6&lt;br /&gt;
 &lt;br /&gt;
 The script is in active development.&lt;br /&gt;
 Update your script to current revision from:&lt;br /&gt;
 wiki.maemo.org/Overclocking&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 FREQUENCY\tUSED\t\tWHEN BUSY\n&amp;quot;&lt;br /&gt;
 awk &#039;&lt;br /&gt;
 {if ($1 &amp;gt;= 1000000)                 printf (&amp;quot;%.0f MHz\t&amp;quot;,$1/1000); else printf (&amp;quot;%.0f MHz\t\t&amp;quot;,$1/1000)}&lt;br /&gt;
 {if ($2 == 0)                       printf &amp;quot;unused&amp;quot;;               else printf (&amp;quot;%.1f %\t\t&amp;quot;,($2*100)/&amp;quot;&#039;&amp;quot;$tis1&amp;quot;&#039;&amp;quot;)}&lt;br /&gt;
 {if ($2 == 0 || $2/&amp;quot;&#039;&amp;quot;$tis2&amp;quot;&#039;&amp;quot; &amp;gt; 1) printf &amp;quot;\n&amp;quot;;                   else printf (&amp;quot;%.1f %\n&amp;quot;,($2*100)/&amp;quot;&#039;&amp;quot;$tis2&amp;quot;&#039;&amp;quot;)}&lt;br /&gt;
 &#039; /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state&lt;br /&gt;
 &lt;br /&gt;
 echo -e &amp;quot;&lt;br /&gt;
 Current frequency:   $(($currfreq/1000)) MHz&lt;br /&gt;
 Idle frequency:      $(($idlefreq/1000)) MHz&lt;br /&gt;
 Kernel:              `uname -r`&lt;br /&gt;
 kernel-maemo:        `dpkg -l kernel* | awk &#039;/kernel-maemo/ {print $3}&#039;`&lt;br /&gt;
 Uptime:              `uptime | sed -e &#039;s/.*p *//&#039; -e &#039;s/, l.*//&#039; -e &#039;s/  / /&#039;`&lt;br /&gt;
 Load:                `uptime | sed &#039;s/.*e: //&#039;`&lt;br /&gt;
 Boot reason:         `cat /proc/bootreason`&lt;br /&gt;
 Temperature:         `cat /sys/class/power_supply/bq27200-0/temp` °C\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Output example:&lt;br /&gt;
&lt;br /&gt;
 SCRIPT FOR ANALYZING TIME_IN_STATE&lt;br /&gt;
 By rooted (maemo.org)&lt;br /&gt;
 Revision 6&lt;br /&gt;
 &lt;br /&gt;
 The script is in active development.&lt;br /&gt;
 Update your script to current revision from:&lt;br /&gt;
 wiki.maemo.org/Overclocking&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 FREQUENCY       USED            WHEN BUSY&lt;br /&gt;
 &lt;br /&gt;
 1200 MHz        unused&lt;br /&gt;
 1100 MHz        unused&lt;br /&gt;
 1000 MHz        unused&lt;br /&gt;
 950 MHz         unused&lt;br /&gt;
 900 MHz         unused&lt;br /&gt;
 850 MHz         unused&lt;br /&gt;
 810 MHz         1.6 %           56.7 %&lt;br /&gt;
 750 MHz         0.0 %           0.8 %&lt;br /&gt;
 700 MHz         0.1 %           1.9 %&lt;br /&gt;
 600 MHz         0.0 %           1.5 %&lt;br /&gt;
 550 MHz         0.0 %           1.2 %&lt;br /&gt;
 500 MHz         1.0 %           37.8 %&lt;br /&gt;
 250 MHz         97.3 %&lt;br /&gt;
 125 MHz         unused&lt;br /&gt;
 &lt;br /&gt;
 Current frequency:   250 MHz&lt;br /&gt;
 Idle frequency:      250 MHz&lt;br /&gt;
 Kernel:              2.6.28.10maemo-ulv-omap1&lt;br /&gt;
 kernel-maemo:        2.6.28-maemo21&lt;br /&gt;
 Uptime:              2 days, 2:27&lt;br /&gt;
 Load:                0.11, 0.04, 0.01&lt;br /&gt;
 Boot reason:         pwr_key&lt;br /&gt;
 Temperature:         25 °C&lt;br /&gt;
&lt;br /&gt;
==Analyzing time in state, including idle mode stats (by ArbitRabbit)==&lt;br /&gt;
The following script will show the current frequency and statistics for each state, including time spent in idle mode when the CPU is actually sleeping. &lt;br /&gt;
This script works with the special frequency handling in Titan&#039;s kernel.&lt;br /&gt;
&lt;br /&gt;
To run this script as user and be able to set the frequencies you will need to install &amp;quot;[[Root_access|rootsh]]&amp;quot; via apt-get.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;scheduler_stats.sh&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 awk &#039;{print &amp;quot;\nCurrent frequency: &amp;quot;$1/1000&amp;quot; MHz\n&amp;quot;}&#039; /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq&lt;br /&gt;
 awk &#039;{print &amp;quot;Minimum frequency: &amp;quot;$1/1000&amp;quot; MHz\n&amp;quot;}&#039; /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq&lt;br /&gt;
 awk &#039;{print &amp;quot;Maximum frequency: &amp;quot;$1/1000&amp;quot; MHz\n&amp;quot;}&#039; /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq&lt;br /&gt;
 &lt;br /&gt;
 tis1=`awk &#039;{SUM += $2} END {printf(&amp;quot;%.0f&amp;quot;,SUM/1000)}&#039; /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state`&lt;br /&gt;
 &lt;br /&gt;
 idle0=`awk &#039;{printf (&amp;quot;%.0f&amp;quot;,$1/1000)}&#039; /sys/devices/system/cpu/cpu0/cpuidle/state0/time`&lt;br /&gt;
 &lt;br /&gt;
 idle1=`awk &#039;{printf (&amp;quot;%.0f&amp;quot;,$1/1000)}&#039; /sys/devices/system/cpu/cpu0/cpuidle/state1/time`&lt;br /&gt;
 &lt;br /&gt;
 idle2=`awk &#039;{printf (&amp;quot;%.0f&amp;quot;,$1/1000)}&#039; /sys/devices/system/cpu/cpu0/cpuidle/state2/time`&lt;br /&gt;
 &lt;br /&gt;
 idle3=`awk &#039;{printf (&amp;quot;%.0f&amp;quot;,$1/1000)}&#039; /sys/devices/system/cpu/cpu0/cpuidle/state3/time`&lt;br /&gt;
 &lt;br /&gt;
 totaltime=$(($idle0+$idle1+$idle2+$idle3+$tis1))&lt;br /&gt;
 echo -e &amp;quot;FREQUENCY\tUSED&amp;quot;&lt;br /&gt;
 SUM=0&lt;br /&gt;
 awk &#039;&lt;br /&gt;
        {&lt;br /&gt;
                printf (($1/1000)&amp;quot; MHz \t&amp;quot;);&lt;br /&gt;
                if ($2 == 0)&lt;br /&gt;
                {&lt;br /&gt;
                        printf &amp;quot;0 %\n&amp;quot;;&lt;br /&gt;
                }&lt;br /&gt;
                else {&lt;br /&gt;
                        SUM+=$2;&lt;br /&gt;
                        printf(&amp;quot;%.3f %\n&amp;quot;,($2/10)/&amp;quot;&#039;&amp;quot;$totaltime&amp;quot;&#039;&amp;quot;);&lt;br /&gt;
                        }&lt;br /&gt;
        }&lt;br /&gt;
        END{&lt;br /&gt;
        printf (&amp;quot;Time spent in idle mode is %2.2f %\n&amp;quot;,(1-((SUM/1000)/&amp;quot;&#039;&amp;quot;$totaltime&amp;quot;&#039;&amp;quot;))*100);&lt;br /&gt;
        }&#039; /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state&lt;br /&gt;
 echo &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Sample Output&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Current frequency: 500 MHz&lt;br /&gt;
 &lt;br /&gt;
 Minimum frequency: 500 MHz&lt;br /&gt;
 &lt;br /&gt;
 Maximum frequency: 810 MHz&lt;br /&gt;
 &lt;br /&gt;
 FREQUENCY       USED&lt;br /&gt;
 1200 MHz        0 %&lt;br /&gt;
 1100 MHz        0 %&lt;br /&gt;
 1000 MHz        0 %&lt;br /&gt;
 950 MHz         0 %&lt;br /&gt;
 900 MHz         0 %&lt;br /&gt;
 850 MHz         0 %&lt;br /&gt;
 810 MHz         0.000 %&lt;br /&gt;
 750 MHz         0.000 %&lt;br /&gt;
 700 MHz         0.000 %&lt;br /&gt;
 600 MHz         0.000 %&lt;br /&gt;
 550 MHz         0.000 %&lt;br /&gt;
 500 MHz         0.010 %&lt;br /&gt;
 Time spent in idle mode is 99.99 %&lt;br /&gt;
&lt;br /&gt;
Known Bugs: Requires the Phone to be booted for an hour or so before it results in decent stats.&lt;br /&gt;
&lt;br /&gt;
==Combined helper script (by evilJazz)==&lt;br /&gt;
&lt;br /&gt;
The following script will show the current frequency and statistics. It also accepts two optional parameters that will set the max and/or min frequencies (in MHz unit). Calling the script without these parameters will not set the new clocking. Instead it will just show the current frequencies and statistics.&lt;br /&gt;
&lt;br /&gt;
This script works with the special frequency handling in Titan&#039;s kernel.&lt;br /&gt;
&lt;br /&gt;
To run this script as user and be able to set the frequencies you will need to install &amp;quot;[[Root_access|rootsh]]&amp;quot; via apt-get.&lt;br /&gt;
&lt;br /&gt;
 overclock.sh [max freq] [min freq]&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 max=${1}000&lt;br /&gt;
 min=${2}000&lt;br /&gt;
 &lt;br /&gt;
 # Handle and rewrite special cases in Titan&#039;s kernel...&lt;br /&gt;
 [ &amp;quot;$max&amp;quot; == &amp;quot;600000&amp;quot; ] &amp;amp;&amp;amp; max=599000&lt;br /&gt;
 [ &amp;quot;$min&amp;quot; == &amp;quot;125000&amp;quot; ] &amp;amp;&amp;amp; min=124999&lt;br /&gt;
 &lt;br /&gt;
 if [ $(id -u) -ne 0 ]; then&lt;br /&gt;
   [ &amp;quot;$max&amp;quot; != &amp;quot;000&amp;quot; ] &amp;amp;&amp;amp; echo &amp;quot;echo $max &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq&amp;quot; | sudo gainroot&lt;br /&gt;
   [ &amp;quot;$min&amp;quot; != &amp;quot;000&amp;quot; ] &amp;amp;&amp;amp; echo &amp;quot;echo $min &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq&amp;quot; | sudo gainroot&lt;br /&gt;
 else&lt;br /&gt;
   [ &amp;quot;$max&amp;quot; != &amp;quot;000&amp;quot; ] &amp;amp;&amp;amp; echo $max &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq&lt;br /&gt;
   [ &amp;quot;$min&amp;quot; != &amp;quot;000&amp;quot; ] &amp;amp;&amp;amp; echo $min &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 awk &#039;{printf(&amp;quot;\nCurrent frequency: %7s MHz\n&amp;quot;, $1/1000)}&#039; /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq&lt;br /&gt;
 awk &#039;{printf(&amp;quot;Minimal frequency: %7s MHz\n&amp;quot;, $1/1000)}&#039; /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq&lt;br /&gt;
 awk &#039;{printf(&amp;quot;Maximal frequency: %7s MHz\n\n&amp;quot;, $1/1000)}&#039; /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq&lt;br /&gt;
 &lt;br /&gt;
 sum=$(awk &#039;{SUM += $2} END {print SUM}&#039; /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state)&lt;br /&gt;
 awk &#039;{printf(&amp;quot;%7s MHz: %5.1f % (%8d)\n&amp;quot;, ($1/1000), ($2 * 100)/&amp;quot;&#039;&amp;quot;$sum&amp;quot;&#039;&amp;quot;, $2)}&#039; /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state&lt;br /&gt;
 echo&lt;br /&gt;
&lt;br /&gt;
Output example:&lt;br /&gt;
&lt;br /&gt;
 ~ $ ./overclock.sh 600 250&lt;br /&gt;
&lt;br /&gt;
 Current frequency:     250 MHz&lt;br /&gt;
 Minimal frequency:     250 MHz&lt;br /&gt;
 Maximal frequency:     599 MHz&lt;br /&gt;
 &lt;br /&gt;
    1200 MHz:   0.0 % (       0)&lt;br /&gt;
    1100 MHz:   0.0 % (       0)&lt;br /&gt;
    1000 MHz:   0.0 % (       0)&lt;br /&gt;
     950 MHz:   0.0 % (       0)&lt;br /&gt;
     900 MHz:   0.2 % (     271)&lt;br /&gt;
     850 MHz:   0.0 % (       0)&lt;br /&gt;
     810 MHz:   0.0 % (       0)&lt;br /&gt;
     750 MHz:   0.0 % (       0)&lt;br /&gt;
     700 MHz:   0.0 % (       0)&lt;br /&gt;
     600 MHz:   9.0 % (   13663)&lt;br /&gt;
     550 MHz:   0.5 % (     701)&lt;br /&gt;
     500 MHz:  15.4 % (   23379)&lt;br /&gt;
     250 MHz:  75.0 % (  114021)&lt;br /&gt;
 124.999 MHz:   0.0 % (       0)&lt;br /&gt;
&lt;br /&gt;
=Changing the Kernel=&lt;br /&gt;
&lt;br /&gt;
==Installing a modified Kernel==&lt;br /&gt;
&lt;br /&gt;
===Flashing using PC===&lt;br /&gt;
&lt;br /&gt;
1. Power off the N900 completely.&lt;br /&gt;
&lt;br /&gt;
2. Hold &amp;quot;u&amp;quot; on the N900&#039;s keyboard, while holding, connect it to the PC via USB cable.&lt;br /&gt;
&lt;br /&gt;
3. You will see usb icon on top right of white Nokia screen.&lt;br /&gt;
&lt;br /&gt;
4. Now you can let go of &amp;quot;u&amp;quot; on the keyboard.&lt;br /&gt;
&lt;br /&gt;
5. Now use flasher utility with the kernel file located in the same directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 flasher-3.5 -k image_file_name -f -R&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. It should take about 1-2 seconds then it&#039;ll say Done.&lt;br /&gt;
&lt;br /&gt;
7. Now your N900 will show white Nokia screen. (reboot)&lt;br /&gt;
&lt;br /&gt;
8. At this time, you can pull out the USB cable.&lt;br /&gt;
&lt;br /&gt;
9. N900 should finish booting up if all goes well.&lt;br /&gt;
&lt;br /&gt;
10. Test out your phone as usual. (Apps, browser, camera, phone etc etc)&lt;br /&gt;
&lt;br /&gt;
11. If any abnormal events occur frequently (crash, hang, screen corruption etc), turn it off, flash it to a slower kernel and test again.&lt;br /&gt;
note: For Windows7 64bit users, you may need to use WindowsXP mode. ([http://www.youtube.com/watch?v=Bx6dblXl2eo Youtube Tutorial])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Flashing from N900 xterminal===&lt;br /&gt;
&lt;br /&gt;
* do a backup, have a pc nearby and know you are able to flash the n900 with flasher-3.5 - just in case&lt;br /&gt;
&lt;br /&gt;
0. Launch xterminal app then type sudo gainroot (need rootsh installed)&lt;br /&gt;
&lt;br /&gt;
1. type &lt;br /&gt;
 softupd -vv -s --local&lt;br /&gt;
(thats double v)&lt;br /&gt;
&lt;br /&gt;
2. open new terminal&lt;br /&gt;
&lt;br /&gt;
3. type&lt;br /&gt;
 flasher --local -f -k &amp;lt;kernel_zimage_file_with_path&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. you see the flashing (takes some time)&lt;br /&gt;
&lt;br /&gt;
5. type &amp;quot;sync&amp;quot; to save changes&lt;br /&gt;
&lt;br /&gt;
6. type &amp;quot;reboot&amp;quot; and enter to restart&lt;br /&gt;
&lt;br /&gt;
7. Test out your phone as usual. (Apps, browser, camera, phone etc etc)&lt;br /&gt;
&lt;br /&gt;
8. If any abnormal events occur frequently (crash, hang, screen corruption etc), turn it off, flash it to a slower kernel and test again.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;You are fully responsible for any damage caused by overclocking. Not anyone else.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Reverting to the Original Kernel==&lt;br /&gt;
&lt;br /&gt;
If you want to revert to the original kernel, execute:&lt;br /&gt;
&lt;br /&gt;
 apt-get install --reinstall kernel kernel-flasher&lt;br /&gt;
&lt;br /&gt;
=Voltage tables=&lt;br /&gt;
&lt;br /&gt;
One factor reducing CPU lifetime is the current it is running with.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;CPU dynamic power = capacitance * frequency * voltage^2&amp;lt;/code&amp;gt; (source?)([http://en.wikipedia.org/wiki/Dynamic_frequency_scaling])&lt;br /&gt;
&lt;br /&gt;
As can be seen from the formula lower voltage plays greater part in CPU consumption than frequency. By reducing the voltage the damage of overclocking can be reduced and the battery life time extended.&lt;br /&gt;
&lt;br /&gt;
==Calculating voltages==&lt;br /&gt;
&lt;br /&gt;
According to [http://talk.maemo.org/showpost.php?p=606031&amp;amp;postcount=2375 this calculations] the voltage can be varied in steps of 0.0125 V with values 0-72. The formula is (with x being the kernel parameter value):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;V = x * 0.0125 + 0.6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
 Lowest voltage (x = 0):   0  * 0.0125 + 0.6 = 0     + 0.6 = 0.6 V&lt;br /&gt;
 Highest voltage (x = 72): 72 * 0.0125 + 0.6 = 0.9   + 0.6 = 1.5 V&lt;br /&gt;
 Random voltage (x = 38):  38 * 0.0125 + 0.6 = 0.475 + 0.6 = 1.075 V&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
 FREQUENCY   Nokia   LV    ULV   XLV   ideal&lt;br /&gt;
 0 MHz       30      30    25    30    30&lt;br /&gt;
 125 MHz     30      30    25    20    30&lt;br /&gt;
 250 MHz     38      38    25    30    30&lt;br /&gt;
 500 MHz     48      48    33    33    30&lt;br /&gt;
 550 MHz    *54*     48    38    38    33&lt;br /&gt;
 600 MHz     60     *54*   38    38    38&lt;br /&gt;
 700 MHz             54    45    45    45&lt;br /&gt;
 750 MHz             54    45    45    45&lt;br /&gt;
 810 MHz             54    48    48    48&lt;br /&gt;
 850 MHz             54    48    48    48&lt;br /&gt;
 900 MHz             54   *54*  *54*  *54*&lt;br /&gt;
 950 MHz             54    54    54    54&lt;br /&gt;
 1000 MHz            60    60    60    60&lt;br /&gt;
 1100 MHz            72    72    72    72&lt;br /&gt;
 1150 MHz            72    72    72    72&lt;br /&gt;
 1200 MHz            72    72    72    72&lt;br /&gt;
&lt;br /&gt;
Note: Asterisks indicate the first frequency in the kernel which needs overvoltage.&lt;br /&gt;
&lt;br /&gt;
==/sys/power/vdd1_opps_vsel values==&lt;br /&gt;
&lt;br /&gt;
 LV:      &amp;quot;30 30 38 48 48 54 54 54 54 54 54 54 60 72 72&amp;quot;&lt;br /&gt;
 ULV:     &amp;quot;25 25 25 33 38 38 45 45 48 48 54 54 60 72 72&amp;quot;&lt;br /&gt;
 XLV:     &amp;quot;30 20 30 33 38 38 45 45 48 48 54 54 60 72 72&amp;quot;&lt;br /&gt;
 ideal:   &amp;quot;30 30 30 30 33 38 45 45 48 48 54 54 60 72 72&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Kernels&#039; specifications==&lt;br /&gt;
&lt;br /&gt;
===Nokia&#039;s kernel===&lt;br /&gt;
&lt;br /&gt;
 VALUE  VOLTAGE   FREQUENCY&lt;br /&gt;
 30     0.975V    0 MHz&lt;br /&gt;
 30     0.975V    125 MHz&lt;br /&gt;
 38     1.075V    250 MHz&lt;br /&gt;
 48     1.200V    500 MHz&lt;br /&gt;
 54     1.275V    550 MHz&lt;br /&gt;
 60     1.350V    600 MHz&lt;br /&gt;
 &lt;br /&gt;
===titan&#039;s LV kernel===&lt;br /&gt;
&lt;br /&gt;
 VALUE  VOLTAGE   FREQUENCY&lt;br /&gt;
 30     0.975V    0 MHz&lt;br /&gt;
 30     0.975V    125 MHz&lt;br /&gt;
 38     1.075V    250 MHz&lt;br /&gt;
 48     1.200V    500 MHz&lt;br /&gt;
 48     1.200V    550 MHz&lt;br /&gt;
 54     1.275V    600 MHz&lt;br /&gt;
 54     1.275V    700 MHz&lt;br /&gt;
 54     1.275V    750 MHz&lt;br /&gt;
 54     1.275V    810 MHz&lt;br /&gt;
 54     1.275V    850 MHz&lt;br /&gt;
 54     1.275V    900 MHz&lt;br /&gt;
 54     1.275V    950 MHz&lt;br /&gt;
 60     1.350V    1000 MHz&lt;br /&gt;
 72     1.500V    1100 MHz&lt;br /&gt;
 72     1.500V    1200 MHz&lt;br /&gt;
&lt;br /&gt;
===titan&#039;s ULV kernel===&lt;br /&gt;
&lt;br /&gt;
 VALUE  VOLTAGE   FREQUENCY&lt;br /&gt;
 25     0.912V    0 MHz&lt;br /&gt;
 25     0.912V    125 MHz&lt;br /&gt;
 25     0.912V    250 MHz&lt;br /&gt;
 33     1.012V    500 MHz&lt;br /&gt;
 38     1.075V    550 MHz&lt;br /&gt;
 38     1.075V    600 MHz&lt;br /&gt;
 45     1.163V    700 MHz&lt;br /&gt;
 45     1.163V    750 MHz&lt;br /&gt;
 48     1.200V    810 MHz&lt;br /&gt;
 48     1.200V    850 MHz&lt;br /&gt;
 54     1.275V    900 MHz&lt;br /&gt;
 54     1.275V    950 MHz&lt;br /&gt;
 60     1.350V    1000 MHz&lt;br /&gt;
 72     1.500V    1100 MHz&lt;br /&gt;
 72     1.500V    1200 MHz&lt;br /&gt;
&lt;br /&gt;
===titan&#039;s XLV kernel===&lt;br /&gt;
&lt;br /&gt;
 VALUE  VOLTAGE   FREQUENCY&lt;br /&gt;
 30     0.975V    0 MHz&lt;br /&gt;
 20     0.850V    125 MHz&lt;br /&gt;
 30     0.975V    250 MHz&lt;br /&gt;
 33     1.012V    500 MHz&lt;br /&gt;
 38     1.075V    550 MHz&lt;br /&gt;
 38     1.075V    600 MHz&lt;br /&gt;
 45     1.163V    700 MHz&lt;br /&gt;
 45     1.163V    750 MHz&lt;br /&gt;
 48     1.200V    810 MHz&lt;br /&gt;
 48     1.200V    850 MHz&lt;br /&gt;
 54     1.275V    900 MHz&lt;br /&gt;
 54     1.275V    950 MHz&lt;br /&gt;
 60     1.350V    1000 MHz&lt;br /&gt;
 72     1.500V    1100 MHz&lt;br /&gt;
 72     1.500V    1150 MHz&lt;br /&gt;
&lt;br /&gt;
===titan&#039;s ideal kernel===&lt;br /&gt;
&lt;br /&gt;
 VALUE  VOLTAGE   FREQUENCY&lt;br /&gt;
 30     0.975V    0 MHz&lt;br /&gt;
 30     0.975V    125 MHz&lt;br /&gt;
 30     0.975V    250 MHz&lt;br /&gt;
 30     0.975V    500 MHz&lt;br /&gt;
 33     1.012V    550 MHz&lt;br /&gt;
 38     1.075V    600 MHz&lt;br /&gt;
 45     1.163V    700 MHz&lt;br /&gt;
 45     1.163V    750 MHz&lt;br /&gt;
 48     1.200V    810 MHz&lt;br /&gt;
 48     1.200V    850 MHz&lt;br /&gt;
 54     1.275V    900 MHz&lt;br /&gt;
 54     1.275V    950 MHz&lt;br /&gt;
 60     1.350V    1000 MHz&lt;br /&gt;
 72     1.500V    1100 MHz&lt;br /&gt;
 72     1.500V    1150 MHz&lt;br /&gt;
&lt;br /&gt;
[[Category:Power users]]&lt;/div&gt;</summary>
		<author><name>82.201.1.161</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Streaming_video_from_built-in_webcam&amp;diff=37882</id>
		<title>Streaming video from built-in webcam</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Streaming_video_from_built-in_webcam&amp;diff=37882"/>
		<updated>2010-04-20T13:56:09Z</updated>

		<summary type="html">&lt;p&gt;82.201.1.161: /* Streaming over ssh N900 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;It is possible to use the [[Nokia N800|N800]] camera as a source of streaming video. This was originally described [https://maemo.org/community/wiki/howtostreamvideo/ here], but the referenced example has an error which prevents it from working.&lt;br /&gt;
&lt;br /&gt;
This note describes how to stream video from the platform to an RTP sink, for example the [[VLC]] media player.&lt;br /&gt;
&lt;br /&gt;
First, you must install the &#039;&#039;&#039;gstreamer-tools&#039;&#039;&#039; package from the diablo repo on repository.maemo.org.&lt;br /&gt;
&lt;br /&gt;
* On the N800, the following script will stream video from the camera. Here, 172.31.0.244 is the Linux box with VLC installed, and 172.31.0.245 is the N800. I call this script &amp;lt;code&amp;gt;~/bin/rtpstream.sh&amp;lt;/code&amp;gt;.&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 VPORT=5434&lt;br /&gt;
 APORT=5432&lt;br /&gt;
 HOST=${1:-172.31.0.244}&lt;br /&gt;
 gst-launch-0.10 v4l2src ! video/x-raw-yuv,width=176,height=144,framerate=\(fraction\)15/1 ! hantro4200enc stream-type=1 profile-and-level=1001 ! video/x-h263,framerate=\(fraction\)15/1 ! rtph263ppay mtu=1438 ! udpsink host=$HOST port=$VPORT dsppcmsrc ! queue ! audio/x-raw-int,channels=1,rate=8000 ! mulawenc ! rtppcmupay mtu=1438 ! udpsink host=$HOST port=$APORT&lt;br /&gt;
&lt;br /&gt;
* On the Linux box, the sample .sdp file from [http://web.media.mit.edu/%7Elifton/snippets/n800_to_sl/ the original article], with the address of our VLC player, saved as a file i.e. &amp;lt;code&amp;gt;/tmp/n800.sdp&amp;lt;/code&amp;gt;&lt;br /&gt;
 v=0&lt;br /&gt;
 o=- 37 614155991 IN IP4 127.0.0.0&lt;br /&gt;
 s=QuickTime&lt;br /&gt;
 t=0 0&lt;br /&gt;
 a=range:npt=now-&lt;br /&gt;
 m=audio 5432 RTP/AVP 0&lt;br /&gt;
 c=IN IP4 172.31.0.245&lt;br /&gt;
 b=AS:63&lt;br /&gt;
 m=video 5434 RTP/AVP 96&lt;br /&gt;
 c=IN IP4 172.31.0.245&lt;br /&gt;
 a=rtpmap:96 H263-2000/90000&lt;br /&gt;
 a=fmtp:96&lt;br /&gt;
 a=cliprect:0,0,144,176&lt;br /&gt;
 a=framesize:96 176-144&lt;br /&gt;
* On the N800, pop out the camera and run:&lt;br /&gt;
 $ ~/bin/rtpstream.sh &lt;br /&gt;
assume on PATH, +x etc.&lt;br /&gt;
* On Linux box (note VLC runs on other platforms as well):&lt;br /&gt;
 $ vlc /tmp/n800.sdp&lt;br /&gt;
* Enjoy streaming video (and sound) from the N800.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thanks to [http://web.media.mit.edu/%7Elifton/snippets/n800_to_sl/ Josh Lifton] for the original leg wor&lt;br /&gt;
&lt;br /&gt;
On a N800, to make the image vertically flip automatically when the camera&#039;s pointing backwards (so it&#039;s not upside-down), change the source name from &amp;quot;v4l2src&amp;quot; to &amp;quot;gconfv4l2src&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To adjust the video encoding quality, have a look at the parameters described by entering &amp;quot;gst-inspect hantro4200enc&amp;quot; at a shell prompt.  Setting the &amp;quot;bit-rate&amp;quot; parameter to its maximum (515) and the &amp;quot;profile-and-level&amp;quot; parameter to 1007 produces a much better quality image.  Also, I suspect the &amp;quot;stream-type&amp;quot; parameter should be &amp;quot;5&amp;quot; (H263), not &amp;quot;1&amp;quot; (MPEG4 Video).&lt;br /&gt;
&lt;br /&gt;
== Streaming over ssh N900 ==&lt;br /&gt;
&lt;br /&gt;
Here is an alternative way of streaming video on the [[Nokia N900|N900]] over ssh.&lt;br /&gt;
&lt;br /&gt;
First get ssh to do X11 forwarding by installing xauth as follows:&lt;br /&gt;
&lt;br /&gt;
# Install libxmuu1 (needed by xauth) by &amp;quot;apt-get install libxmuu1&amp;quot;&lt;br /&gt;
# Install the xauth from https://bugs.maemo.org/show_bug.cgi?id=2494&lt;br /&gt;
&lt;br /&gt;
Now ssh to your N900 with the flag &amp;quot;-X&amp;quot; and then give the command:&lt;br /&gt;
&lt;br /&gt;
  gst-launch-0.10 v4l2src \&lt;br /&gt;
  ! videoscale ! video/x-raw-yuv,width=320,height=240 \&lt;br /&gt;
  ! xvimagesink&lt;br /&gt;
&lt;br /&gt;
A 320x240 video window should now popup on your desktop.&lt;br /&gt;
&lt;br /&gt;
[[Category:Connectivity]]&lt;br /&gt;
[[Category:Media]]&lt;br /&gt;
[[Category:Power users]]&lt;/div&gt;</summary>
		<author><name>82.201.1.161</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Streaming_video_from_built-in_webcam&amp;diff=37883</id>
		<title>Streaming video from built-in webcam</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Streaming_video_from_built-in_webcam&amp;diff=37883"/>
		<updated>2010-04-20T13:53:21Z</updated>

		<summary type="html">&lt;p&gt;82.201.1.161: /* Streaming over ssh N900 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;It is possible to use the [[Nokia N800|N800]] camera as a source of streaming video. This was originally described [https://maemo.org/community/wiki/howtostreamvideo/ here], but the referenced example has an error which prevents it from working.&lt;br /&gt;
&lt;br /&gt;
This note describes how to stream video from the platform to an RTP sink, for example the [[VLC]] media player.&lt;br /&gt;
&lt;br /&gt;
First, you must install the &#039;&#039;&#039;gstreamer-tools&#039;&#039;&#039; package from the diablo repo on repository.maemo.org.&lt;br /&gt;
&lt;br /&gt;
* On the N800, the following script will stream video from the camera. Here, 172.31.0.244 is the Linux box with VLC installed, and 172.31.0.245 is the N800. I call this script &amp;lt;code&amp;gt;~/bin/rtpstream.sh&amp;lt;/code&amp;gt;.&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 VPORT=5434&lt;br /&gt;
 APORT=5432&lt;br /&gt;
 HOST=${1:-172.31.0.244}&lt;br /&gt;
 gst-launch-0.10 v4l2src ! video/x-raw-yuv,width=176,height=144,framerate=\(fraction\)15/1 ! hantro4200enc stream-type=1 profile-and-level=1001 ! video/x-h263,framerate=\(fraction\)15/1 ! rtph263ppay mtu=1438 ! udpsink host=$HOST port=$VPORT dsppcmsrc ! queue ! audio/x-raw-int,channels=1,rate=8000 ! mulawenc ! rtppcmupay mtu=1438 ! udpsink host=$HOST port=$APORT&lt;br /&gt;
&lt;br /&gt;
* On the Linux box, the sample .sdp file from [http://web.media.mit.edu/%7Elifton/snippets/n800_to_sl/ the original article], with the address of our VLC player, saved as a file i.e. &amp;lt;code&amp;gt;/tmp/n800.sdp&amp;lt;/code&amp;gt;&lt;br /&gt;
 v=0&lt;br /&gt;
 o=- 37 614155991 IN IP4 127.0.0.0&lt;br /&gt;
 s=QuickTime&lt;br /&gt;
 t=0 0&lt;br /&gt;
 a=range:npt=now-&lt;br /&gt;
 m=audio 5432 RTP/AVP 0&lt;br /&gt;
 c=IN IP4 172.31.0.245&lt;br /&gt;
 b=AS:63&lt;br /&gt;
 m=video 5434 RTP/AVP 96&lt;br /&gt;
 c=IN IP4 172.31.0.245&lt;br /&gt;
 a=rtpmap:96 H263-2000/90000&lt;br /&gt;
 a=fmtp:96&lt;br /&gt;
 a=cliprect:0,0,144,176&lt;br /&gt;
 a=framesize:96 176-144&lt;br /&gt;
* On the N800, pop out the camera and run:&lt;br /&gt;
 $ ~/bin/rtpstream.sh &lt;br /&gt;
assume on PATH, +x etc.&lt;br /&gt;
* On Linux box (note VLC runs on other platforms as well):&lt;br /&gt;
 $ vlc /tmp/n800.sdp&lt;br /&gt;
* Enjoy streaming video (and sound) from the N800.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thanks to [http://web.media.mit.edu/%7Elifton/snippets/n800_to_sl/ Josh Lifton] for the original leg wor&lt;br /&gt;
&lt;br /&gt;
On a N800, to make the image vertically flip automatically when the camera&#039;s pointing backwards (so it&#039;s not upside-down), change the source name from &amp;quot;v4l2src&amp;quot; to &amp;quot;gconfv4l2src&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To adjust the video encoding quality, have a look at the parameters described by entering &amp;quot;gst-inspect hantro4200enc&amp;quot; at a shell prompt.  Setting the &amp;quot;bit-rate&amp;quot; parameter to its maximum (515) and the &amp;quot;profile-and-level&amp;quot; parameter to 1007 produces a much better quality image.  Also, I suspect the &amp;quot;stream-type&amp;quot; parameter should be &amp;quot;5&amp;quot; (H263), not &amp;quot;1&amp;quot; (MPEG4 Video).&lt;br /&gt;
&lt;br /&gt;
== Streaming over ssh N900 ==&lt;br /&gt;
&lt;br /&gt;
Here is an alternative way of streaming video on the [[Nokia N900|N900]] over ssh.&lt;br /&gt;
&lt;br /&gt;
First get ssh to do X11 forwarding by installing xauth as follows:&lt;br /&gt;
&lt;br /&gt;
# Install libxmuu1 (needed by xauth) by &amp;quot;apt-get install libxmuu1&amp;quot;&lt;br /&gt;
# Install the xauth from https://bugs.maemo.org/show_bug.cgi?id=2494&lt;br /&gt;
&lt;br /&gt;
Now ssh to your N900 with the flag &amp;quot;-X&amp;quot; and then give the command:&lt;br /&gt;
&lt;br /&gt;
  gst-launch-0.10 v4l2src ! videoscale ! video/x-raw-yuv,width=320,height=240 \&lt;br /&gt;
  ! xvimagesink&lt;br /&gt;
&lt;br /&gt;
A 320x240 video window should now popup on your desktop.&lt;br /&gt;
&lt;br /&gt;
[[Category:Connectivity]]&lt;br /&gt;
[[Category:Media]]&lt;br /&gt;
[[Category:Power users]]&lt;/div&gt;</summary>
		<author><name>82.201.1.161</name></author>
	</entry>
</feed>