View Single Post
EmaNymton's Avatar
Posts: 141 | Thanked: 267 times | Joined on May 2010 @ Germany
#48
Not a full answer to your question but maybe a first step in the right direction but I'm short of time.

First try with mce:
With
Code:
dbus-send --system --dest=com.nokia.mce --print-reply /com/nokia/mce/request com.nokia.mce.request.req_radio_states_change uint32:0 uint32:1
you can set the device into flightmode. First argument is for states, second for mask, but I don't know how to differentiate between wlan and cellular (1 stands for master e.g. deactive all, I think)
With
Code:
dbus-send --system --dest=com.nokia.mce --print-reply /com/nokia/mce/request com.nokia.mce.request.req_radio_states_change uint32:1 uint32:1
you disable filght mode.

Second try with connman:
use qdbus to get information:
Code:
/usr/lib/qt5/bin/qdbus --system --literal net.connman
/
/net
/net/connman
/net/connman/service
/net/connman/service
/net/connman/technology
/net/connman/technology/bluetooth
/net/connman/technology/cellular
/net/connman/technology/wifi
and to get available methods
Code:
/usr/lib/qt5/bin/qdbus --system --literal net.connman  /net/connman/technology/wifi
method QString org.freedesktop.DBus.Introspectable.Introspect()
signal void net.connman.Technology.PropertyChanged(QString name, QDBusVariant value)
method QVariantMap net.connman.Technology.GetProperties()
method void net.connman.Technology.Scan()
method void net.connman.Technology.SetProperty(QString name, QDBusVariant value)
I tried setting cellular "Powered" to false with
Code:
dbus-send --system --type=method_call --print-reply --dest=net.connman /net/connman/technology/cellular net.connman.Technology.SetProperty string:"Powered" variant:boolean:false
but the device is set to flightmode instead, so wifi is disabled too.

I hope you can solve your problem, please share your answer!


Edit:
Third try
What about
Code:
[nemo@localhost ~]$ mcetool --enable-radio=cellular
[nemo@localhost ~]$ mcetool --disable-radio=cellular
?

Last edited by EmaNymton; 2014-03-05 at 12:43.
 

The Following User Says Thank You to EmaNymton For This Useful Post: