×

Discussion Board

Results 1 to 12 of 12
  1. #1
    Registered User
    Join Date
    Jun 2010
    Location
    UK
    Posts
    73

    Network access no longer working?

    I recently had a problem where network access no longer seems to work. I tried reinstalling the Qt SDK 1.01, and then tested with the "network/http" example provided. To the project file, I added:

    symbian {
    TARGET.CAPABILITY += NetworkServices
    }

    (Not sure why that isn't there as standard, but anyway.)

    On Simulator, it works fine - I click Download, I then get a warning about an SSL error, I click ignore, then I get "Downloaded to current directory." And indeed, the file is there in the directory.

    On my Nokia 5800, I click Download, and it just hangs (the Download button greys out, but it never downloads the file). A file is created, but it's empty.

    Whilst investigating a similar problem on my own application, Wifi Remote Play, I found that when calling the get() method of QNetworkAccessManager, it never returns the finished() signal. My program also has problems using a more basic QTcpSocket.

    But here's the thing - I know my code works, or at least did work, because my application worked fine some months ago. But now something's happened (presumably firmware updates, which I've downloaded) that's caused it to stop working. My phone has firmware V50.0.005.

    If you like, you can test my application yourself at http://homepage.ntlworld.com/mark.ha...emoteplay.html .

    I did wonder if the problem was due to this bug: http://bugreports.qt.nokia.com/browse/QTBUG-13098 . This describes a problem due to upgrading Ovi Maps to 3.04 (I have 3.03). However, the comments claim that it only affects Qt 4.7, not 4.6.3. As far as I can tell, I'm using 4.6.3 (that's what I thought Symbian Qt is currently officially only supporting, and it's the version on my phone) - although it's a bit unclear, as QtCreator Help->About claims it's based on 4.7.0.

    Any ideas? I also note that there are other posts about networking in this forum (e.g., http://discussion.forum.nokia.com/fo...d-post-problem , http://discussion.forum.nokia.com/fo...-http-requests , http://discussion.forum.nokia.com/fo...work-in-mobile ) - it's unclear if these are the same problem, or red herrings here.

    Is anyone else having this problem? Anyone who can get the http example, or my Wifi Remote Play, to work? What firmware/Ovi Maps/Qt versions do you have?

  2. #2
    Registered User
    Join Date
    Jun 2010
    Location
    Athens, Greece
    Posts
    65

    Re: Network access no longer working?

    I'm facing a quite similar problem... http://discussion.forum.nokia.com/fo...efused-problem
    but the connection fails only sometimes not always... I tested it on 2 deferent networks (Vodafone, Wind). On connection manager, there is an idle connection, and stringError() returns "Connection refused" problem, but check my servers log and never received any hit.

  3. #3
    Super Contributor
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,326

    Re: Network access no longer working?

    Save version of Qt mobility should be installed..

    Also link bearer Qt mobility to the project

    CONFIG += mobility
    MOBILITY = bearer
    Also see this signing procedure here discussed : http://discussion.forum.nokia.com/fo...ymbian-Signing

    Best regards,

  4. #4
    Registered User
    Join Date
    Jun 2010
    Location
    Athens, Greece
    Posts
    65

    Re: Network access no longer working?

    I still facing the problem after the add of MOBILITY += bearer sometimes connect other refuse.

  5. #5
    Registered User
    Join Date
    Jun 2010
    Location
    UK
    Posts
    73

    Re: Network access no longer working?

    Quote Originally Posted by rahulvala View Post
    CONFIG += mobility
    MOBILITY = bearer
    I added those lines to the http project file, but unfortunately it still doesn't work.

    Incidentally, one piece of information I forgot - normally my phone is set to ask me everytime it wants a network connection (to select Wifi/PAYG/whatever), and my Qt applications used to do this. But now they don't get that far.

    Also see this signing procedure here discussed : http://discussion.forum.nokia.com/fo...ymbian-Signing
    I'm not sure which signing procedure - the link given there to http://blogs.forum.nokia.com/blog/lu...symbian-signed doesn't work (redirects)?

    I thought that self-signed ("untrusted") apps could still access Network capability? And certainly this was the case a few months ago. I know that it was planned that Symbian signing could one day be done for free, is that available yet?

    Edit: http://developer.symbian.org/wiki/in...Symbian_Signed) claims that NetworkServices can be used with Self-Signed (with user confirmation on install, which I get).

  6. #6
    Super Contributor
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,326

  7. #7
    Registered User
    Join Date
    Jun 2010
    Location
    UK
    Posts
    73

    Re: Network access no longer working?

    Thanks for the links. For the 2nd and 3rd, I'm not sure I see a difference between that and what the http example does?

    Before I look into using Bearer Management - can *anyone* get the http example working on their Symbian phones? I mean, this isn't an issue with my code, I see the same problem with the standard Qt example, so I'd be curious to know if it either does work or doesn't work for other people. Thanks.

  8. #8
    Registered User
    Join Date
    Jun 2010
    Location
    UK
    Posts
    73

    Re: Network access no longer working?

    QWebView seems to have a similar problem - e.g., I tried the example webkit/fancybrowser, and it works fine in Simulator, but fails to load anything on my Nokia 5800 (again, I manually added the NetworkServices capability). In my application Wifi Remote Play, I have a QWebView that used to work fine when loading a webpage over a network, but now doesn't display anything.

  9. #9
    Registered User
    Join Date
    Jun 2010
    Location
    UK
    Posts
    73

    Re: Network access no longer working?

    Okay, I knocked up my own quick example for QWebView to demonstrate the issue.

    Start up a new Mobile Qt Application, specify class MainWindow derived from QMainWindow, untick "Generate Form". Then the main.cpp is as follows:
    Code:
    #include <QtGui>
    #include <QtWebKit/QWebView>
    
    #include "mainwindow.h"
    
    int main(int argc, char *argv[])
    {
        QApplication a(argc, argv);
        MainWindow w;
    #if defined(Q_WS_S60)
        w.showMaximized();
    #else
        w.show();
    #endif
    
        QWebView *webView = new QWebView();
        w.setCentralWidget(webView);
        webView->setUrl(QUrl("http://www.google.com"));
        return a.exec();
    }
    The project file is:

    Code:
    #-------------------------------------------------
    #
    # Project created by QtCreator 2010-09-30T23:21:25
    #
    #-------------------------------------------------
    
    QT       += core gui
    QT += webkit
    
    TARGET = testwebview
    TEMPLATE = app
    
    SOURCES += main.cpp\
            mainwindow.cpp
    
    HEADERS  += mainwindow.h
    
    CONFIG += mobility
    MOBILITY = 
    
    symbian {
        TARGET.UID3 = 0xef886a2d
        # TARGET.CAPABILITY += 
        TARGET.CAPABILITY += NetworkServices
        TARGET.EPOCSTACKSIZE = 0x14000
        TARGET.EPOCHEAPSIZE = 0x020000 0x800000
    }
    With files mainwindow.cpp and mainwindow.h left as they are.

    It works fine on the Simulator, but not on my Nokia 5800. I just get a blank white screen, and I don't even get prompted that the application wants needs Internet access.

    I then did a test with a local file - I added a file test.html to a resource, then changed main.cpp to:

    Code:
        //webView->setUrl(QUrl("http://www.google.com"));
        webView->load(QUrl("qrc:/test.html"));
    And it works fine both on Simulator and my phone.

    So any ideas of the problem? Does this work or not work for you? Thanks.

  10. #10
    Nokia Developer Champion
    Join Date
    Sep 2007
    Location
    Bhavnagar
    Posts
    928

    Re: Network access no longer working?

    Hi mdwh,

    I had tested your code and it works fine without any modification. Tested it on N97. Application prompt for the internet connection and loads the url.

    I just want to know if your phone has a working internet connection?
    Jajal Mehul

  11. #11
    Registered User
    Join Date
    Jun 2010
    Location
    UK
    Posts
    73

    Re: Network access no longer working?

    Quote Originally Posted by james1980 View Post
    Hi mdwh,

    I had tested your code and it works fine without any modification. Tested it on N97. Application prompt for the internet connection and loads the url.

    I just want to know if your phone has a working internet connection?
    Thanks, that's useful to know. My phone's Internet connection works fine with non-Qt applications (both over phone network, and wifi).

    ETA: Ah, if I manually connect to a wireless network first (through settings->connectivity), it works fine!
    Last edited by mdwh; 2010-10-01 at 13:20.

  12. #12
    Registered User
    Join Date
    Jun 2010
    Location
    UK
    Posts
    73

    Re: Network access no longer working?

    Ah, fixed the problem. My phone's default connection setting seems to have got messed up, in settings->connectivity->destinations - although the menu setting showed it was "Always Ask", at the top, it was listing a wireless network I'd used recently, but no longer in range.

    Seems odd that this was seemingly only affecting Qt apps and not my other apps, but changing the setting to something else, then back to Always Ask, seems to have fixed the problem.

    Thanks for your replies, it helped to know that the problem wasn't with the code.

Similar Threads

  1. Organizing source - .pro in-place editor no longer working...
    By rickbsgu in forum [Archived] Qt SDKs and Tools
    Replies: 2
    Last Post: 2010-02-27, 02:24
  2. Access point Pop-up when MIDP Apps access Network
    By pushpradhan in forum Mobile Java General
    Replies: 4
    Last Post: 2009-12-11, 17:44
  3. No longer Mobile Device Specifications Database Access ?
    By KanedaFr in forum Feedback - Nokia Developer Services & Infrastructure
    Replies: 2
    Last Post: 2009-07-27, 11:23
  4. S60 Emulator taking longer to load and Access than Android Emulator
    By mayurvihaar in forum Tools and SDK Feedback (Closed)
    Replies: 0
    Last Post: 2009-01-24, 14:01
  5. Working with network signals
    By islamfunny in forum Mobile Java Tools & SDKs
    Replies: 2
    Last Post: 2008-09-28, 20:21

Posting Permissions

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