View Single Post
Posts: 33 | Thanked: 32 times | Joined on Nov 2007 @ Finland
#50
Originally Posted by EmaNymton View Post
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.
You can go to flight mode via connman like this
Code:
dbus-send --system --type=method_call --print-reply --dest=net.connman / net.connman.Manager.SetProperty string:"OfflineMode" variant:boolean:true
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.
This is the correct way, only cellular should be disabled now. If it does not, then that is a bug.

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
?
There seems to be some co-operation issues with mce and connman. ConnMan expects to control the technologies (like radios) in the system. If MCE is also trying to tweak those technologies at the same time, then there might be some issues. ConnMan also honors the rfkill events, so you should be able to get the same result by running rfkill command (not found in the device by default thou) and disabling the cellular modem.
 

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