WiFi APIs?

Login to reply to this topic.
Tue, 2005-03-01 13:32
Joined: 2005-02-14
Forum posts: 13
Can someone help me to tap into the WiFi API on the Communicator?  I just can't find docs or anything else that will help me.  I just want to learn how things are done.

Many thanks!

- F

Tue, 2005-03-08 10:54
Joined: 2003-10-10
Forum posts: 124
WiFi APIs?
have you managed to find these as I'm afetr them too
Wed, 2005-03-09 08:03
Joined: 2003-10-10
Forum posts: 124
Prioritising packets
Is this possible ?
Wed, 2005-05-11 15:39
Joined: 2004-10-08
Forum posts: 3
has anybody found the APIs for WIFI
Has anybody found the APIs for WIFI?HuhHuhHuh
Tue, 2005-05-17 15:36
Joined: 2005-02-14
Forum posts: 13
Re: has anybody found the APIs for WIFI
Quote from: hsubahan
Has anybody found the APIs for WIFI?HuhHuhHuh

As far as I can tell, there are no docs on using WiFi.  There are some mentions of it.  But everyone who might know is being quiet.  

Here's what I have figured out.  See the bottom why this code is just
wrong.

   (1)  You need an active connection first. For example, "Easy WLAN" is
          always present.  Find it in the IAP database and make a connection:

Code:
   
   RConnection connection;
   TCommDbConnPref pref;
   CCommsDatabase *db;
   CCommsDbTableView *view;
    RSocketServ server;
    RConnectionMonitor monitor;

   db = CCommsDatabase::NewL(EDatabaseTypeIAP);
   view = db->OpenViewLC(_L("IAP"),
                         _L("SELECT * FROM IAP WHERE NAME = 'Easy WLAN'"));
   result = view->GotoFirstRecord();
   if (result == KErrNone) {
      view->ReadUintL(_L("Id"), easy_wlan_id);
   } else {
       // flag error and return
   }
   CleanupStack::PopAndDestroy(); //view
   delete view;
   delete db;

   server.Connect();  
   monitor.ConnectL();  

   connection.Open(server);
   connection.EnumerateConnections(conncount);

   if (conncount == 0) {
   if (result == KErrNone) {
   pref.SetIapId(easy_wlan_id);
    pref.SetDialogPreference(ECommDbDialogPrefDoNotPrompt);
    pref.SetDirection(ECommDbConnectionDirectionOutgoing);
   connection.Start(pref, status);
    User::WaitForRequest(status);
           }
   }

  (2)  Use the active connection to find information about networks:

Code:
   TConnMonNetworkNamesBuf netnames;    
   
   monitor.GetConnectionInfo(1, connid, sCount);
   monitor.GetPckgAttribute(  connid,  0, KNetworkNames, netnames, status );
   User::WaitForRequest( status ) ;
   for (i=0; i<netnames().iCount; i++) {
        // AT THIS POINT, you can do something with
        //    netnames().iNetwork[i].iName and
        //    netnames().iNetwork[i].iSignalStrength
    }


THe problem is that an actual connection is made.  The WLAN interface is
actually activated.  The built-in monitor does not do this and this should not
be the way it works.  

There is a wireless network server, but I can't find any way to connect to
it.  I suspect that that is how we should be working with wireless network
detection and manipulation.

If anyone else has clues....please correct the code above and add to our
knowledge base.  This is really frustrating.

- F
Thu, 2006-07-13 16:18
Joined: 2005-03-27
Forum posts: 1
Re: WiFi APIs?
Thank you frethop for help
I made some modification and found a way to get the available Wifi network:

Code:

TRequestStatus  status;
TBuf<128> mes;
TInt i;
TPckgBuf<TConnMonNetworkNames>               pkgNetworks;
iMonitor.GetPckgAttribute(EBearerIdWLAN, 0, KNetworkNames,pkgNetworks, status); 

User::WaitForRequest( status ) ;

User::LeaveIfError(status.Int());

mes.Format(_L("%d"), pkgNetworks().iCount);
CEikonEnv::Static()->InfoWinL(_L("pkgNetworks:"),mes );

for (i=0; i<pkgNetworks().iCount; i++)
{
// AT THIS POINT, you can do something with iName and iSignalStrength
TBuf<128> name;
name.Copy(pkgNetworks().iNetwork[i].iName);
CEikonEnv::Static()->InfoWinL(_L("network:"),name );
}


This work fine on N80 device
  • Login to reply to this topic.