×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Feb 2009
    Posts
    25

    Cannot get IAP 's QNetworkConfiguration by QNetworkConfigurationManager!

    I use the follow code to get the APN config

    QNetworkConfigurationManager manager;
    QList<QNetworkConfiguration> allConfigurations = manager.allConfigurations();

    while (!allConfigurations.isEmpty())
    {
    QNetworkConfiguration config = allConfigurations.takeFirst();

    if (config.type() == QNetworkConfiguration::ServiceNetwork)
    {
    foreach(QNetworkConfiguration i ,config.children() )
    {
    qDebug()<<"G" << i.identifier()<< "|"<< i.bearerName() <<"|";//<< i.name();
    }
    }
    else
    {
    qDebug()<< config.identifier() <<"|"<<config.bearerName()<<"|"<<config.name();
    }
    }
    the N900 console print

    IAP "联通GPRS连接互联网" network type is not set! Skipping it

    "0f31837c-c525-4c63-8bb2-5f28d7b8aa7a" | "WLAN" | "zhpublic"
    "4c0b5ace-264d-4d1f-9cb5-5f822d17fb13" | "WLAN" | "ADU"
    "8d73c291-7aeb-41e8-af59-acf4fd618460" | "WLAN" | "CMCC"
    "0000-0000-0000-0000" | "HSPA" | "MMS"
    The first line mean? I use the China unicom 's SIM card, according to n900 system network config ,it should be IAP "china unicom (in chinese) GPRS connect(in chinese)" .

    How to get this gprs 's identifer?

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

    Re: Cannot get IAP 's QNetworkConfiguration by QNetworkConfigurationManager!

    Did you resolve problems with proper code generation in Windows Nokia Qt SDK? Also you can rewrite your code like this:
    Code:
        QNetworkConfigurationManager manager;
        QList<QNetworkConfiguration> configurations = manager.allConfigurations();
        foreach(QNetworkConfiguration cfg, configurations) {
            qDebug() << "+" << cfg.identifier() << cfg.bearerName() << cfg.name();
            if (cfg.type() == QNetworkConfiguration::ServiceNetwork)
                foreach(QNetworkConfiguration subcfg ,cfg.children())
                    qDebug() << "++" << subcfg.identifier() << subcfg.bearerName() << subcfg.name();
        }

  3. #3
    Registered User
    Join Date
    Feb 2009
    Posts
    25

    Re: Cannot get IAP 's QNetworkConfiguration by QNetworkConfigurationManager!

    I use your code snippet into my app , got the same result , console print below:
    IAP "联通GPRS连接互联网" network type is not set! Skipping it

    + "0f31837c-c525-4c63-8bb2-5f28d7b8aa7a" "WLAN" "zhpublic"
    + "4c0b5ace-264d-4d1f-9cb5-5f822d17fb13" "WLAN" "ADU"

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

    Re: Cannot get IAP 's QNetworkConfiguration by QNetworkConfigurationManager!

    There was in principle nothing wrong with your code. Either you GPRS is not configured on the phone or you face the same problem Windows Nokia Qt SDK, which you were reporting earlier.

  5. #5
    Registered User
    Join Date
    Feb 2009
    Posts
    25

    Re: Cannot get IAP 's QNetworkConfiguration by QNetworkConfigurationManager!

    Ha , I can use this apn to surf the internet , so ,I think it must be the sdk 's flaw.

Similar Threads

  1. how to use QNetworkConfigurationManager to handle access point
    By khemant0411 in forum [Archived] Qt Mobility Project
    Replies: 4
    Last Post: 2010-06-30, 02:02
  2. How can I set QNetworkConfiguration::Type
    By zzcdyx in forum [Archived] Qt Mobility Project
    Replies: 1
    Last Post: 2010-04-30, 00:22
  3. How to Prompt the user for IAP selection only if the wrong IAP is currently selected
    By kaiser_20 in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2005-10-26, 15:19
  4. How to retrieve Iap id based on IAP name
    By jkekoni in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2005-08-05, 15:02

Posting Permissions

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