×

Discussion Board

Results 1 to 8 of 8

Thread: Wap GateWay IP

  1. #1
    Registered User
    Join Date
    Aug 2003
    Location
    donetsk UA
    Posts
    22

    Wap GateWay IP

    Hi all.
    ======================================
    1. my program needs connection with wap gateway
    2. for this I use:
    Code:
    //_LIT8(WapGateway,"192.168.10.10");//this is my provider wap gateway
    iWapServ.Connect();
    iWAPCOConn.Open(iWapServ, WapGateway, RemotePort, LocalPort, Bearer, SecureConn);
    iWAPCOConn.Connect(ClientHeaders, iCap);
    3. before connection user chooses the access point.
    4. how do I obtaine IP of wap gateway for selected access point?
    5. and how do this without using <etelbgsm.h>?

    sorry for my bad english
    ======================================
    Yuri M. Bogak

  2. #2

  3. #3
    Registered User
    Join Date
    Aug 2003
    Location
    donetsk UA
    Posts
    22

    thanks xiddesign

    ========================================
    I have already read this post and faced with following problem:
    Classes CApDataHandler and CApAccessPointItem
    use "etelbgsm.h":
    Code:
    00001 /*
    00002 * ============================================================================
    00003 *  Name     : ApDataHandler.h
    00004 *  Part of  : Access Point Engine 
    00005 *
    00006 *  Description: Declaration of class CApDataHandler
    00007 *  Copyright (c) 2002 Nokia. All rights reserved.
    00008 * ============================================================================
    00009 */
    00010 
    00011 #ifndef APDATAHANDLER_H
    00012 #define APDATAHANDLER_H
    00013 
    00014 //  INCLUDES
    00015 #include <bldvariant.hrh>
    00016 
    00017 #include <commdb.h>
    00018 #include <etelbgsm.h>
    00019 #include <ApEngineVer.h>
    00020 #include <ApEngineConsts.h>
    Code:
    00001 /*
    00002 * ============================================================================
    00003 *  Name     : ApAccessPointItem.h
    00004 *  Part of  : Access Point Engine
    00005 *
    00006 *  Description: Declaration of the class CApAccessPointItem
    00007 *  Copyright (c) 2002 Nokia. All rights reserved.
    00008 * ============================================================================
    00009 */
    00010 
    00011 #ifndef ACCESSPOINTITEM_H
    00012 #define ACCESSPOINTITEM_H
    00013 
    00014 //  INCLUDES
    00015 #include <bldvariant.hrh>
    00016 
    00017 #include <etelbgsm.h>
    00018 #include <nifvar.h>
    00019 #include <ApEngineVer.h>
    00020 #include <ApEngineConsts.h>
    but this header file is missing in SDK...i read all forum about this file and find this post
    I think there's some confusion here...

    There are two files being talked about here - etelbgsm.h (etel Basic GSM) and etelagsm.h (etel Advanced GSM)

    etelbgsm.h is the one we (3rd party developers) are sort of allowed to use. It wasn't in the S60 SDKs, but apparently Nokia don't mind us using the S80 6.0 SDK version.

    etelagsm.h is the one we're not meant to use. In theory you can only get this if you're a special Nokia/Symbian partner type. However, Sendo made a bit of a mistake when it posted its first S60 SDK - they included all of the headers (including etelagsm.h) rather than just the ones us 3rd pary developers are meant to get at. However they've removed this SDK now - so you'll have to find someone who's got a copy and beg them for a copy.

    However, if you're looking to get your app certified by Nokia - don't expect them to to certify anything using headers you weren't meant to be using...

    Cheers
    Russell
    Please explain me: can i use etelbgsm.h in my progs if i want get Nokia certification?
    and can somebody send me this "etelbgsm.h"
    my email: yuri.bogak@mail.ru

    thank you.
    ======================================
    Yuri M. Bogak
    Last edited by bogakym; 2003-12-16 at 08:39.

  4. #4
    Registered User
    Join Date
    Aug 2003
    Location
    donetsk UA
    Posts
    22

    Nokia Expert i need your help.

    please tell something about this.

  5. #5
    Registered User
    Join Date
    May 2003
    Posts
    30
    Try providing an empty header file or commenting out the #include of the file that you don't have. You can probably provide dummy definitions for things if they are not defined. I'm sure CApAccessPointItem doesn't really need ETELBGSM.H.

    It is also a bit naughty of Nokia to include and document a class that cannot be used (i.e. CApAccessPointItem).

  6. #6
    Registered User
    Join Date
    Aug 2003
    Location
    donetsk UA
    Posts
    22
    I have cleaned unnecessary lines (with links to etelbgsm.h) and application crashed in phone...

    but one good man mailed me this file and i hope with this header file all will works fine...

  7. #7
    Registered User
    Join Date
    Aug 2003
    Location
    donetsk UA
    Posts
    22

    xiddesign

    Code:
    TBuf<100> wapGateway;
    CCommsDatabase* commDb = CCommsDatabase::NewL(EDatabaseTypeUnspecified);
    CleanupStack::PushL(commDb);
    CApSelect* apSelect = CApSelect::NewLC(*commDb, KEApIspTypeAll, EApBearerTypeAll, KEApSortNameAscending); 
    CApDataHandler* datHand=CApDataHandler::NewLC(*commDb);
    CApAccessPointItem* apItem = CApAccessPointItem::NewLC();
    TUint32 iap=-1;
    ***iIapConnection->GetActiveIap(iap);
    TBool repeat = apSelect->MoveToFirst();
    while(repeat)
    {
    TInt id=apSelect->Uid();
    datHand->AccessPointDataL(id, *apItem);
    TUint32 iapId;
    apItem->ReadUint(EApWapIap, iapId);
    if(iapId==iap)
    {
    apItem->ReadTextL(EApWapGatewayAddress, wapGateway);
    repeat=EFalse;
    }
    else
    repeat=apSelect->MoveNext();
    }
    CleanupStack::PopAndDestroy(4); //apS
    if i am right in line marked *** we get current opened connection. this possible when connection already opened before...
    but how obtain wap gateway IP address in situation when program just starts connection and user chooses access point from system popup window?

    or please explain me full process of connection to WAP - maybe I am not understand something....
    ==================================
    Yuri M. Bogak
    Last edited by bogakym; 2004-01-29 at 13:42.

  8. #8
    Regular Contributor
    Join Date
    Apr 2003
    Location
    Germany
    Posts
    94
    I prefer the following code for getting the gateway IP since it doesn't require etelbgsm.h, requires less libraries and has less overhead.

    TBool CConnectionMonitor::GetWapGatewayAddressL( TBuf8<16>& l_TBuf_WapGatewayIP )
    {
    // init
    TBool l_B_Found = EFalse;
    l_TBuf_WapGatewayIP.SetLength( 0 );
    l_TBuf_WapGatewayIP.Append( _L( "0.0.0.0" ) );

    // get active IAP ID
    TUint32 l_U32_ActiveIapID = 0;
    User::LeaveIfError( m_pCIntConnectionInitiator->GetActiveIap( aIAPId ) );

    // open database
    CCommsDatabase* l_pCCommsDatabase = CCommsDatabase::NewL( EDatabaseTypeUnspecified ); // EDatabaseTypeIAP
    CleanupStack::PushL( l_pCCommsDatabase );
    CCommsDbTableView* l_pCCommsDbTableView = l_pCCommsDatabase->OpenTableLC( TPtrC( WAP_IP_BEARER ) );

    // step through data
    while( l_pCCommsDbTableView->GotoNextRecord( ) == KErrNone )
    {
    TUint32 l_U32_IapID = 0;
    l_pCCommsDbTableView->ReadUintL( TPtrC( WAP_IAP ), l_U32_IapID );

    if( l_U32_ActiveIapID == l_U32_IapID )
    {
    l_B_Found = ETrue;
    TBuf8<40> l_TBuf8_Tmp;

    l_pCCommsDbTableView->ReadTextL( TPtrC( WAP_GATEWAY_ADDRESS ), l_TBuf8_Tmp );

    if( l_TBuf8_Tmp.Length( ) )
    {
    // copy the IP address
    l_TBuf_WapGatewayIP.SetLength( 0 );
    for( TInt i = 0; i < l_TBuf8_Tmp.Length( ) && l_TBuf_WapGatewayIP.Length( ) < l_TBuf_WapGatewayIP.MaxLength( ); i++ )
    {
    const TUint8 l_U8_Char = l_TBuf8_Tmp[i];
    if( l_U8_Char )
    {
    l_TBuf_WapGatewayIP.Append( l_U8_Char );
    }
    }
    }

    break;
    }
    }

    CleanupStack::PopAndDestroy(2);

    return l_B_Found;
    }

Posting Permissions

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