×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Regular Contributor
    Join Date
    May 2006
    Location
    Milan, Italy
    Posts
    92

    access point on real device problem

    Hi, I'm trying to create a new access point (wlan) on my e60 device

    I use the code finded at the link :
    http://forum.nokia.com/document/Foru...ting_to_it.htm
    in the forum nokia tachnical library

    or
    http://forum.nokia.com/document/Foru...g_WLAN_APs.htm


    In emulator works well ( but I use gprs , not wlan... because wlan is not supported in emulator ) but in real device the code stops at the line :

    TUint32 newApId = handler->CreateFromDataL(*wlan);

    that is the line when access point is writed in comm database...

    I've read the documentation and I have find that CreateFromDataL ( class CApDataHandler ) stops for :

    - Insufficient memory
    - Server connection failure.
    - Lock already present by other task.
    - Attempting to create new in protected tables will result in KErrAccessDenied

    Anyone know the problem ?
    Maybe I need special capabilities for write in this table or the tables are protected ?

    My e60 is a standard device, not an operator version....

    thanks.

    Ste

  2. #2
    Registered User
    Join Date
    Oct 2007
    Posts
    17

    Re: access point on real device problem

    Hi,

    i have same problem!!!
    Have you any solution about this now?
    I try to create a WLAN access point on s60 device!!

    Thanks!!

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

    Re: access point on real device problem

    so when it stops in the line, does it crash the program with error , or just jams ?
    you could aos try TRAPping the error code, and if it is for example -46, it would indicate that you are missing required capabilities for executing the function.

    yucca

  4. #4
    Regular Contributor
    Join Date
    May 2006
    Location
    Milan, Italy
    Posts
    92

    Re: access point on real device problem

    I use this code :

    Code:
    CApAccessPointItem *newAP = CApAccessPointItem::NewLC();
    
    newAP->SetNamesL(_L("NewAP);
    
     newAP->SetBearerTypeL(EApBearerTypeGPRS);
    
    //then you can set ap parameters like:
     newAP->WriteBool(EApGprsIfPromptForAuth,EFalse);
    // ecc.
    
    // Store it into the CommsDb
    
    CCommsDatabase *commDb1 = CCommsDatabase::NewL();
    CleanupStack::PushL(commDb1);
    CApDataHandler *handler = CApDataHandler::NewLC(*commDb1);	
    TUint32 newApId = handler->CreateFromDataL(*newAP);
    							
    CleanupStack::PopAndDestroy(3);
    In my test code I use only WriteDeviceData capability.


    Ste

  5. #5
    Registered User
    Join Date
    Oct 2007
    Posts
    17

    Re: access point on real device problem

    Hi ,

    at first thanks four your posts!

    In emulator i have a System error(-1) on the line

    apid = handler->CreateFromDataL(*wlanAp);

    wlanAP is object of CApAccessPointItem! and data base is open also!!!


    Dejan

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

    Re: access point on real device problem

    firstly you shuld always check the SDK docs for required capabilities, having just WriteDeviceData is not enough.

    so try first adding all, then -1 just tells that something is not found, so check the settings data you are trying to set again.

    yucca

  7. #7
    Registered User
    Join Date
    Oct 2007
    Posts
    17

    Re: access point on real device problem

    Quote Originally Posted by symbianyucca View Post
    firstly you shuld always check the SDK docs for required capabilities, having just WriteDeviceData is not enough.

    so try first adding all, then -1 just tells that something is not found, so check the settings data you are trying to set again.

    yucca
    Hi yucca,

    i just started to develop with this SDK!
    I use S60_3rd_FP1 v9.2!!!
    How can i found out which capabilities are required?
    I have certificate from SymbianSigned!

    Thanks,

    Dejan

  8. #8
    Regular Contributor
    Join Date
    May 2006
    Location
    Milan, Italy
    Posts
    92

    Re: access point on real device problem

    Sorry... my last post wasn't complete...

    I'm able to create access points, the code that I posted works well, and only WriteDeviceData is needed ( I re-tested the code 5 minutes ago.. only this capability is needed ).
    I know that S60 doc indicate ReadUserData,WriteUserData, ReadDeviceData, WriteDeviceData capabilities ( for CApAccessPointItem, CApDataHandler... ) but for this operation, that is only a write, only WriteDeviceData is needed.
    If you want to use CApAccessPointItem for others operations ( read, ecc. ) probably all the 4 capabilities are needed.

    I re-write the code.. the last that I posted creates a Gprs AP...

    Code:
    CApAccessPointItem *wlan = CApAccessPointItem::NewLC();
    wlan->SetNamesL(_L("NewWiFiAP"));
    wlan->SetBearerTypeL(EApBearerTypeWLAN);
    wlan->WriteTextL(EApWlanNetworkName, _L("WlanAP"));
    // Store it into the CommsDb
    CCommsDatabase *commDb = CCommsDatabase::NewL();
    CleanupStack::PushL(commDb);
    CApDataHandler *handler = CApDataHandler::NewLC(*commDb);
    TUint32 newApId = handler->CreateFromDataL(*wlan);
    CleanupStack::PopAndDestroy(3); // handler, commDb, wlan
    Ste

    p.s. for dejjan .. in 3rd edition api reference ( sdk folder "S60doc" ) you can find required capabilities

  9. #9
    Registered User
    Join Date
    Oct 2007
    Posts
    17

    Re: access point on real device problem

    Hi,

    thanks for replays!!!!!

    Now it works!!!!!!!!!!

    Dejan

Similar Threads

  1. Connecting J2ME application to Internet using WAP access point?
    By khurshed79 in forum Mobile Java Networking & Messaging & Security
    Replies: 12
    Last Post: 2012-09-12, 09:53
  2. Nokia 6101 Locked 2 TMobile Midlet can't access internet...
    By Jason Glass in forum Mobile Java Networking & Messaging & Security
    Replies: 45
    Last Post: 2007-11-14, 02:19
  3. N70 Access Point becomes Unusable
    By ravey72 in forum Symbian
    Replies: 0
    Last Post: 2007-04-18, 10:58
  4. Internet Access Point Prompting Problem
    By rakesh.jaiswal in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2005-03-16, 09:18
  5. Replies: 0
    Last Post: 2003-02-24, 04:00

Posting Permissions

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