Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor Rama1962's Avatar
    Join Date
    Oct 2007
    Location
    PUNE,INDIA
    Posts
    52
    Greetings All !

    Our application is opening Rsession Object and sending data via GPRS. If GPRS is not available , the phone ( E 62 ) shows a list of available access points and the user is expected to select the relevant access point manually. We want to automate the selection of access points i.e. Select Access Point 2 , else select Access Point 3 and so on . Can any kind soul help ?

  2. #2
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    Search for access point in the Wiki. They are often called as Internet Access Points, and abbreviated to IAP, so you should also search for IAP.

  3. #3
    Regular Contributor Dattanand's Avatar
    Join Date
    Dec 2007
    Location
    Banglore,India
    Posts
    64
    Try this,

    CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref pref;

    commDBView->ReadConnectionPreferenceL(pref);
    TUint32 iapID = pref.iBearer.iIapId;
    TCommDbConnPref connectPref;

    connectPref.SetDialogPreference(ECommDbDialogPrefDoNotPrompt);
    connectPref.SetDirection(ECommDbConnectionDirectionUnknown);
    connectPref.SetBearerSet(ECommDbBearerGPRS);
    connectPref.SetIapId(iapID);

  4. #4
    Regular Contributor Rama1962's Avatar
    Join Date
    Oct 2007
    Location
    PUNE,INDIA
    Posts
    52
    i am using following code
    Code:
    User::LeaveIfError(iSocketServ.Connect());
    User::LeaveIfError(iConnection.Open(iSocketServ));
    
    // open the IAP communications database 
    CCommsDatabase* commDB = CCommsDatabase::NewL(EDatabaseTypeIAP);
    CleanupStack::PushL(commDB);
    
    // initialize a view 
    CCommsDbConnectionPrefTableView* commDBView = 
    commDB->OpenConnectionPrefTableInRankOrderLC(ECommDbConnectionDirectionUnknown);
    
    // go to the first record 
    
    User::LeaveIfError(commDBView->GotoFirstRecord());
    // Declare a prefTableView Object.
    CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref pref;
    
    // read the connection preferences 
    commDBView->ReadConnectionPreferenceL(pref);
    TUint32 iapID = pref.iBearer.iIapId; 
    
    // pop and destroy the IAP View 
    CleanupStack::PopAndDestroy(commDBView);
    
    // pop and destroy the database object
    CleanupStack::PopAndDestroy(commDB);
    
    // Now we have the iap Id. Use it to connect for the connection.
    // Create a connection preference variable.
    TCommDbConnPref connectPref;
    
    // setup preferences 
    connectPref.SetDialogPreference(ECommDbDialogPrefDoNotPrompt);
    connectPref.SetDirection(ECommDbConnectionDirectionUnknown);
    connectPref.SetBearerSet(ECommDbBearerGPRS);
    //Sets the CommDb ID of the IAP to use for this connection
    connectPref.SetIapId(iapID);
    
    User::LeaveIfError(iConnection.Start(connectPref));
    i.e. Opening Connection PrefTable in RankOrder and then selecting the first record. here i want to loop around and select right iap. is it possible? if yes how? please help

  5. #5
    Regular Contributor Dattanand's Avatar
    Join Date
    Dec 2007
    Location
    Banglore,India
    Posts
    64
    I am not sure what you are going to achieve with automatic IAP selection.It will be problematic if you try to connect to different IAP's based on success or failure of previous IAP.I guess the code you are using prioterises your IAP. i.e. if you select same IAP for several times on device,after few iterations it will not ask for IAP and connect to that IAP by default if it succeeds every time,if it fails it will ask.

Similar Threads

  1. Connect to WAP Access Point
    By psousa in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2008-10-28, 11:56
  2. how to avoid HTTP Access point selection dialog
    By jinishakya in forum Symbian Networking & Messaging (Closed)
    Replies: 12
    Last Post: 2007-06-18, 08:18
  3. Access point selection
    By Svat_ in forum Symbian C++
    Replies: 1
    Last Post: 2007-04-17, 05:45
  4. Why is client code to CSocketEngine hanging at Access Point dialogue?
    By nawkboy in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2003-03-11, 11:16
  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
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved