Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor nawkboy's Avatar
    Join Date
    Mar 2003
    Posts
    54
    ENVIRONMENT:
    I am running the Series 60 SDK version 6.1 distributed by Nokia on Windows
    XP Pro.
    ===========================================
    PROBLEM:

    The following code snipt is running within the RunTestsL() method of the
    Testframe example (simple client code acting as a unit test framework).

    When I run the sockets example I have no problems connecting to the internet
    although I am prompted with a dialogue asking me to pick which access point
    I would like, "NT RAS" or "Linux RAS".

    When I run the code below, the emulator fails to get past the access point
    selection dialgoue. It simply hangs with the access point dialogue still
    displayed even after I attempt to make a selection. (I do notice a small
    amount of data transfer in m-Router Lite's window once I click on "NT RAS"
    in the access point dialogue.)
    Furthermore, the socket engine iStatus is never signaled, rather my test
    utility method waiting on iStatus times out.

    Can anyone provide guidance?
    =============================================
    MY LIMITED DIAGNOSIS:

    I suspect my problem somehow relates to a piece of framework code that never
    has an opportunity to completely process the access point dialogue
    selection.

    I am yet to try modifying the test code to create a separate thread before
    invoking the socketEngine. The testframe code contains no active objects
    and creates no threads of its own.

    I wonder if somehow eliminating the need for the access point dialogue would
    make the problem go away. I have another post asking how to remove "Linux
    RAS" from the comms database since my attempts so far have failed.

    =============================================
    CODE SNIPT:

    CTestUINotifier* testNotifier = CTestUINotifier::NewLC();
    CSocketsEngine* socketsEngine = CSocketsEngine::NewL(*testNotifier); //Need
    to pass something implementing MUINotifer interface

    //_LIT(KServerName, "www.yahoo.com"
    _LIT(KServerName, "66.218.71.89"
    socketsEngine->SetServerName(KServerName);
    socketsEngine->SetPort(80);
    socketsEngine->ConnectL();

    TTimeIntervalMicroSeconds32 waitTime = TTimeIntervalMicroSeconds32(1000000
    * 30);
    TInt count = 0;
    const TInt maxCount = 40;

    TimedWaitStatus waitStatus;

    waitStatus = CTestExecutor::TimedWaitForRequest(socketsEngine->iStatus,
    waitTime); //It is during this waiting that the access point dialogue and
    the activity in m-Router Lite is seen.

    //waitStatus is returning with a value of KRequestTimedOut

    _LIT8(KTestSendData, "GET /\n"
    socketsEngine->WriteL(KTestSendData);

    socketsEngine->Disconnect();

    CleanupStack::PopAndDestroy(testNotifier);
    CleanupStack::PopAndDestroy(socketsEngine);
    =============================================
    DEFINITION OF UTILITY METHOD SEEN USED ABOVE {just a fancy
    User::WaitForRequest(TRequestStatus)}:

    CTestExecutor::TimedWaitStatus CTestExecutor::TimedWaitForRequest(
    TRequestStatus statusToWatch,
    TTimeIntervalMicroSeconds32 microSecondsToWait)
    {
    RTimer timer;
    TRequestStatus timerStatus;
    timer.CreateLocal();
    timer.After(timerStatus, microSecondsToWait);

    User::WaitForRequest(statusToWatch, timerStatus);
    if (timerStatus != KRequestPending)
    {
    //timed out
    return KRequestTimedOut;
    }
    else if (statusToWatch != KRequestPending)
    {
    //all went well
    timer.Cancel();
    return KRequestOccurred;
    }
    else
    {
    //stray signal
    _LIT(KMsgStraySignal, "Stray signal\n"
    User::Panic(KMsgStraySignal, 1);
    return KStraySignal;
    }

    }


    =============================================
    THANKS:

    Thank you for your time and energy. Any help would be appreciated. Feel
    free to contact me by email or by AOL instant messenger.

    Sincerely,
    James Carpenter
    nawkboy@yahoo.com
    AOL IM: nawkboyrules

  2. #2
    Nokia Developer Expert vphong's Avatar
    Join Date
    Mar 2003
    Posts
    271
    Hi,

    The Series 60 SDK V1.0 for Symbian OS does not support Windows XP. It might work somehow but unexpected problems could be rised at anytime anywhere in that working environment.

    Regards,
    FN Developer Support

  3. #3
    Regular Contributor mark_williams's Avatar
    Join Date
    Mar 2003
    Posts
    59
    I suspect it may be to do with the way you are using active objects. You shouldn't be calling User::WaitForRequest() on the iStatus of the socket engine (or any other active object). After calling the ConnectL() any further processing should be done in the socket engine RunL() method.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved