Phone control

(E-mail)
Line 11: Line 11:
Also note that most commands don't need "--print-reply" option. Those that don't need it should be '''tested without it''' and this page should be edited.
Also note that most commands don't need "--print-reply" option. Those that don't need it should be '''tested without it''' and this page should be edited.
 +
==Phone==
==Phone==
Line 17: Line 18:
  dbus-send --type=method_call --dest=com.nokia.HildonDesktop.AppMgr /com/nokia/HildonDesktop/AppMgr com.nokia.HildonDesktop.AppMgr.LaunchApplication string:"rtcom-call-ui"
  dbus-send --type=method_call --dest=com.nokia.HildonDesktop.AppMgr /com/nokia/HildonDesktop/AppMgr com.nokia.HildonDesktop.AppMgr.LaunchApplication string:"rtcom-call-ui"
 +
===Make a phone call===
===Make a phone call===
-
  dbus-send --system --type=method_call --print-reply --dest=com.nokia.csd.Call /com/nokia/csd/call com.nokia.csd.Call.CreateWith string:"$1" uint32:0
+
  dbus-send --system --type=method_call --print-reply --dest=com.nokia.csd.Call /com/nokia/csd/call com.nokia.csd.Call.CreateWith string:"$NUMBER" uint32:0
 +
 
 +
Change $NUMBER to phone number you want to call.
-
With this fantastic command you can make a phone call from the command line. Change $1 to whatever number you want, or if you put this in a shell script, run it and use the number you want to call as the option, ala:
 
-
dbus-send-call 15555551234
 
===End current phone call===
===End current phone call===
Line 30: Line 32:
This will release/end/hangup/reject the current call (or possibly all calls if more then one call is active - needs testing to verify behavior when more then 1 call active) or do nothing if no calls are active.  
This will release/end/hangup/reject the current call (or possibly all calls if more then one call is active - needs testing to verify behavior when more then 1 call active) or do nothing if no calls are active.  
 +
===Get [http://en.wikipedia.org/wiki/International_Mobile_Equipment_Identity IMEI]===
===Get [http://en.wikipedia.org/wiki/International_Mobile_Equipment_Identity IMEI]===
  dbus-send --system --type=method_call --print-reply --dest=com.nokia.phone.SIM /com/nokia/phone/SIM/security Phone.Sim.Security.get_imei
  dbus-send --system --type=method_call --print-reply --dest=com.nokia.phone.SIM /com/nokia/phone/SIM/security Phone.Sim.Security.get_imei
 +
===Get [http://en.wikipedia.org/wiki/International_Mobile_Subscriber_Identity IMSI]===
===Get [http://en.wikipedia.org/wiki/International_Mobile_Subscriber_Identity IMSI]===
  dbus-send --system --type=method_call --print-reply --dest=com.nokia.phone.SIM /com/nokia/phone/SIM Phone.Sim.get_imsi
  dbus-send --system --type=method_call --print-reply --dest=com.nokia.phone.SIM /com/nokia/phone/SIM Phone.Sim.get_imsi
 +
===Get phone registration status===
===Get phone registration status===
  dbus-send --system --type=method_call --print-reply --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.get_registration_status
  dbus-send --system --type=method_call --print-reply --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.get_registration_status
 +
===Turn loudspeaker on===
===Turn loudspeaker on===
  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
  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
 +
===Turn loudspeaker off===
===Turn loudspeaker off===
  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
  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
 +
==Profiles==
==Profiles==
Line 56: Line 64:
  dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:"general"
  dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:"general"
 +
===Silent===
===Silent===
  dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:"silent"
  dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:"silent"
 +
==LED==
==LED==
Line 66: Line 76:
  dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_led_pattern_activate string:"PatternCommunicationIM"
  dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_led_pattern_activate string:"PatternCommunicationIM"
 +
===Deactivate LEDs===
===Deactivate LEDs===
  dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_led_pattern_deactivate string:"PatternCommunicationIM"
  dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_led_pattern_deactivate string:"PatternCommunicationIM"
 +
==Messaging==
==Messaging==
Line 76: Line 88:
  dbus-send --type=method_call --dest=com.nokia.modest /com/nokia/modest com.nokia.modest.MailTo string:"mailto:"
  dbus-send --type=method_call --dest=com.nokia.modest /com/nokia/modest com.nokia.modest.MailTo string:"mailto:"
 +
===Send and receive e-mail===
===Send and receive e-mail===
Line 82: Line 95:
  dbus-send --type=method_call --dest=com.nokia.modest /com/nokia/modest com.nokia.modest.SendReceive
  dbus-send --type=method_call --dest=com.nokia.modest /com/nokia/modest com.nokia.modest.SendReceive
 +
===Set presence===
===Set presence===
  dbus-send --type=method_call --print-reply --dest=org.freedesktop.Telepathy.MissionControl /org/freedesktop/Telepathy/MissionControl org.freedesktop.Telepathy.MissionControl.SetPresence uint32:2 string:"I'm here"
  dbus-send --type=method_call --print-reply --dest=org.freedesktop.Telepathy.MissionControl /org/freedesktop/Telepathy/MissionControl org.freedesktop.Telepathy.MissionControl.SetPresence uint32:2 string:"I'm here"
 +
==Media player==
==Media player==
Line 92: Line 107:
  dbus-send --dest=com.nokia.mediaplayer /com/nokia/mediaplayer com.nokia.mediaplayer.mime_open string:"file:///$1"
  dbus-send --dest=com.nokia.mediaplayer /com/nokia/mediaplayer com.nokia.mediaplayer.mime_open string:"file:///$1"
 +
===Pause what's currently playing===
===Pause what's currently playing===
Line 97: Line 113:
  dbus-send --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.renderer.pause
  dbus-send --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.renderer.pause
-
Older:
 
-
dbus-send --dest=com.nokia.osso_media_server /com/nokia/osso_media_server com.nokia.osso_media_server.music.pause
 
==Notifications==
==Notifications==
Line 105: Line 119:
  dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"NOTIFICATION"
  dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"NOTIFICATION"
 +
===Send dialog notification (orange multi line popup requiring user interaction)===
===Send dialog notification (orange multi line popup requiring user interaction)===
Line 111: Line 126:
Not sure what string "OK" does, but it is needed and can be anything.
Not sure what string "OK" does, but it is needed and can be anything.
 +
==Securing==
==Securing==
Line 117: Line 133:
  dbus-send --system --type=method_call --dest=com.nokia.system_ui /com/nokia/system_ui/request com.nokia.system_ui.request.devlock_open string:"com.nokia.mce" string:"/com/nokia/mce/request" string:"com.nokia.mce.request" string:"devlock_callback" uint32:'3'
  dbus-send --system --type=method_call --dest=com.nokia.system_ui /com/nokia/system_ui/request com.nokia.system_ui.request.devlock_open string:"com.nokia.mce" string:"/com/nokia/mce/request" string:"com.nokia.mce.request" string:"devlock_callback" uint32:'3'
 +
===Unlock===
===Unlock===
  dbus-send --system --type=method_call --dest=com.nokia.system_ui /com/nokia/system_ui/request com.nokia.system_ui.request.devlock_close string:"com.nokia.mce" string:"/com/nokia/mce/request" string:"com.nokia.mce.request" string:"devlock_callback" uint32:'0'
  dbus-send --system --type=method_call --dest=com.nokia.system_ui /com/nokia/system_ui/request com.nokia.system_ui.request.devlock_close string:"com.nokia.mce" string:"/com/nokia/mce/request" string:"com.nokia.mce.request" string:"devlock_callback" uint32:'0'
 +
===Lock screen and keys===
===Lock screen and keys===
  dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_tklock_mode_change string:"locked"
  dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_tklock_mode_change string:"locked"
 +
===Unlock screen and keys===
===Unlock screen and keys===
  dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_tklock_mode_change string:"unlocked"
  dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_tklock_mode_change string:"unlocked"
 +
==Networking==
==Networking==
Line 145: Line 165:
Keep in mind that phone has to be disconnected in order to connect via this call.
Keep in mind that phone has to be disconnected in order to connect via this call.
 +
===Disconnect internet===
===Disconnect internet===
  dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true
  dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true
 +
===Connect (show change connection UI)===
===Connect (show change connection UI)===
Line 155: Line 177:
If "boolean:true" at the end, one-line notification saying "No saved connections available" appears. Maybe affects more than that?
If "boolean:true" at the end, one-line notification saying "No saved connections available" appears. Maybe affects more than that?
 +
===Enable cellular radio===
===Enable cellular radio===
  dbus-send --system --type=method_call --dest=com.nokia.phone.SSC /com/nokia/phone/SSC com.nokia.phone.SSC.set_radio boolean:true
  dbus-send --system --type=method_call --dest=com.nokia.phone.SSC /com/nokia/phone/SSC com.nokia.phone.SSC.set_radio boolean:true
 +
===Disable cellular radio===
===Disable cellular radio===
  dbus-send --system --type=method_call --dest=com.nokia.phone.SSC /com/nokia/phone/SSC com.nokia.phone.SSC.set_radio boolean:false
  dbus-send --system --type=method_call --dest=com.nokia.phone.SSC /com/nokia/phone/SSC com.nokia.phone.SSC.set_radio boolean:false
 +
==Radio mode==
==Radio mode==
Line 169: Line 194:
  dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:1
  dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:1
 +
===3G===
===3G===
  dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:2
  dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:2
 +
===Dual===
===Dual===
  dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:0
  dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:0
 +
==Open link in browser==
==Open link in browser==
  dbus-send --system --type=method_call --dest=com.nokia.osso_browser /com/nokia/osso_browser/request com.nokia.osso_browser.load_url string:"google.com"
  dbus-send --system --type=method_call --dest=com.nokia.osso_browser /com/nokia/osso_browser/request com.nokia.osso_browser.load_url string:"google.com"
 +
==Reboot==
==Reboot==
Line 186: Line 215:
  dbus-send --system --type=method_call --print-reply --dest=com.nokia.mce "/com/nokia/mce/request" com.nokia.mce.request.req_reboot
  dbus-send --system --type=method_call --print-reply --dest=com.nokia.mce "/com/nokia/mce/request" com.nokia.mce.request.req_reboot
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 "reboot" in root terminal.
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 "reboot" in root terminal.
 +
==Shutdown==
==Shutdown==
Line 191: Line 221:
  dbus-send --system --type=method_call --print-reply --dest=com.nokia.mce "/com/nokia/mce/request" com.nokia.mce.request.req_shutdown
  dbus-send --system --type=method_call --print-reply --dest=com.nokia.mce "/com/nokia/mce/request" com.nokia.mce.request.req_shutdown
See warning at reboot dbus call (needs testing).
See warning at reboot dbus call (needs testing).
 +
==Show dashboard==
==Show dashboard==
  dbus-send /com/nokia/hildon_desktop com.nokia.hildon_desktop.exit_app_view
  dbus-send /com/nokia/hildon_desktop com.nokia.hildon_desktop.exit_app_view
 +
==Other==
==Other==
Line 201: Line 233:
You can also use [[DbusScripts|dbus-scripts]] to execute any command when various actions are triggered on D-Bus.
You can also use [[DbusScripts|dbus-scripts]] to execute any command when various actions are triggered on D-Bus.
 +
===Panucci (pause)===
===Panucci (pause)===
  dbus-send --type=method_call --dest=org.panucci.panucciInterface /panucciInterface org.panucci.panucciInterface.playPause
  dbus-send --type=method_call --dest=org.panucci.panucciInterface /panucciInterface org.panucci.panucciInterface.playPause
 +
=GConf=
=GConf=
Line 213: Line 247:
  gconftool-2 -u /system/osso/connectivity/network_type/GPRS/gprs_tx_bytes
  gconftool-2 -u /system/osso/connectivity/network_type/GPRS/gprs_tx_bytes
  gconftool-2 -s /system/osso/connectivity/network_type/GPRS/gprs_reset_time --type=string $(date +%s)
  gconftool-2 -s /system/osso/connectivity/network_type/GPRS/gprs_reset_time --type=string $(date +%s)
 +
=Command line=
=Command line=
Line 219: Line 254:
  /usr/bin/fmtx_client -p 1
  /usr/bin/fmtx_client -p 1
 +
===Disable FM Transmitter===
===Disable FM Transmitter===
  /usr/bin/fmtx_client -p 0
  /usr/bin/fmtx_client -p 0
 +
=GStreamer=
=GStreamer=
Line 235: Line 272:
  /bin/sleep 10; /usr/bin/gst-launch v4l2camsrc ! ffmpegcolorspace ! jpegenc ! identity error-after=1 ! filesink location=/home/user/MyDocs/DCIM/photo.jpg
  /bin/sleep 10; /usr/bin/gst-launch v4l2camsrc ! ffmpegcolorspace ! jpegenc ! identity error-after=1 ! filesink location=/home/user/MyDocs/DCIM/photo.jpg
 +
=Python=
=Python=
Line 247: Line 285:
                                             'com.nokia.csd.Call')
                                             'com.nokia.csd.Call')
     csd_call.CreateWith(str(number), dbus.UInt32(0))
     csd_call.CreateWith(str(number), dbus.UInt32(0))
 +
===Send dialog notification (orange multi line popup requiring user interaction)===
===Send dialog notification (orange multi line popup requiring user interaction)===

Revision as of 21:17, 1 April 2010

Image:Ambox_notice.png
Please be aware that the recommended way to use the phone functionality is Telepathy:


Contents

D-Bus

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, startup events, install scripts, etc. They should be run as:

run-standalone.sh SCRIPT.sh
run-standalone.sh dbus-send COMMAND

This is important to set up the environment correctly otherwise they may barf. If run as user "user" this is not needed.

Also note that most commands don't need "--print-reply" option. Those that don't need it should be tested without it and this page should be edited.


Phone

Open Phone application

dbus-send --type=method_call --dest=com.nokia.HildonDesktop.AppMgr /com/nokia/HildonDesktop/AppMgr com.nokia.HildonDesktop.AppMgr.LaunchApplication string:"rtcom-call-ui"


Make a phone call

dbus-send --system --type=method_call --print-reply --dest=com.nokia.csd.Call /com/nokia/csd/call com.nokia.csd.Call.CreateWith string:"$NUMBER" uint32:0

Change $NUMBER to phone number you want to call.


End current phone call

dbus-send --system --dest=com.nokia.csd.Call --print-reply /com/nokia/csd/call com.nokia.csd.Call.Release

This will release/end/hangup/reject the current call (or possibly all calls if more then one call is active - needs testing to verify behavior when more then 1 call active) or do nothing if no calls are active.


Get IMEI

dbus-send --system --type=method_call --print-reply --dest=com.nokia.phone.SIM /com/nokia/phone/SIM/security Phone.Sim.Security.get_imei


Get IMSI

dbus-send --system --type=method_call --print-reply --dest=com.nokia.phone.SIM /com/nokia/phone/SIM Phone.Sim.get_imsi


Get phone registration status

dbus-send --system --type=method_call --print-reply --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.get_registration_status


Turn loudspeaker on

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


Turn loudspeaker off

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


Profiles

General

dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:"general"


Silent

dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:"silent"


LED

Activate LEDs

dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_led_pattern_activate string:"PatternCommunicationIM"


Deactivate LEDs

dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_led_pattern_deactivate string:"PatternCommunicationIM"


Messaging

New e-mail

dbus-send --type=method_call --dest=com.nokia.modest /com/nokia/modest com.nokia.modest.MailTo string:"mailto:"


Send and receive e-mail

It works, but it takes looong time (up to minute and a half) via GPRS (2.5, 3 or 3.5). Network and/or speed is not the problem, it just takes long via GPRS. It is much faster via Wi-Fi.

dbus-send --type=method_call --dest=com.nokia.modest /com/nokia/modest com.nokia.modest.SendReceive


Set presence

dbus-send --type=method_call --print-reply --dest=org.freedesktop.Telepathy.MissionControl /org/freedesktop/Telepathy/MissionControl org.freedesktop.Telepathy.MissionControl.SetPresence uint32:2 string:"I'm here"


Media player

Open file in media player

dbus-send --dest=com.nokia.mediaplayer /com/nokia/mediaplayer com.nokia.mediaplayer.mime_open string:"file:///$1"


Pause what's currently playing

dbus-send --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.renderer.pause


Notifications

Send notification (orange one line popup)

dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"NOTIFICATION"


Send dialog notification (orange multi line popup requiring user interaction)

dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteDialog string:"QUESTION?" uint32:0 string:"OK"

Not sure what string "OK" does, but it is needed and can be anything.


Securing

Lock

dbus-send --system --type=method_call --dest=com.nokia.system_ui /com/nokia/system_ui/request com.nokia.system_ui.request.devlock_open string:"com.nokia.mce" string:"/com/nokia/mce/request" string:"com.nokia.mce.request" string:"devlock_callback" uint32:'3'


Unlock

dbus-send --system --type=method_call --dest=com.nokia.system_ui /com/nokia/system_ui/request com.nokia.system_ui.request.devlock_close string:"com.nokia.mce" string:"/com/nokia/mce/request" string:"com.nokia.mce.request" string:"devlock_callback" uint32:'0'


Lock screen and keys

dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_tklock_mode_change string:"locked"


Unlock screen and keys

dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_tklock_mode_change string:"unlocked"


Networking

Connect to specific saved connection

dbus-send --system --type=method_call --dest=com.nokia.icd /com/nokia/icd com.nokia.icd.connect string:"IAP_ID" uint32:0

IAP_ID is internet access point identifier and can be obtained with the following command:

gconftool -R /system/osso/connectivity/IAP

Find lines which matches /system/osso/connectivity/IAP/<IAP_ID>

For GPRS connections replace "@32@" with a space in IAP_ID string.

Keep in mind that phone has to be disconnected in order to connect via this call.


Disconnect internet

dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true


Connect (show change connection UI)

dbus-send --system --type=method_call --dest=com.nokia.icd_ui /com/nokia/icd_ui com.nokia.icd_ui.show_conn_dlg boolean:false

If "boolean:true" at the end, one-line notification saying "No saved connections available" appears. Maybe affects more than that?


Enable cellular radio

dbus-send --system --type=method_call --dest=com.nokia.phone.SSC /com/nokia/phone/SSC com.nokia.phone.SSC.set_radio boolean:true


Disable cellular radio

dbus-send --system --type=method_call --dest=com.nokia.phone.SSC /com/nokia/phone/SSC com.nokia.phone.SSC.set_radio boolean:false


Radio mode

2G

dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:1


3G

dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:2


Dual

dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:0


Open link in browser

dbus-send --system --type=method_call --dest=com.nokia.osso_browser /com/nokia/osso_browser/request com.nokia.osso_browser.load_url string:"google.com"


Reboot

dbus-send --system --type=method_call --print-reply --dest=com.nokia.mce "/com/nokia/mce/request" com.nokia.mce.request.req_reboot

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 "reboot" in root terminal.


Shutdown

dbus-send --system --type=method_call --print-reply --dest=com.nokia.mce "/com/nokia/mce/request" com.nokia.mce.request.req_shutdown

See warning at reboot dbus call (needs testing).


Show dashboard

dbus-send /com/nokia/hildon_desktop com.nokia.hildon_desktop.exit_app_view


Other

D-Bus Scripts

You can also use dbus-scripts to execute any command when various actions are triggered on D-Bus.


Panucci (pause)

dbus-send --type=method_call --dest=org.panucci.panucciInterface /panucciInterface org.panucci.panucciInterface.playPause


GConf

Reset GPRS data counter

gconftool-2 -u /system/osso/connectivity/network_type/GPRS/gprs_rx_bytes
gconftool-2 -u /system/osso/connectivity/network_type/GPRS/gprs_tx_bytes
gconftool-2 -s /system/osso/connectivity/network_type/GPRS/gprs_reset_time --type=string $(date +%s)


Command line

Enable FM Transmitter

/usr/bin/fmtx_client -p 1


Disable FM Transmitter

/usr/bin/fmtx_client -p 0


GStreamer

Shoot photo after 10 seconds

The camera application must be off for it to work. And of course the camera shutter must be open...

/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

Other way:

/bin/sleep 10; /usr/bin/gst-launch v4l2camsrc ! ffmpegcolorspace ! jpegenc ! identity error-after=1 ! filesink location=/home/user/MyDocs/DCIM/photo.jpg


Python

Make a phone call

 import dbus
 def place_call(number):
   bus = dbus.SystemBus()
   csd_call = dbus.Interface(bus.get_object('com.nokia.csd',
                                            '/com/nokia/csd/call'),
                                            'com.nokia.csd.Call')
   csd_call.CreateWith(str(number), dbus.UInt32(0))


Send dialog notification (orange multi line popup requiring user interaction)

 import dbus
 def show_notification_dialog(message, mode="single"):
   bus = dbus.SystemBus()
   iface = dbus.Interface(bus.get_object('org.freedesktop.Notifications',
                                         '/org/freedesktop/Notifications'),
                                         'org.freedesktop.Notifications')
   if mode == "single":
       iface.SystemNoteInfoprint(message)
   elif mode == "multiline":
       iface.SystemNoteDialog(str(message), dbus.UInt32(0), 'Ok')

This function allows you to show notification either with multiline (on maemo pre-5 it will show a dialog with an "Ok" button) or single line (tiny notifications hiding automatically).