×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Super Contributor
    Join Date
    Sep 2009
    Posts
    732

    [moved] How to check my device is connected or not with wlan

    Hi,
    My app is sending data to http server using submitL.
    I want to check if wlan is connected on device or not if it is not connected i dont want to prompt if it is connected then i will send data to http server.
    How can i do that ?



    Thanks & Regards
    Amit Kumar Mangal

  2. #2
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    3,956

    Re: How to check my device is connected or not with wlan

    check RConnectionMonitor API

  3. #3
    Super Contributor
    Join Date
    Sep 2007
    Posts
    1,005

    Re: How to check my device is connected or not with wlan

    Quote Originally Posted by amit.mangal View Post
    Hi,
    My app is sending data to http server using submitL.
    I want to check if wlan is connected on device or not if it is not connected i dont want to prompt if it is connected then i will send data to http server.
    How can i do that ?



    Thanks & Regards
    Amit Kumar Mangal
    more exactly, u gotta use functions below

    monitor.GetConnectionCount(Count, aStatus);
    monitor.GetConnectionInfo( Count , aConnectionId , aSubconnectionCount );
    monitor.GetUintAttribute( Count , 0, KUplinkData, retorno, aStatus );

    in RConnectionMonitor class.

  4. #4
    Super Contributor
    Join Date
    Sep 2009
    Posts
    732

    Re: How to check my device is connected or not with wlan

    Oracle 3 using this can we check connection is active or not ?
    if connection is active then only i want to send the data i don wanna prompt to connect.if device is already connected to gprs or wlan then only i will send the data.


    Thanks & Regards
    Amit Kumar Mangal

  5. #5
    Super Contributor
    Join Date
    Sep 2007
    Posts
    1,005

    Re: How to check my device is connected or not with wlan

    Quote Originally Posted by amit.mangal View Post
    Oracle 3 using this can we check connection is active or not ?
    if connection is active then only i want to send the data i don wanna prompt to connect.if device is already connected to gprs or wlan then only i will send the data.


    Thanks & Regards
    Amit Kumar Mangal
    RConnection iConnect;
    RSocketServ iSocketServ;

    iSocketServ.Connect();
    iConnect.Open(iSocketServ);

    TBool connected = EFalse;
    TUint connectionCount;
    //Enumerate currently active connections across all socket servers
    User::LeaveIfError(iConnect.EnumerateConnections(connectionCount));

    if (connectionCount)
    {
    CLogFile::WriteFormat(_L("connection number: %d"),connectionCount );
    //CLogFile::WriteFormat(_L("has connection"));
    TPckgBuf<TConnectionInfoV2> connectionInfo;
    for (TUint i = 1; i <= connectionCount; ++i)
    {

    TInt err = iConnect.GetConnectionInfo(i, connectionInfo);

    if (err==KErrNone)
    CLogFile::WriteFormat(_L(" getinfo success"));
    else
    CLogFile::WriteFormat(_L("getinfo unsuccess"));


    TConnectionType connectiontype = connectionInfo().ConnectionType();

    // judge if the connectiontype is that u want.
    // if it do, send data.
    // if not, get connect.
    }

  6. #6
    Super Contributor
    Join Date
    Sep 2009
    Posts
    732

    Re: How to check my device is connected or not with wlan

    Thanks oracle 3 suppose if i want to check first any wlan connection is active or not if there is no wlan connection is active then i want to check gprs connection is active or not the nwhat willbe the procedure ?
    and one more query CLogFile in which location logs the file means where can i see this file.


    Thanks & Regards
    Amit Kumar Mangal

  7. #7
    Super Contributor
    Join Date
    Sep 2009
    Posts
    732

    Re: How to check my device is connected or not with wlan

    Hi,
    iConnect.Open(iSocketServ);
    this prompts how many wlan connection is available but i dont want to prompt if any wlan is connected then it should send data using that wlan if not connected it never prompts that which wlan you want use.I want to disable that dialog.

    Thanks & Regards
    Amit

  8. #8
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,355

    Re: How to check my device is connected or not with wlan

    As usual, the answer is already in the wiki: CS000825 - Using an already active connection
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

Similar Threads

  1. How to Check witht the Device
    By arunmdevan in forum Symbian
    Replies: 20
    Last Post: 2009-03-20, 10:01
  2. 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
  3. S60 2nd to 3rd/ PlatformSecurity / Capabilities
    By jarkoos in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 4
    Last Post: 2007-04-14, 14:08
  4. How to check if headset is connected?
    By Baginski in forum Symbian
    Replies: 0
    Last Post: 2006-09-08, 10:17
  5. Replies: 0
    Last Post: 2002-12-13, 07:33

Posting Permissions

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