×

Discussion Board

Results 1 to 11 of 11
  1. #1
    Registered User
    Join Date
    Oct 2009
    Posts
    95

    Question how to open internet connection table?

    hello everybody,
    i want to know how to open internet connection table in Maemo 5 ?

  2. #2
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: how to open internet connection table?

    Connectivity features are implemented with help of libconic library:
    http://wiki.maemo.org/Documentation/...for_Connection

  3. #3
    Registered User
    Join Date
    Oct 2009
    Posts
    95

    Re: how to open internet connection table?

    hi Daniil ;
    i used the following code to open the selection dialog but i got an error
    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();
    the error is:
    unsupported interface or method
    -----------------------------------
    note that this interface is included in the file "dbus_api.h"

    is this interface really unsupported?

  4. #4
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: how to open internet connection table?

    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?

  5. #5
    Registered User
    Join Date
    Oct 2009
    Posts
    95

    Re: how to open internet connection table?

    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
    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");
    but g_signal_connect seems does not work in Qt.
    what is the solution?

    2- i want to know the current status of the connection?

  6. #6
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: how to open internet connection table?

    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.

  7. #7
    Registered User
    Join Date
    Oct 2009
    Posts
    95

    Re: how to open internet connection table?

    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"?

  8. #8
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: how to open internet connection table?

    I put wrong method parameters originally, now they are correct.

  9. #9
    Registered User
    Join Date
    Oct 2009
    Posts
    95

    Re: how to open internet connection table?

    ok it works fine, but how can i test if the device is connected or not?

  10. #10
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: how to open internet connection table?

    If we are talking about icd2, then ICD_DBUS_API_CONNECT_SIG signal will be emitted, when connection will reach certain state.

  11. #11
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: how to open internet connection table?

    There is an article in wiki how to make conic work with Qt.
    http://wiki.forum.nokia.com/index.ph...ion_in_Maemo_5

Similar Threads

  1. Open C FAQ
    By Nokia Ron in forum Open C/C++
    Replies: 4
    Last Post: 2010-10-01, 09:02
  2. How to use my PCs connection to the internet to connect my mobile to the internet?
    By iamrohitbanga in forum General Development Questions
    Replies: 3
    Last Post: 2009-10-07, 19:14
  3. How to get the internet connection status
    By Jacky2009 in forum Symbian Networking & Messaging (Closed)
    Replies: 8
    Last Post: 2009-06-26, 10:02
  4. Select Internet Connection Types
    By yiannis_1978 in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2006-04-19, 14:44
  5. How to keep internet connection in 9210
    By roger_wang in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2002-07-18, 07:09

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×