[maemo-developers] Changing radio mode
From: Linus linus.wallgren at gmail.comDate: Sun Aug 8 23:10:31 EEST 2010
- Previous message: Changing radio mode
- Next message: Maemo Official Platform Bug Jar 2010.32
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Wops, forgot to attach the actual code :) 2010/8/8 Linus <linus.wallgren at gmail.com> > 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/97229529/attachment.htm> -------------- next part -------------- A non-text attachment was scrubbed... Name: mode.tar Type: application/x-tar Size: 10240 bytes Desc: not available URL: <http://lists.maemo.org/pipermail/maemo-developers/attachments/20100808/97229529/attachment.tar>
- Previous message: Changing radio mode
- Next message: Maemo Official Platform Bug Jar 2010.32
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]