×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Regular Contributor
    Join Date
    Dec 2010
    Posts
    79

    Symbian connection problem

    Hi,
    I have an application that call a web service to hold user data.
    On the simulator the application works perfectly, but on device i retrieve Network transport error (3): Host not found.
    Which is the problem?

    And why i need to have "nokia web application" opened to connect to web service with my application?
    If i don't open nokia web application my 3g connection doesn't work. Why not?

    thanks
    Last edited by giu_sca; 2011-02-03 at 15:51.

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167

    Re: Symbian connection problem

    have you checked the mobility Beared API (or with 4.7.1 its already under network module). You should open the connection before trying to utilize APIs that need connection. Also make sure you are not getting stuck on the firewall. Your emulator is basically most likely located inside the network where your server is, and once using mobile, you are coming into the server from the outside network.

  3. #3
    Regular Contributor
    Join Date
    Dec 2010
    Posts
    79

    Re: Symbian connection problem

    hi,
    i use nokia qt 4.7.1 but i also have included bearer api in my .pro file

    MOBILITY = bearer location systeminfo

    I have developer the same application for iPhone and Android. I have tested both device with wireless and 3g connection but i don't retrieve error.
    I have used the same gsm card for both device.

    Only for symbian device i retrieve this error and i don't know why.

    However, i use this code to verify if the internet connection is estabilished

    bool common::checkConnection(){
    QNetworkConfigurationManager mgr;
    QList<QNetworkConfiguration> activeConfigs = mgr.allConfigurations(QNetworkConfiguration::Active);
    if (activeConfigs.count() > 0)
    //qDebug()<<mgr.isOnline();
    return true;
    else
    //qDebug()<<mgr.isOnline();
    return false;
    }

    the function return true.

    QtMessageResponse return Network transport error (3): Host not found.

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

    Re: Symbian connection problem

    In Qt 4.7 Qt Mobility Bearer API conflicts with QtNetwork. Do not declare bearer in project file unless you are using >= Qt 4.6

  5. #5
    Regular Contributor
    Join Date
    Dec 2010
    Posts
    79

    Re: Symbian connection problem

    I use 4.7.1 and I have deleted bearer declaretion in my .pro file but when I try to use QNetworkConfigurationManager i retrieve some error.
    I can't use the code that I have wrote below to verify internet connection.

    The error return illegal reference and QNetworkConfigurationManager was not declared in this scope

    I have added in .pro file

    //qt mobility
    #include <QNetworkConfigurationManager>
    #include <QNetworkAccessManager>
    #include <qmobilityglobal.h>
    #include <qnetworkconfiguration.h>

    QTM_BEGIN_NAMESPACE
    class QNetworkConfigurationManager;
    QTM_END_NAMESPACE

    QTM_USE_NAMESPACE

    this code to use QNetworkConfigurationManager class

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

    Re: Symbian connection problem

    Do you have
    QT += network
    in project file?
    Are you sure you are compiling against 4.7? Check QT_VERSION_STR define.
    You don't need forward declaration of the class.
    Last edited by divanov; 2011-02-04 at 14:00. Reason: yes, it's QT, not CONFIG

  7. #7
    Regular Contributor
    Join Date
    Dec 2010
    Posts
    79

    Re: Symbian connection problem

    no, in config i have mobility.

    I have QtCreator 2.0.1 based on qt 4.7.0 (32 bit)

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

    Re: Symbian connection problem

    Quote Originally Posted by giu_sca View Post
    no, in config i have mobility
    You should have there at least gui and network in case you have UI and use network.

    Quote Originally Posted by giu_sca View Post
    I have QtCreator 2.0.1 based on qt 4.7.0 (32 bit)
    This is version of Qt Qt Creator was compiled with. It has no connection to libraries you are building your application against.

  9. #9
    Regular Contributor
    Join Date
    Dec 2010
    Posts
    79

    Re: Symbian connection problem

    sorry, but i am nervous. Qt environment is very hard to understand and I have a problem for each kind operation that I want to do.
    However, in my pro file i have this declaretion

    QT += core gui network
    CONFIG += mobility
    MOBILITY = location systeminfo and also bearer but you said me to delete bearer

    I have deleted bearer declaretion and now I can't use QNetworkConfigurationManager in my code

    this is the error

    undefined reference to QtMobility::QNetworkConfigurationManager::QNetworkConfigurationManager(QObject *)
    undefined reference to QtMobility::QNetworkConfigurationManager::allConfiguration(QFlags<QtMobility::QNetworkConfiguration::stateflag>) const
    undefined reference to QtMobility::QNetworkConfiguration::~QNetworkConfiguration()


    which is the problem? I'm going to crazy

  10. #10
    Regular Contributor
    Join Date
    Dec 2010
    Posts
    79

    Re: Symbian connection problem

    QT_VERSION_STR = 4.7.0

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

    Re: Symbian connection problem

    Sorry, my bad, I've mixed QT and CONFIG variables.
    The question is why linker believes QNetworkConfigurationManager is under QtMobility namespace?
    Did you check output of
    qDebug() << QT_VERSION_STR;
    Make small application without network and run it to print Qt version.

    Ok, it's 4.7.0 then did you remove

    QTM_BEGIN_NAMESPACE
    class QNetworkConfigurationManager;
    QTM_END_NAMESPACE

    from your code?

  12. #12
    Regular Contributor
    Join Date
    Dec 2010
    Posts
    79

    Re: Symbian connection problem

    So, QT_VERSION_STR is 4.7.0

    I have deleted bearer in mobility tag and

    QTM_BEGIN_NAMESPACE
    class QNetworkConfigurationManager;
    QTM_END_NAMESPACE

    QTM_USE_NAMESPACE

    in my header file.

    In cpp file I retrieve error when I use QNetworkConfigurationManager.

    If I wrote
    QNetworkConfigurationManager *mgr = new QNetworkConfigurationManager();
    and if I wrote
    QNetworkConfigurationManager mgr;

    I got mgr was not declared in this scope.
    Is it a bug?

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

    Re: Symbian connection problem

    Could you share some sample project demonstrating the problem? Did you try to compile any network examples comping with SDK?

  14. #14
    Regular Contributor
    Join Date
    Dec 2010
    Posts
    79

    Re: Symbian connection problem

    where can I share sample project?

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

    Re: Symbian connection problem

    I normally use mediafire.com, but discussion board supports attachments as well.

Similar Threads

  1. http connection & File Connection where The problem?
    By hussam9_96 in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2011-01-10, 09:16
  2. Symbian V2 HTTP connection problem with WAP+Proxy
    By kobi.toueg in forum Mobile Java Networking & Messaging & Security
    Replies: 5
    Last Post: 2008-12-19, 01:25
  3. Replies: 5
    Last Post: 2008-10-22, 08:59
  4. Java TCP server, Symbian Client connection problem
    By ufepuf in forum Symbian Networking & Messaging (Closed)
    Replies: 9
    Last Post: 2008-02-23, 19:14

Posting Permissions

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