Join Now
Quality Rating:
  • Currently 3.0 / 5
(3.0 / 5 - 1 vote cast)
Expertise Level:
  • Currently 4.0 / 5
(4.0 / 5 - 1 vote cast)

This page was last modified 10:30, 24 August 2007.

TSS000377 - Scanning for available WLAN networks: How can I retrieve the network's SSID and signal strength?

From Forum Nokia Wiki


Subject:

Scanning for available WLAN networks: How can I retrieve the network’s SSID and signal strength? TSS000377

 

Platform(s): Device(s), SW version(s):
S60 3rd Edition  

Category:

Symbian C++

Subcategory:

 

Description:

The list of available WLAN networks and their instant signal strength can be obtained by using the interfaces provided by the Connection Monitor Server API.
Here is an example of how the API can be used:
#include <rconnmon.h>
void CWlanTest:: ListNetworksAndSignalL(CDesCArraySeg& aNetworks)
{
    _LIT(KNetInfo, "Network: %S\tSignal: %d");
    TBuf<32> netName;
    TBuf<100> line;
    RConnectionMonitor monitor;
    TPckgBuf<TConnMonNetworkNames> pkgNetworks;
    // establish connection with the monitor server
    monitor.ConnectL();
    // prepare leave clean-up
    CleanupClosePushL(monitor);
    TRequestStatus status;
    // get the list of available networks
    monitor.GetPckgAttribute(EBearerIdWLAN, 0, KNetworkNames, pkgNetworks, status);
    // suspend thread until the info is retrieved
    // production code should use active objects
    User::WaitForRequest( status ) ;
    // leave if the asynchronous method returned an error
    User::LeaveIfError(status.Int());
    //  reset networks list
    aNetworks.Reset();
    // add retrieved networks to the list
    for(TUint i=0; i<pkgNetworks().iCount; i++)
    {
        netName.Copy(pkgNetworks().iNetwork[i].iName);
        line.Format(KNetInfo, &netName, pkgNetworks().iNetwork[i].iSignalStrength);
        aNetworks.AppendL(line);
    }
    // close server session
    CleanupStack::PopAndDestroy(&monitor);
}
Note:
- Link against: ConnMon.lib
- S60 3rd Edition-specific capability needed: NetworkServices

Creation date:

July 7, 2006

Last modified:

 
Related Discussions
Thread Thread Starter Forum Replies Last Post
Bluetooth Signal Strength kamisetty Bluetooth Technology 2 2007-07-04 08:16
Location api jsr 179 and Bluetooth GPS prategiov Mobile Java General 21 2007-12-04 23:36
WLANInfoApi async use omarfr Symbian Networking & Messaging 8 2008-05-22 21:45
problem with sms failing error gmurugaraj General Messaging 3 2006-12-22 13:09
Net Parameters acar3 Symbian Networking & Messaging 1 2005-12-14 14:50
 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtopicQUqfnTopicZwlanQ
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZKnowledgeBaseContentQ
     qfnZtypeQUqfnTypeZTechnicalSolutionQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX