[maemo-developers] Changing radio mode
From: Linus linus.wallgren at gmail.comDate: Sun Aug 8 23:08:04 EEST 2010
- Previous message: n900 debugging techniques
- Next message: Changing radio mode
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
I have been trying to change radio mode (to only use 2G/3G or both) via DBus
as a part of shepherd, my gsoc project. It works wonders when I use
dbus-send (taken from wiki.maemo.org/Phone_Control):
dbus-send --system --type=method_call
--dest=com.nokia.phone.net/com/nokia/phone/net
Phone.Net.set_selected_radio_access_technology byte:1
But when I try to implement the same method call in my program i get the
error:
Error:
"rpc.Error"
"can't find method Phone.Net::set_selected_radio_access_technology"
The code I use looks like this:
#include "cellular.h"
#include <QDBusConnection>
#include <QDBusMessage>
#include <QDebug>
Cellular::Cellular() : QObject() {
QList<QVariant> radioModeArguments;
radioModeArguments.append((unsigned char)1);
QDBusMessage message = QDBusMessage::createMethodCall("
com.nokia.phone.net", "/com/nokia/phone/net", "Phone.Net",
"set_selected_radio_access_technology");
message.setArguments(radioModeArguments);
QDBusMessage result = QDBusConnection::systemBus().call(message,
QDBus::Block);
qDebug() << "Error:";
qDebug() << result.errorName();
qDebug() << result.errorMessage();
QList<QVariant> resultArguments = result.arguments();
for (int i = 0; i < resultArguments.size(); ++i) {
qDebug() << resultArguments[i];
}
}
I have attached all the relevant files (header, .pro, main).
I'm completly lost to what the problem can be, do you have any ideas?
Best regards
Linus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.maemo.org/pipermail/maemo-developers/attachments/20100808/4658d717/attachment.htm>
- Previous message: n900 debugging techniques
- Next message: Changing radio mode
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
