Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-15981

Bearer API does not allow activation of mobile broadband connection

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.7.4
    • 4.7.0
    • None
    • Ubuntu 10.04. This is a desktop type application with a 3G modem attached via USB.
    • 49f019e (4.8) 660f752 (4.7)

    Description

      There is a well defined "mobile broadband" connection set up in the Network Manager applet. The applet can successfully start and stop this connection. The connection is enumerated by QNetworkConfigurationManager::updateConfigurations() and will successfully report state changes via the stateChanged() signal. However, creating a QNetworkSession on this configuration and calling open() does not activate the modem and initiate a connection.

      The first issue is that the activeConfig() for the session reports its state as Defined but not Discovered (even if the connection has been opened and closed via the Network Manager applet). This is in QNetworkSessionPrivateImpl::open(). This happens when the app is started and updateConfigurations() is called when the mobile broadband is disconnected. We need a method for turning on the modem and getting it to connect in this situation.

      If the app is run with the mobile broadband connected, the state of the configuration is Discovered, even if the connection is manually turned off after app startup. In this situation (app starts with connected, then the connection is closed), the next issue is in QNetworkManagerEngine::connectToId() where there is logic for getting the DBus path for wired and wireless devices, but not mobile broadband. The connectionType is "gsm". The call to interface->activateConnection() fails with the error:

      QDBusObjectPath: invalid path ""
      QDBusConnection: error: could not send message to service "org.freedesktop.NetworkManager" path "/org/freedesktop/NetworkManager" interface "org.freedesktop.NetworkManager" member "ActivateConnection": Marshalling failed: Invalid object path passed in arguments

      This can be replicated in the BearerMonitor example application. Start the mobile broadband connection. Start BearerMonitor. The connection will be bold (showing connected, active). Create a session on the mobile broadband connection. Stop the mobile broadband connection with Network Manager. BearerMonitor correctly shows the change in state. Click the "Open" button in the UI for the session and you will get the QDBus error above.

      Note that the "Stop" button works, shutting down the connection if it is active.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              lopotter Lorn Potter (closed Nokia identity) (Inactive)
              geraldhuff Gerald Huff
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes