×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Aug 2008
    Posts
    9

    Aquiring list of known or open Wireless Access Points from a device.

    Hi all,

    I am trying to perform a search for WLAN networks and iterate through all the access points on the list. Using a criteria to select the preferred access points. The criteria being the IAP is a known/stored one on my device or the access point is an OPEN access point requiring no password etc.

    Curently this is what i have ..

    //Retrieves all avalible IAP
    void CInit::GetIapL(RPointerArray<TIapClass> &aIapData )
    {
    TFileName iapName;
    TUint32 iapID;
    TInt err;

    // Pointer to TIapClass
    TIapClass* ptr = new (ELeave) TIapClass;

    // open the IAP communications database
    CCommsDatabase* commDB = CCommsDatabase::NewL();
    CleanupStack::PushL(commDB);

    // Open the IAP table
    CCommsDbTableView* view = commDB->OpenTableLC(TPtrC(IAP));



    _LIT(KListItemFormat1, "IAP_AP = %d\n");
    _LIT(KListItemFormat2, "IAP_NAME = %s\n");
    // Point to the first entry
    if (view->GotoFirstRecord() == KErrNone)
    {
    do
    {
    view->ReadTextL(TPtrC(COMMDB_NAME), iapName);
    view->ReadUintL(TPtrC(COMMDB_ID), iapID);


    //Assign data fro IAP communications database
    ptr->iapname = iapName;
    ptr->iapid = iapID;

    TBuf<8> item1;
    TBuf<20> item2;

    item1.Format(KListItemFormat1,iapID);
    item2.Format(KListItemFormat2,&iapName);

    iConsole->Printf(item1);
    iConsole->Printf(item2);

    //Update pointer array with IAP data
    aIapData.Append(ptr);

    } while (err = view->GotoNextRecord(), err == KErrNone);
    }

    CleanupStack::PopAndDestroy(view); // view
    CleanupStack::PopAndDestroy(commDB); // commDB
    }
    Last edited by dele2006; 2008-09-26 at 12:40. Reason: spelling mistake

  2. #2
    Registered User
    Join Date
    Aug 2008
    Posts
    9

    Re: Aquiring list of known or open Wireless Access Points from a device.

    TIapClass is:


    class TIapClass
    {
    public:
    TBuf<128> iapname;
    TUint32 iapid;
    };

  3. #3
    Registered User
    Join Date
    Aug 2008
    Posts
    9

    Re: Aquiring list of known or open Wireless Access Points from a device.

    Also for debugging, I am trying to display the IAP ID and NAME. The current code fails with a Console Panic USER 11.

    Problems:

    [1] Iterate through all the access points on the list. Using a criteria to select the preferred access points.

    [2] Display correct IAPID. Prior to trying the new format , i get a really long number for the IAP_ID which i think is a memory address.

    Thanks

Similar Threads

  1. Access to GPRS access points of 7650
    By lepo in forum Symbian Networking & Messaging (Closed)
    Replies: 7
    Last Post: 2003-10-29, 12:49
  2. Series 60 SDK list of open connections
    By HershD in forum Bluetooth Technology
    Replies: 1
    Last Post: 2003-04-11, 09:01
  3. Series 60 SDK: list of open connections
    By HershD in forum Bluetooth Technology
    Replies: 1
    Last Post: 2003-04-11, 08:41
  4. Replies: 1
    Last Post: 2002-11-28, 11:45
  5. Wireless device testing method?
    By Nokia_Archived in forum PC Suite API and PC Connectivity SDK
    Replies: 0
    Last Post: 2002-05-27, 15:03

Posting Permissions

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