Phone control

(dbus-send-show_conn)
(DBUS)
Line 1: Line 1:
{{Recommended phone usage}}
{{Recommended phone usage}}
-
=DBUS=
+
=D-Bus=
Here's a number of dbus examples that can be run as simple shell scripts. When running them they should be run with `run-standalone.sh` in front of them to set up the environment correctly. Otherwise they may barf when run from cron, startup, install scripts, etc. They run fine when run as user "user" without `run-standalone.sh`. Example:
Here's a number of dbus examples that can be run as simple shell scripts. When running them they should be run with `run-standalone.sh` in front of them to set up the environment correctly. Otherwise they may barf when run from cron, startup, install scripts, etc. They run fine when run as user "user" without `run-standalone.sh`. Example:
Line 8: Line 8:
Also note that "--print-reply" in dbus-send commands is usually not needed. It is, however, needed in "lock screen" command (add more).
Also note that "--print-reply" in dbus-send commands is usually not needed. It is, however, needed in "lock screen" command (add more).
-
===dbus-send-call===
+
===Make a phone call===
  dbus-send --system --dest=com.nokia.csd.Call --type=method_call --print-reply \
  dbus-send --system --dest=com.nokia.csd.Call --type=method_call --print-reply \
  /com/nokia/csd/call com.nokia.csd.Call.CreateWith string:"$1" uint32:0
  /com/nokia/csd/call com.nokia.csd.Call.CreateWith string:"$1" uint32:0
-
With this fantastic command you can make a fone 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:
+
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
  dbus-send-call 15555551234
-
====From Python :====
+
====Python:====
    
    
   import dbus
   import dbus
Line 25: Line 25:
     csd_call.CreateWith(str(number), dbus.UInt32(0))
     csd_call.CreateWith(str(number), dbus.UInt32(0))
-
===dbus-send-call-start-ui===
+
===Open Phone application===
  dbus-send --print-reply --type=method_call --dest=com.nokia.HildonDesktop.AppMgr /com/nokia/HildonDesktop/AppMgr com.nokia.HildonDesktop.AppMgr.LaunchApplication string:'rtcom-call-ui'
  dbus-send --print-reply --type=method_call --dest=com.nokia.HildonDesktop.AppMgr /com/nokia/HildonDesktop/AppMgr com.nokia.HildonDesktop.AppMgr.LaunchApplication string:'rtcom-call-ui'
-
===dbus-release-call===
+
===End current phone call===
  dbus-send --system --dest=com.nokia.csd.Call --print-reply \
  dbus-send --system --dest=com.nokia.csd.Call --print-reply \
Line 35: Line 35:
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.  
-
===dbus-send-activate-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
  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-deactivate-led===
+
===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
-
===dbus-send-email-new===
+
===New e-mail===
  dbus-send --print-reply --type=method_call --dest=com.nokia.modest /com/nokia/modest com.nokia.modest.MailTo string:mailto:
  dbus-send --print-reply --type=method_call --dest=com.nokia.modest /com/nokia/modest com.nokia.modest.MailTo string:mailto:
-
===dbus-send-email-tx-rx===
+
===Send and receive e-mail (doesn't work)===
-
Doesn't work
+
  dbus-send --session --type=method_call --dest=com.nokia.osso_email /com/nokia/osso_email com.nokia.osso_email.send_and_receive
  dbus-send --session --type=method_call --dest=com.nokia.osso_email /com/nokia/osso_email com.nokia.osso_email.send_and_receive
-
===dbus-send-get-imei===
+
===Get IMEI===
  dbus-send --system --print-reply --type=method_call --dest=com.nokia.phone.SIM /com/nokia/phone/SIM/security Phone.Sim.Security.get_imei
  dbus-send --system --print-reply --type=method_call --dest=com.nokia.phone.SIM /com/nokia/phone/SIM/security Phone.Sim.Security.get_imei
-
===dbus-send-google===
+
===Open link in browser===
  dbus-send --system --type=method_call --dest="com.nokia.osso_browser" --print-reply /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" --print-reply /com/nokia/osso_browser/request com.nokia.osso_browser.load_url string:"google.com"
-
 
-
===dbus-send-hello-world===
 
-
dbus-send --print-reply  \
 
-
--type=method_call --dest=org.freedesktop.Notifications  \
 
-
/org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteDialog  \
 
-
string:'Hello, world!' uint32:0 string:'NAO OK!'
 
===dbus-send-im-here===
===dbus-send-im-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"
  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-lock===
+
===Lock (secure) the device===
-
  dbus-send --print-reply --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 the device===
 +
  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-media-play===
===dbus-send-media-play===
  dbus-send --print-reply --dest=com.nokia.mediaplayer /com/nokia/mediaplayer com.nokia.mediaplayer.mime_open string:"file:///$1"
  dbus-send --print-reply --dest=com.nokia.mediaplayer /com/nokia/mediaplayer com.nokia.mediaplayer.mime_open string:"file:///$1"
-
===dbus-send-music-pause===
+
===Pause what's currently playing===
  dbus-send --dest=com.nokia.osso_media_server /com/nokia/osso_media_server com.nokia.osso_media_server.music.pause
  dbus-send --dest=com.nokia.osso_media_server /com/nokia/osso_media_server com.nokia.osso_media_server.music.pause
Line 75: Line 71:
  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
-
===dbus-send-notification===
+
===Send notification (orange one line popup)===
-
Usage:
+
  dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:'NOTIFICATION'
-
  dbus-send-notification "foo bar boo bah bang"
+
-
  dbus-send --print-reply  \
+
===Send dialog notification (orange multi line popup requiring user interaction)===
-
--type=method_call --dest=org.freedesktop.Notifications \
+
  dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteDialog string:"QUESTION?" uint32:0 string:'OK'
-
/org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteDialog \
+
-
string:"$1" uint32:0 string:'NAO OK!'
+
-
====From Python :====
+
Not sure what string "OK" does, but it is needed and can be anything.
 +
 
 +
====Python:====
    
    
   import dbus
   import dbus
Line 102: Line 97:
  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
-
===dbus-send-reboot===
+
===Reboot===
  dbus-send --system --type=method_call --dest="com.nokia.mce" --print-reply "/com/nokia/mce/request" com.nokia.mce.request.req_reboot
  dbus-send --system --type=method_call --dest="com.nokia.mce" --print-reply "/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 file system synchronization, etc.). Better command is to simply enter "reboot" in terminal.
===dbus-send-regist-status===
===dbus-send-regist-status===
  dbus-send --system --print-reply --type=method_call --dest='com.nokia.phone.net' /com/nokia/phone/net Phone.Net.get_registration_status
  dbus-send --system --print-reply --type=method_call --dest='com.nokia.phone.net' /com/nokia/phone/net Phone.Net.get_registration_status
-
===dbus-send-show_conn===
+
===Connect (show change connection UI)===
  dbus-send --print-reply --system --dest=com.nokia.icd_ui /com/nokia/icd_ui com.nokia.icd_ui.show_conn_dlg boolean:false
  dbus-send --print-reply --system --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?
If "boolean:true" at the end, one-line notification saying "No saved connections available" appears. Maybe affects more than that?
-
===dbus-send-shutdown===
+
===Shutdown===
  dbus-send --system --type=method_call --dest="com.nokia.mce" --print-reply "/com/nokia/mce/request" com.nokia.mce.request.req_shutdown
  dbus-send --system --type=method_call --dest="com.nokia.mce" --print-reply "/com/nokia/mce/request" com.nokia.mce.request.req_shutdown
 +
See warning at reboot dbus call (needs testing).
-
===dbus-send-speaker-off===
+
===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
-
===dbus-send-speaker-on===
+
===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
-
===dbus-send-task-switcher===
+
===Show dashboard===
  dbus-send --type=signal --session /com/nokia/hildon_desktop com.nokia.hildon_desktop.exit_app_view
  dbus-send --type=signal --session /com/nokia/hildon_desktop com.nokia.hildon_desktop.exit_app_view
 +
 +
===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
 +
 +
or
 +
 +
dbus-send --print-reply --system --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
 +
 
 +
or
-
===Unlock secured phone===
+
  dbus-send --print-reply --system --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_tklock_mode_change string:unlocked
-
  dbus-send --print-reply --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'
+
===Connect to specific saved connection===
===Connect to specific saved connection===
  dbus-send --type=method_call --system --dest=com.nokia.icd /com/nokia/icd com.nokia.icd.connect string:IAP_ID uint32:0
  dbus-send --type=method_call --system --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 :
+
IAP_ID is internet access point identifier and can be obtained with the following command:
-
  gconftool -R /system/osso/connectivity/IAP
+
gconftool -R /system/osso/connectivity/IAP
Find lines which matches /system/osso/connectivity/IAP/<IAP_ID>
Find lines which matches /system/osso/connectivity/IAP/<IAP_ID>
Line 144: Line 149:
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.
-
===dbus-send-disconnect-net===
+
===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
===Set phone radio mode===
===Set phone radio mode===
-
 
  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
byte: 0=Dual, 1=2G, 2=3G
byte: 0=Dual, 1=2G, 2=3G
 +
 +
===Set profiles===
 +
dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:"general"
 +
 +
Change "general" to "silent" if needed.
 +
 +
===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
 +
 +
 +
=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)
[[Category:Development]]
[[Category:Development]]

Revision as of 18:47, 7 March 2010

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


Contents

D-Bus

Here's a number of dbus examples that can be run as simple shell scripts. When running them they should be run with `run-standalone.sh` in front of them to set up the environment correctly. Otherwise they may barf when run from cron, startup, install scripts, etc. They run fine when run as user "user" without `run-standalone.sh`. Example:

run-standalone.sh dbus-send /foo bar 'boo'

Also note that "--print-reply" in dbus-send commands is usually not needed. It is, however, needed in "lock screen" command (add more).

Make a phone call

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

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

Python:

 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))

Open Phone application

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

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.

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

New e-mail

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

Send and receive e-mail (doesn't work)

dbus-send --session --type=method_call --dest=com.nokia.osso_email /com/nokia/osso_email com.nokia.osso_email.send_and_receive

Get IMEI

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

Open link in browser

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

dbus-send-im-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"

Lock (secure) the device

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 the device

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-media-play

dbus-send --print-reply --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.osso_media_server /com/nokia/osso_media_server com.nokia.osso_media_server.music.pause

N900

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

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.

Python:

 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).

dbus-send-pause-panucci

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

Reboot

dbus-send --system --type=method_call --dest="com.nokia.mce" --print-reply "/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 file system synchronization, etc.). Better command is to simply enter "reboot" in terminal.

dbus-send-regist-status

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

Connect (show change connection UI)

dbus-send --print-reply --system --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?

Shutdown

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

See warning at reboot dbus call (needs testing).

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

Show dashboard

dbus-send --type=signal --session /com/nokia/hildon_desktop com.nokia.hildon_desktop.exit_app_view

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

or

dbus-send --print-reply --system --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

or

dbus-send --print-reply --system --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_tklock_mode_change string:unlocked

Connect to specific saved connection

dbus-send --type=method_call --system --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>

If <IAP_ID> is a string (for GPRS connections as example, use double quotes in the command and replace @32@ by a space)

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

Set phone radio mode

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

byte: 0=Dual, 1=2G, 2=3G

Set profiles

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

Change "general" to "silent" if needed.

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


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)