×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Apr 2011
    Posts
    115

    Create a new Wifi access point

    I'm using WLAN management api to discover wifi access points.
    Well, now I want to connect the device at one of these. I know the Wifi key.
    How can I do?

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,143

    Re: Create a new Wifi access point

    have you checked the "S60 Platform: Access Points Example with Roaming Support" from https://www.developer.nokia.com/Deve...tworking.xhtml already ?

  3. #3
    Registered User
    Join Date
    Apr 2011
    Posts
    115

    Re: Create a new Wifi access point

    I'm developing for s60v5 and higher.
    First I've see the ApEngine API but now are deprecated.
    I've see this documentation: http://www.symlab.org/wiki/index.php...e_to_CmManager
    But in this example:
    Code:
    RCmManager iCmManager;
    iCmManager.OpenL();
    CleanupClosePushL( iCmManager );
    
    // Create a Connection Method
    RCmConnectionMethod cm = iCmManager.CreateConnectionMethodL( KUidPacketDataBearerType );
    CleanupClosePushL( cm );
    ...........
    The function CreateConnectionMethodL is only supported on S^3 or higher.
    What can I do?

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,143

    Re: Create a new Wifi access point

    Did you check the example I was giving link ?

  5. #5
    Registered User
    Join Date
    Apr 2011
    Posts
    115

    Re: Create a new Wifi access point

    The example make only wap access points, not wifi.
    I've look this http://www.developer.nokia.com/Commu..._access_points
    It might to be deprecated but the compiler works
    And I have wrote this code:
    Code:
     CApAccessPointItem *wlan = CApAccessPointItem::NewLC();
        wlan->SetNamesL(_L("NewAP"));
        wlan->SetBearerTypeL(EApBearerTypeWLAN);
        wlan->WriteTextL(EApWlanNetworkName,_L("WlanAP"));
        wlan->WriteUint(EApWlanSecurityMode,EOpen);
    
        wlan->WriteUint(EApWlanNetworkMode,EInfra);
    
        CCommsDatabase *db= CCommsDatabase::NewL();
        CleanupStack::PushL(db);
        CApDataHandler *handler= CApDataHandler::NewLC(*db);
        TInt err= db->BeginTransaction();
      
        TUint32 newApId= handler->CreateFromDataL(*wlan);
        CleanupStack::PopAndDestroy(3);
    newApId variable is ever =12 but none access point was created.
    Last edited by andrea993; 2012-08-28 at 23:47.

  6. #6
    Registered User
    Join Date
    Apr 2011
    Posts
    115

    Re: Create a new Wifi access point

    Nobody can help me?

  7. #7
    Registered User
    Join Date
    Jan 2005
    Location
    Italy
    Posts
    639

    Re: Create a new Wifi access point

    Hello,
    since it's not into the the piece of code you posted, maybe you forgot to call

    Code:
    err = db->CommitTransaction();
    regards
    pg

  8. #8
    Registered User
    Join Date
    Apr 2011
    Posts
    115

    Re: Create a new Wifi access point

    Thank you. But now I've an other problem.
    I want to set a WEP key to the IAP.
    I wrote this code:

    Code:
        CApAccessPointItem *wlan = CApAccessPointItem::NewLC();
        wlan->SetNamesL(_L("NewAP"));
        wlan->SetBearerTypeL(EApBearerTypeWLAN);
        wlan->WriteTextL(EApWlanNetworkName,_L("APName"));
        wlan->WriteUint(EApWlanSecurityMode,EWep);
        wlan->WriteUint(EApWlanNetworkMode,EInfra);
    
    
    
        CCommsDatabase *db= CCommsDatabase::NewL();
        CleanupStack::PushL(db);
        CApDataHandler *handler= CApDataHandler::NewLC(*db);
        TInt err= db->BeginTransaction();
    
        TUint32 newApId= handler->CreateFromDataL(*wlan);
    
    
        handler->AccessPointDataL(newApId,*wlan);
    
        //err = db->CommitTransaction();
    
    
    
        TUint32 wlanId;
        wlan->ReadUint(EApIapServiceId,wlanId);
    
    
        CCommsDbTableView* view=db->OpenViewMatchingUintLC(TPtrC( WLAN_SERVICE),TPtrC( WLAN_SERVICE_ID),wlanId);
    
        err=view->GotoFirstRecord();
    
        if(err==KErrNone)
        {
            view->UpdateRecord();
        }
        else
        {
            TUint32 dummyUid(0);
            User::LeaveIfError( view->InsertRecord(dummyUid));
            // Save link to LAN service
            view->WriteUintL( TPtrC(WLAN_SERVICE_ID),newApId);
        }
    
    
    
        TUint32 authMode=EAuthShared;
        TRAP(err,view->WriteUintL(TPtrC( WLAN_AUTHENTICATION_MODE ),authMode));
    
        TUint32 wepKeyinUse=EKeyNumber1;
        TRAP(err,view->WriteUintL(TPtrC(WLAN_WEP_INDEX),wepKeyinUse));
    
        TRAP(err,view->WriteTextL(TPtrC(WLAN_WEP_KEY3),_L("xxxxxxxxxxxxx")));
    
        TUint32 wepFormat=EAscii;
        TRAP(err,view->WriteUintL(TPtrC(WLAN_WEP_KEY3_FORMAT),wepFormat));
    
        view->PutRecordChanges();
    
        db->CommitTransaction();
    
        CleanupStack::PopAndDestroy(3);
    But it leave because don't find this columns in the table:
    WLAN_WEP_INDEX
    WLAN_WEP_KEY3
    WLAN_WEP_KEY3_FORMAT

    Why?

Similar Threads

  1. Preselect wifi access point
    By pavarang in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2010-05-07, 20:28
  2. Using WIFI Access Point
    By kkc_123 in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2010-02-01, 13:12
  3. How I can get the WiFi access point IDs list?
    By symbi4n_programmer in forum Symbian
    Replies: 1
    Last Post: 2009-10-13, 16:47
  4. Wifi to 3G failover access point
    By rajil.s in forum VoIP
    Replies: 0
    Last Post: 2008-12-06, 10:59
  5. WiFi Software Access Point on N80
    By JordiFon in forum Wired and Wireless interfaces (Closed)
    Replies: 0
    Last Post: 2006-06-21, 22:45

Posting Permissions

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