hello everybody,
i want to know how to open internet connection table in Maemo 5 ?
hello everybody,
i want to know how to open internet connection table in Maemo 5 ?
Connectivity features are implemented with help of libconic library:
http://wiki.maemo.org/Documentation/...for_Connection
hi Daniil ;
i used the following code to open the selection dialog but i got an error
the error is:api_interface = new QDBusInterface(ICD_DBUS_API_INTERFACE, ICD_DBUS_API_PATH,
ICD_DBUS_API_INTERFACE, connection2);
api_interface->call(ICD_DBUS_API_SELECT_REQ,ICD_CONNECTION_FLAG_APPLICATION_EVENT);
QDBusError err = api_interface->lastError();
qDebug()<<err.message();
unsupported interface or method
-----------------------------------
note that this interface is included in the file "dbus_api.h"
is this interface really unsupported?
1. You should not use ICD2 it's internal API. Use libconic istead.
2. You should use ICD_DBUS_API_CONNECT_REQ instead of ICD_DBUS_API_SELECT_REQ.
3. Are you using system bus?
yes i am using system dbus .
i listened to your advise which says that i should use libconic and i used it , but i faced some problems.
1- how can i g_signal_connect to connection events ?
i used the following code to connect and used g_signal_connect to know if the internet connected or not
but g_signal_connect seems does not work in Qt.bool success = false;
/* Create connection object */
ConIcConnection *netConnection = con_ic_connection_new();
/* Connect signal to receive connection events */
g_signal_connect(G_OBJECT(netConnection), "connection-event", G_CALLBACK(connectionHandler), NULL);
/* Request connection and check for the result */
success = con_ic_connection_connect(netConnection, CON_IC_CONNECT_FLAG_NONE);
if (!success) qDebug("Request for connection failed");
what is the solution?
2- i want to know the current status of the connection?
If you are using system bus, then icd2 should work for you. Verify with dbus-send in Xterm:
Code:dbus-send --system --type=method_call --print-reply \ --dest=com.nokia.icd2 \ /com/nokia/icd2 \ com.nokia.icd2.connect_req \ uint32:1
Last edited by divanov; 2010-02-03 at 09:52.
i wrote this command on the N900 but i got the following message:
Error org.freedesktop.DBus.Error.NotSupported: Unsupported interface or method
how can i use g_signal_connect if i know that i will use libconic signal "connection-event"?
I put wrong method parameters originally, now they are correct.
ok it works fine, but how can i test if the device is connected or not?
If we are talking about icd2, then ICD_DBUS_API_CONNECT_SIG signal will be emitted, when connection will reach certain state.
There is an article in wiki how to make conic work with Qt.
http://wiki.forum.nokia.com/index.ph...ion_in_Maemo_5