×

Discussion Board

Results 1 to 15 of 25

Hybrid View

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

    Problem with wlan IAP

    Hi all,
    I have been made a wlan access point in symbian C++ for my router.
    Code:
    CApAccessPointItem *wlan = CApAccessPointItem::NewLC();
        wlan->SetNamesL(_L("MioAP"));
        wlan->SetBearerTypeL(EApBearerTypeWLAN);
        wlan->WriteTextL(EApWlanNetworkName,_L("Alice-55564905"));
        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);
    
    
        TUint32 wlanId;
        wlan->ReadUint(EApIapServiceId,wlanId);
    
        CCommsDbTableView* view=db->OpenViewMatchingUintLC(TPtrC( WLAN_SERVICE),TPtrC( WLAN_SERVICE_ID),wlanId);
    
        err=view->GotoFirstRecord();
    
    
            view->UpdateRecord();
            TRAP(err,view->WriteUintL(TPtrC(NU_WLAN_AUTHENTICATION_MODE),(TUint32)EAuthShared));
            TRAP(err,view->WriteUintL(TPtrC(WLAN_WEP_INDEX),(TUint32)EKeyNumber1));
            TRAP(err,view->WriteTextL(TPtrC(NU_WLAN_WEP_KEY1),_L("xxxxxxxxxxxxxxxxxx")));
            TRAP(err,view->WriteUintL(TPtrC(WLAN_WEP_KEY1_FORMAT),(TUint32)EAscii));
            view->PutRecordChanges();
            db->CommitTransaction();
    The device can connect to the router but it doesn't find the default gateway and the DNSs then it can't access to internet.

    If I try to make the same IAP with the manual configuration of symbian OS when I connect the device to the router it found automatically gateway and DNSs.
    Why?

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

    Re: Problem with wlan IAP

    Ciao,
    I think that columns for DNS and gateway settings are into LAN_SERVICE table, take a look at cdbcols.h; i don't know by which index LAN_SERVICE and WLAN_SERVICE tables are related, but you could try to read values from a manually configured IAP and try to replicate them in the programmatically configured one.
    If i well remember from your previous posts, you decided to not use CApAccessPointItem bacause deprecated; well... i had the same constraint as you, but i found that it's still valid in SymbianBelle (i use it for GPRS IAP creation), very easy to use, and there's no risk to mess tables around :-)
    There's a wlan example here, maybe it's working:
    http://read.pudn.com/downloads96/sou...ppui.cpp__.htm

    buon lavoro!
    pg

    EDIT: found this old thread: http://www.developer.nokia.com/Commu...in-ad-hoc-mode

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

    Re: Problem with wlan IAP

    Ciao,
    I have read the documentations but they do not explain other.

    I think I' ve read all values of the wifi configuartion made by Symbian manual configurator.
    They seems to be equals.
    Then why it doesn't find DNSs and gateway??
    I'm desperate

    Grazie mille
    A993

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

    Re: Problem with wlan IAP

    Hello,
    just to be sure that you have tried everything, have you tried also:
    http://www.developer.nokia.com/Commu...in-ad-hoc-mode, post #6 (how to get the correct corresponding table into commdb...)
    trying to use _L8("MioAP") or _L8("Alice-55564905") instead of _L8("ApE51") ?
    and trying to use
    Code:
    lanServiceView->WriteBoolL(TPtrC(SERVICE_IP_ADDR_FROM_SERVER), ETrue);
    lanServiceView->WriteBoolL(TPtrC(SERVICE_IP_DNS_ADDR_FROM_SERVER), ETrue);
    instead of
    Code:
    lanServiceView->WriteBoolL(TPtrC(SERVICE_IP_ADDR_FROM_SERVER), EFalse);
    lanServiceView->WriteBoolL(TPtrC(SERVICE_IP_DNS_ADDR_FROM_SERVER), EFalse);
    ?

    otherwise i haven't any other suggestions, sorry
    regards
    pg
    Last edited by pavarang; 2012-09-29 at 21:07. Reason: typo in _L8 usage

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

    Re: Problem with wlan IAP

    I just found this link in the library (click on it twice):
    http://library.developer.nokia.com/i...ntItem_8h.html
    where:
    EApWlanIpNetMask,
    EApWlanIpGateway, EApWlanIpAddrFromServer, EApWlanIpAddr, EApWlanIpDnsAddrFromServer,
    EApWlanIPNameServer1, EApWlanIPNameServer2
    are defined, and an example:
    http://sensorkit.googlecode.com/svn-...c/WlanInit.cpp

    regards,
    pg

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

    Re: Problem with wlan IAP

    Thank you very much
    But I've found the problem with ceddump.
    The problem is NU_WLAN_WEP_KEY1, the key of the iap in HEX.
    My router password is "aannddrreeaa0"
    The password in hex stored in the DB by the symbian OS configuration is:
    "\x3136\x3136\x4536\x4536\x3436\x3436\x3237\x3237\x3536\x3536\x3136\x3136\x3033\xCECE\xCECE\xCECE\xCECE\xCECE\xCECE\xCECE\xCECE\xCECE\xCECE\xCECE\xCECE\xCECE"

    x3136=a
    x4536=n
    x3436=d
    ..
    ..

    But what kind of codify is it? I've never saw it

    Grazie mille ancora

Similar Threads

  1. E63 WLAN Problem
    By mohd.ismail in forum General Development Questions
    Replies: 1
    Last Post: 2010-09-14, 08:24
  2. PROBLEM :WLAN
    By neel.soft in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2009-02-04, 06:47
  3. N95 wlan problem
    By doket in forum Wired and Wireless interfaces (Closed)
    Replies: 1
    Last Post: 2007-04-20, 16:23
  4. problem with WLAN on E70
    By ondskapen in forum General Development Questions
    Replies: 2
    Last Post: 2007-03-13, 23:28
  5. problem with WLAN on E70
    By ondskapen in forum Mobile Java General
    Replies: 2
    Last Post: 2007-03-13, 23:28

Posting Permissions

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