×

Discussion Board

Results 1 to 11 of 11
  1. #1
    Regular Contributor
    Join Date
    Apr 2003
    Posts
    52

    Looking for the IP of the wap gateway

    In order to open a WAP connection, I need to know the IP of the Wap Gateway. The problem is there can be several different settings. I need to know which one is active when the user chooses it with RGenericAgent. I dont know if CApSelect can do that !

  2. #2
    Registered User
    Join Date
    May 2003
    Posts
    30
    This seems to be a frequently asked but as yet unanswered question. It is pretty straight forward so I'm surprised no one has a definitive answer.

    How can you find the IP address of the gateway for the access point so you can use it in a call to:

    iWSPConnection.Open(iWapServ, _GATEWAY_, 9201 ,0 ,EIP ,EFalse);

    TIA!

  3. #3
    Registered User
    Join Date
    Jul 2003
    Posts
    15

    WAP gateway IP address - EPOC

    hi;
    If you are using NOKIA WAP GATEWAY SIMULATOR
    your wap gateway IP address is simply your computer's IP address. I have been able to connect epoc to WAP using NWGS.
    best regards
    Hasan

  4. #4
    Regular Contributor
    Join Date
    Apr 2003
    Posts
    52
    You dont answer my problem
    I want to retrieve the Ip of the gateway used by the WML Browser on the REAL device.

  5. #5
    Registered User
    Join Date
    May 2003
    Posts
    30
    Like this:-

    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

  6. #6
    Regular Contributor
    Join Date
    Apr 2003
    Posts
    52
    Code:
    TUint32 iap=-1;
    seems strange...

  7. #7
    Registered User
    Join Date
    May 2003
    Posts
    30
    indeed ;-)

    Instead, the code should test the result of GetActiveIap() and not bother with the loop if it fails.

    Which leads me on to a different question. Does anyone know how to test for the presence of a Bluetooth or IrDA serial port? Specifically, so that opening an IAP is not attempted if the user is connected to mRouter?

    i.e. I want my app to use the serial port TCP/IP/mRouter passthrough if one is present, and bring up the IAP dialogue if not.

    TIA,
    - John

  8. #8
    Regular Contributor
    Join Date
    Oct 2003
    Location
    England
    Posts
    167

    WAP IP and Settings ingeneral

    Has anyone got any sample code to retrieve other WAP settings - such as DNS Address, Apn, Username and password etc ?

  9. #9
    Registered User
    Join Date
    May 2003
    Posts
    30
    The above code is fine but use other members of TApMember to query for different information about the access point

  10. #10
    Regular Contributor
    Join Date
    Oct 2003
    Location
    England
    Posts
    167

    Tutorials

    Probably a daft question, but are there any tutorials anywhere about this kind of stuff?

  11. #11
    Regular Contributor
    Join Date
    Oct 2003
    Location
    England
    Posts
    167

    iIAPConnection initialisation

    Is this a pointer to a CInitConnectionInitiator ? If so after it has been created with CInitConnectionInitiator::NewL () how is it set up ?

Posting Permissions

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