×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Dec 2008
    Posts
    217

    GPRS fine but WLAN not ?

    hi all

    following code work on GPRS but not on WLAN , can you teach me ...

    thank you very much.

    void CClientEngine::SetupConnectionL()
    {
    if( iConnectionSetupDone )
    return;
    iConnectionSetupDone = ETrue;
    //open socket server and start the connection
    User::LeaveIfError(iSocketServ.Connect());
    User::LeaveIfError(iConnection.Open(iSocketServ));
    // open the IAP communications database
    CCommsDatabase* commDB = CCommsDatabase::NewL(EDatabaseTypeIAP);
    CleanupStack::PushL(commDB);
    // initialize a view
    CCommsDbConnectionPrefTableView* commDBView =
    commDB->OpenConnectionPrefTableInRankOrderLC(ECommDbConnectionDirectionUnknown);
    // go to the first record
    User::LeaveIfError(commDBView->GotoFirstRecord());
    // Declare a prefTableView Object.
    CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref pref;
    // read the connection preferences
    commDBView->ReadConnectionPreferenceL(pref);
    TUint32 iapID = pref.iBearer.iIapId;
    // pop and destroy the IAP View
    CleanupStack::PopAndDestroy(commDBView);
    // pop and destroy the database object
    CleanupStack::PopAndDestroy(commDB);
    // Now we have the iap Id. Use it to connect for the connection.
    // Create a connection preference variable.
    TCommDbConnPref connectPref;
    // setup preferences
    connectPref.SetDialogPreference(ECommDbDialogPrefDoNotPrompt);
    connectPref.SetDirection(ECommDbConnectionDirectionUnknown);
    connectPref.SetBearerSet(ECommDbBearerWLAN|ECommDbBearerGPRS);
    //Sets the CommDb ID of the IAP to use for this connection
    connectPref.SetIapId(iapID);
    User::LeaveIfError(iConnection.Start(connectPref));
    //set the sessions connection info
    RStringPool strPool = iSession.StringPool();
    RHTTPConnectionInfo connInfo = iSession.ConnectionInfo();
    //to use our socket server and connection
    connInfo.SetPropertyL ( strPool.StringF(HTTP::EHttpSocketServ,
    RHTTPSession::GetTable() ), THTTPHdrVal (iSocketServ.Handle()) );
    connInfo.SetPropertyL ( strPool.StringF(HTTP::EHttpSocketConnection,
    RHTTPSession::GetTable() ),
    THTTPHdrVal (REINTERPRET_CAST(TInt, &(iConnection))) );
    }

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,752

    Re: GPRS fine but WLAN not ?

    What happens?

  3. #3
    Regular Contributor
    Join Date
    Dec 2008
    Posts
    217

    Re: GPRS fine but WLAN not ?

    using GPRS , data post well...
    when using WLAN , app hold and data not post ...I

    does these code right? I real don't know.

Similar Threads

  1. how to check if WLAN IAP is available?
    By marcinkrol84 in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2007-07-12, 15:41
  2. Different between GPRS and WLAN
    By john_c_ye in forum Wired and Wireless interfaces (Closed)
    Replies: 4
    Last Post: 2007-06-09, 05:22
  3. Which type of phone's wlan and GPRS can work simultaneously?
    By bluesky17 in forum Wired and Wireless interfaces (Closed)
    Replies: 3
    Last Post: 2007-01-19, 12:09
  4. Download file using GPRS & WLAN on SDK 3.0
    By ronny60299 in forum Symbian
    Replies: 2
    Last Post: 2006-11-15, 02:18

Posting Permissions

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