×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Jun 2006
    Posts
    17

    WEP key of WLAN IAP?

    Hi, Does any1 knows how to write WEP key for WLAN IAP in s60 3rd edition?
    The s80 way to create IAP and write WEP key in commdb dont work in s60 3rd edition :-(

    Thanks ahead for any help or tip.

    CheerS!!!

  2. #2
    Registered User
    Join Date
    Oct 2006
    Location
    Brisbane, Australia
    Posts
    7

    Re: WEP key of WLAN IAP?

    Hi there!

    Actually I'd be interested in working this out too - and just generally how to play around with the WLAN settings. I came across a few (seemingly) interesting provisioning-based threads while looking into it. This may be the most relevant one (I think):
    http://discussion.forum.nokia.com/fo...t=settings+app

    The other links on that page as well as:
    http://www.forum.nokia.com/info/sw.n..._v1_4.zip.html
    and
    http://www.forum.nokia.com/info/sw.n..._0_en.pdf.html
    seem like they're probably helpful.

    I've been too busy to try to figure out all the wbxml stuff but it looks promising. I'm not sure if this will help you, but just thought I'd throw it out there...

    Good luck,
    Brett.

  3. #3
    Registered User
    Join Date
    Jun 2006
    Posts
    17

    Re: WEP key of WLAN IAP?

    Quote Originally Posted by gamma8
    Hi there!

    Actually I'd be interested in working this out too - and just generally how to play around with the WLAN settings. I came across a few (seemingly) interesting provisioning-based threads while looking into it. This may be the most relevant one (I think):
    http://discussion.forum.nokia.com/fo...t=settings+app

    The other links on that page as well as:
    http://www.forum.nokia.com/info/sw.n..._v1_4.zip.html
    and
    http://www.forum.nokia.com/info/sw.n..._0_en.pdf.html
    seem like they're probably helpful.

    I've been too busy to try to figure out all the wbxml stuff but it looks promising. I'm not sure if this will help you, but just thought I'd throw it out there...

    Good luck,
    Brett.

    Hi , Thanks for reply. in s60 3rd edition i'm trying like this but no success yet:

    Create IAP:

    CApAccessPointItem *apnItem = CApAccessPointItem::NewLC();
    CCommsDatabase *commDB = CCommsDatabase::NewL();
    CleanupStack::PushL( commDB );
    CApDataHandler *dataHandler = CApDataHandler::NewLC( *commDB );
    apnItem->WriteTextL( EApIapName, aSSID );
    apnItem->WriteTextL( EApIapServiceType, TPtrC(_S("LANService")) );
    apnItem->WriteTextL( EApIP6NameServer1, TPtrC(_S("0.0.0.0")) );
    apnItem->WriteTextL( EApIP6NameServer2, TPtrC(_S("0.0.0.0")) );
    apnItem->WriteTextL( EApLanBearerName, TPtrC(_S("WLANBearer")) );
    apnItem->WriteUint( EApIapBearerID, 1 );
    apnItem->WriteUint( EApWlanNetworkMode, 1 );
    apnItem->WriteUint( EApWlanSecurityMode, 1 );//1 == allow unsecure
    apnItem->WriteTextL( EApWlanNetworkName, aSSID );
    apnItem->WriteTextL( EApNetworkName, aSSID );
    apnItem->WriteTextL( EApWapAccessPointName, TPtrC(aSSID) );
    apnItem->WriteTextL( EApIspName, aSSID );
    apnItem->WriteTextL( EApWapCurrentBearer, TPtrC(_S("WAPIPBearer")) );
    apnItem->WriteTextL( EApWapGatewayAddress, TPtrC(_S("0.0.0.0")) );
    apnItem->WriteUint( EApWapWspOption, 1 );
    apnItem->WriteTextL( EApIspIfName, TPtrC(_S("pppgprs")) );
    apnItem->WriteTextL( EApIspIfNetworks, TPtrC(_S("ip")) );
    apnItem->WriteTextL( EApIspIPAddr, TPtrC(_S("0.0.0.0")) );
    apnItem->WriteTextL( EApIspIPGateway, TPtrC(_S("0.0.0.0")) );
    apnItem->WriteTextL( EApIspIPNameServer1, TPtrC(_S("0.0.0.0")) );
    apnItem->WriteTextL( EApIspIPNameServer2, TPtrC(_S("0.0.0.0")) );
    apnItem->WriteTextL( EApIspIPNetMask, TPtrC(_S("0.0.0.0")) );
    apnItem->WriteUint( EApIspIfCallbackType, 1002 );
    apnItem->WriteUint( EApIspCallBackTimeOut, 60000000 );
    apnItem->WriteUint( EApIspBearerCE, 2 );
    apnItem->WriteBool( EApIspIPAddrFromServer, ETrue );
    apnItem->WriteBool( EApIspIPDnsAddrFromServer, ETrue );

    apnItem->SetBearerTypeL( EApBearerTypeWLAN );

    TRAP( error, apnId = dataHandler->CreateFromDataL( *apnItem )
    if(error != KErrNone)
    User::LeaveIfError( error );
    else{
    TRAPD(err, dataHandler->SetAsDefaultL( ispId, EIspTypeWAPOnly ) );
    User::LeaveIfError( err );
    }

    CleanupStack::PopAndDestroy( 3 ); //dataHandler, apnItem, commDB

    The only place where i think its possible to add WEP key is Service_extension_table. And i'm able to add wep key data there
    too. But i dont know how to make a link between this created
    IAP & Service extension table which contains WEP.



    //<Add new WLAN service to WLANService Table>
    TUint32 wlanServiceId;
    TUint32 serviceId;

    CCommsDatabase* CommDb = CCommsDatabase::NewL(EDatabaseTypeIAP);
    CleanupStack::PushL( CommDb );
    CommDb->BeginTransaction();
    // CCommsDbTableView* table = CommDb->OpenViewMatchingTextLC(TPtrC( _S("WLANServiceTable") ), TPtrC(COMMDB_NAME), TPtrC(iWlanSettings.iNetworkName));
    CCommsDbTableView* table = CommDb->OpenViewMatchingTextLC(TPtrC( WLAN_SERVICE_EXTENSION_TABLE ), TPtrC(COMMDB_NAME), TPtrC(iWlanSettings.iNetworkName));

    if(table->GotoFirstRecord()==KErrNone)
    {
    table->ReadUintL(TPtrC(COMMDB_ID),wlanServiceId);
    table->UpdateRecord();
    }
    else
    {
    CleanupStack::PopAndDestroy();//table
    // table = CommDb->OpenTableLC(TPtrC( _S("WLANServiceTable") ));
    table = CommDb->OpenTableLC(TPtrC( WLAN_SERVICE_EXTENSION_TABLE ));
    table->InsertRecord(wlanServiceId);
    }

    TBuf8<64> key;

    iWlanSettings.iWepInfo[0].Validate();
    iWlanSettings.iWepInfo[0].FormatWepKey(key);

    // table->WriteUintL(TPtrC(WLAN_SERVICE_ID),aServiceId);
    table->WriteTextL(TPtrC(COMMDB_NAME), iWlanSettings.iNetworkName/*_L("WLAN")*/);
    table->WriteUintL(TPtrC(WLAN_SERVICE_CONNECTION_MODE),1);
    table->WriteTextL(TPtrC(WLAN_SERVICE_SSID), iWlanSettings.iNetworkName);
    table->WriteUintL(TPtrC(WLAN_SERVICE_CHANNELID), 0);
    table->WriteUintL(TPtrC(WLAN_SERVICE_SECURITY_MODE),(TUint)iWlanSettings.iSecurityMode); //0);
    table->WriteTextL(TPtrC(WLAN_SERVICE_WEPKEY1), key);
    table->WriteTextL(TPtrC(WLAN_SERVICE_WEPKEY2), _L("0"));
    table->WriteTextL(TPtrC(WLAN_SERVICE_WEPKEY3), _L("0"));
    table->WriteTextL(TPtrC(WLAN_SERVICE_WEPKEY4), _L("0"));
    table->WriteUintL(TPtrC(WLAN_SERVICE_DEFAULT_WEPKEY),(TUint)0);
    table->WriteUintL(TPtrC(WLAN_SERVICE_AUTHENTICATION_MODE),(TUint)iWlanSettings.iWEPAuth);
    table->WriteTextL(TPtrC(WLAN_SERVICE_WPA_PRESHARE_KEY), _L("0"));
    table->WriteUintL(TPtrC(WLAN_SERVICE_WPAKEY_LENGTH), 0);
    table->WriteTextL(TPtrC(WLAN_SERVICE_EAPLIST), _L(""));
    table->WriteUintL(TPtrC(WLAN_SERVICE_WPA_PRESHARE_KEY_USED), 0);

    table->PutRecordChanges( EFalse, EFalse);
    CommDb->CommitTransaction();
    CleanupStack::PopAndDestroy(2); //table, CommDb

    //</Add new WLAN service to WLANService Table>


    I tried following to make a connection between IAP & service_extension table like this but it didnt work: apnItem->WriteUint(EApWlanSettingsId,(TUint32)id); // id is the record id from service extension table

  4. #4
    Registered User
    Join Date
    Sep 2004
    Posts
    65

    Smile Re: WEP key of WLAN IAP?

    hi Chishti,

    hope this link
    http://discussion.forum.nokia.com/fo...d=1#post250482
    will answer your question.

    best regards,
    susido cheung

  5. #5
    Registered User
    Join Date
    Mar 2003
    Location
    Winchester, UK
    Posts
    2

    Re: WEP key of WLAN IAP?

    Thanx for that link, you have just cured my headache.

    CosmosKey,

    Identity Management Consultant
    www.cosmoskey.com

  6. #6
    Registered User
    Join Date
    Jun 2006
    Posts
    17

    Re: WEP key of WLAN IAP?

    Quote Originally Posted by susido_cheung
    hi Chishti,

    hope this link
    http://discussion.forum.nokia.com/fo...d=1#post250482
    will answer your question.

    best regards,
    susido cheung
    Tnx for reply.. I have written there about problem.

Similar Threads

  1. Replies: 8
    Last Post: 2009-01-24, 06:00
  2. D211 - How do i automatically recieve WEP key?
    By qiddees in forum Multimodecards
    Replies: 0
    Last Post: 2004-08-18, 00:15
  3. D211 Sdk Wlan Wep
    By seiyafujii in forum Multimodecards
    Replies: 1
    Last Post: 2003-05-02, 13:26
  4. Key Event Issues
    By mykes in forum Symbian
    Replies: 0
    Last Post: 2003-05-01, 10:55
  5. keybindings nokia7650 and nokia6310i
    By topisystems in forum Mobile Java General
    Replies: 1
    Last Post: 2002-06-05, 14:25

Posting Permissions

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