×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Mar 2004
    Posts
    22

    (Series 60 2.0) KErrNotFound on RConnect.Start using CCommsDatabase defaults? (long)

    Hello, I've run into a problem that has me stumped, and I'm hoping someone on this forum can help.

    I'm trying to connect to the network using the defaults in the CommDB on the Series 60 2.1b CW emulator. I am able to connect to my email server using the Messages application. I am also able to connect to web sites using the Services application. Both of these appear to use the "Default WAP Access Point" settings to connect.

    However, when I try to connect to an HTTP server using RConnection and/or RHttpSession, I consistently get a -1 error (KErrNotFound) when I try to open the link. I've tried several different methods:

    1. Using the Example HTTP Client provided by Nokia (ExampleClientEngine.cpp). Here, opening the actual network connection fails with a leave code of KErrNotFound at the line: iTransaction = iSession.OpenTransactionL

    2. Using the CommDb defaults with RConnection:

    // Connect to the socket server
    RSocketServ iSockServ.
    err = iSockServ.Connect();
    if (KErrNone != err)
    User::Leave(err);

    // Open an RConnection object. Note that you must provide the RSocketServ object
    RConnection iConnection;
    err = iConnection.Open(iSockServ,0);
    if (KErrNone != err)
    {
    iSockServ.Close();
    User::Leave(err);
    }
    err = iConnection.Start(); //#### this ALWAYS returns KErrNotFound

    3. Loading default prefs from CommDB and then passing those to RConnect::Start:

    RConnection iConnection;
    TCommDbConnPref prefs;
    CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref basePrefs;

    CCommsDatabase* pCommDb = CCommsDatabase::NewL(ETrue);
    CleanupStack::PushL(pCommDb);

    CCommsDbConnectionPrefTableView* pCommView =
    pCommDb->OpenConnectionPrefTableInRankOrderLC(ECommDbConnectionDirectionOutgoing);

    err = pCommView->GotoFirstRecord();
    if (KErrNone == err)
    pCommView->ReadConnectionPreferenceL(basePrefs);
    //else leave if err

    // Create overrides

    prefs.SetDirection(basePrefs.iDirection);
    prefs.SetDialogPreference(basePrefs.iDialogPref);
    prefs.SetBearerSet(basePrefs.iBearer.iBearerSet);

    prefs.SetIapId(basePrefs.iBearer.iIapId);

    err = iConnection.Start(prefs); //### this ALWAYS returns KErrNotFound

    4. Using CApSelect to load the default IAP prefs:

    CApSelect* pApSelect = CApSelect::NewLC(*pCommDb, KEApIspTypeAll,
    EApBearerTypeAll,KEApSortNameAscending);

    TBool bSuccess = pApSelect->MoveToFirst();
    if (bSuccess)
    {
    TBuf8<64> apName;
    apName.Copy(pApSelect->Name( )); //### this appears to be the same AP name used by Services and Messages

    TCommsDbIspType apType = pApSelect->Type();
    TApBearerType bearType = pApSelect->BearerType();
    uidWAP = pApSelect->Uid();

    CApUtils* pApUtils = CApUtils::NewLC(*pCommDb);

    uidIAP = pApUtils->IapIdFromWapIdL(uidWAP); //### this returns the same IAP ID as method 3 above

    CleanupStack::PopAndDestroy(pApUtils);

    }

    CCommsDbConnectionPrefTableView* pCommView =
    pCommDb->OpenConnectionPrefTableLC();

    err = pCommView->GotoFirstRecord();
    while (KErrNone == err)
    {
    pCommView->ReadConnectionPreferenceL(basePrefs);

    if (basePrefs.iBearer.iIapId == uidIAP)
    break;

    err = pCommView->GotoNextRecord();
    }

    CleanupStack::PopAndDestroy(pCommView);

    //..... Load basePrefs into prefs as in method 3 above

    err = iConnection.Start(prefs); //### this ALWAYS returns KErrNotFound

    5. Using RGenericAgent instead of RConnect:

    RGenericAgent myAgent;

    err = myAgent.Open();
    if (KErrNone != err)
    User::Leave(err);

    err = myAgent.StartOutgoing(); //#### this ALWAYS returns KErrNotFound
    if ((KErrNone != err) && (KErrAlreadyExists != err))
    User::Leave(err);

    I've attached what I think are the relevant portions of my ced.cfg file (generated by ceddump) below. Again, these settings work with both the Services application and the Messages application (for IMAP email). Can anyone provide any suggestions or insight?

    Thanks in advance for any help,

    Todd

    --
    Todd Courtois
    todd@rawthought.com
    http://www.kablog.org/



    ############################################################
    ## AUTO-GENERATED CONFIGURATION FILE
    ## CommDB Database Dump Utility
    ## 1.1
    ############################################################

    ############################################################
    ## Network
    ##
    [Network]
    ADD_SECTION
    # COMMDB_ID = 1
    Name=Intranet
    FIELD_COUNT=1
    END_ADD



    ############################################################
    ## LANBearer
    ##
    [LANBearer]
    ADD_SECTION
    # COMMDB_ID = 1
    Name=LAN_bearer_1
    Agent=NullAgt
    IfName=ethint
    LDDName=ethercard
    PDDName=etherwins
    LastSocketActivityTimeout=600
    LastSessionClosedTimeout=600
    LastSocketClosedTimeout=600
    FIELD_COUNT=8
    END_ADD

    ############################################################
    ## GlobalSettings
    ##
    ## WAPAccessPoint=3
    [GlobalSettings]
    ADD_SECTION
    RedialAttempts=3
    SmsBearer=2
    SmsReceiveMode=2
    GPRSAttachMode=1
    AcceptIncomingGprs=1
    GPRSClassCBearer=GSM
    ConnectionAttempts=2
    ModemForDataAndFax=2
    ModemForPhoneServicesAndSMS=2
    LocationForDataAndFax=2
    LocationForPhoneServicesAndSMS=2
    DefaultNetwork=1
    BearerAvailabilityCheckTSY=MM
    FIELD_COUNT=13
    END_ADD


    ############################################################
    ## OutgoingGPRS
    ##
    [OutgoingGPRS]
    ADD_SECTION
    # COMMDB_ID = 1
    Name=GPRS01
    APN=gprs01APNPlaceHolder
    PDPType=IPV4
    ReqPrecedence=0
    ReqDelay=0
    ReqReliability=0
    ReqPeakThroughput=0
    ReqMeanThroughput=0
    MinPrecedence=0
    MinDelay=0
    MinReliability=0
    MinPeakThroughput=0
    MinMeanThroughput=0
    DataCompression=FALSE
    HeaderCompression=FALSE
    GprsUseEdge=FALSE
    AnonymousAccess=FALSE
    IfNetworks=ip
    IfPromptForAuth=FALSE
    AuthRetries=1
    IpDNSAddrFromServer=FALSE
    EnableLCPExtension=FALSE
    DisablePlainTextAuth=FALSE
    IpAddrFromServer=TRUE
    GprsAccessPointType=0
    QosWarningTimeout=0
    FIELD_COUNT=26
    END_ADD


    ############################################################
    ## DefaultGPRS
    ##
    [DefaultGPRS]
    ADD_SECTION
    # COMMDB_ID = 1
    Name=Dummy Default GPRS Settings
    Usage=1
    APN=Access point name
    PDPType=IPV6
    PDPAddress=www.wid.com
    Precedence=1
    Delay=1
    Reliability=1
    PeakThroughput=1
    MeanThroughput=1
    MinPrecedence=1
    MinDelay=1
    MinReliability=1
    MinPeakThroughput=1
    MinMeanThroughput=1
    DataCompression=TRUE
    HeaderCompression=TRUE
    GprsUseEdge=FALSE
    AnonymousAccess=TRUE
    FIELD_COUNT=19
    END_ADD



    ############################################################
    ## LANService
    ##
    [LANService]
    ADD_SECTION
    # COMMDB_ID = 1
    Name=LAN_service_1
    IfNetworks=ip,ip6
    IpNetMask=255.255.255.0
    IpGateway=192.168.1.1
    IpAddrFromServer=FALSE
    IpAddr=192.168.1.7
    IpDNSAddrFromServer=FALSE
    IpNameServer1=64.81.79.2
    IpNameServer2=216.231.41.2
    FIELD_COUNT=9
    END_ADD


    ############################################################
    ## IAP
    ##
    [IAP]
    ADD_SECTION
    # COMMDB_ID = 1
    Name=LAN_IAP_1
    IAPService=1
    IAPServiceType=LANService
    IAPBearer=1
    IAPBearerType=LANBearer
    IAPNetwork=1
    IAPNetworkWeighting=0
    Location=3
    FIELD_COUNT=8
    END_ADD

    ADD_SECTION
    # COMMDB_ID = 2
    Name=NTRas GPRS
    IAPService=1
    IAPServiceType=OutgoingGPRS
    IAPBearer=2
    IAPBearerType=ModemBearer
    IAPNetwork=1
    IAPNetworkWeighting=0
    Location=4
    FIELD_COUNT=8
    END_ADD


    ############################################################
    ## ConnectionPreferences
    ##
    [ConnectionPreferences]
    ADD_SECTION
    Ranking=1
    Direction=OUTGOING
    DialogPref=PROMPT
    BearerSet=LAN
    IAP=1
    FIELD_COUNT=5
    END_ADD






    ############################################################
    ## Proxies
    ##
    [Proxies]
    ADD_SECTION
    # COMMDB_ID = 1
    ISP=2
    ProxyServiceType=DialOutISP
    UseProxyServer=FALSE
    ProxyServerName=www.dummyproxy.com
    ProtocolName=http
    PortNumber=80
    Exceptions=www.dummyproxy.com/exception
    FIELD_COUNT=7
    END_ADD



    ############################################################
    ## WAPAccessPoint
    ##
    [WAPAccessPoint]
    ADD_TEMPLATE
    Name=Default Dial In ISP
    CurrentBearer=WAPIPBearer
    FIELD_COUNT=2
    END_TEMPLATE


    ADD_SECTION
    # COMMDB_ID = 2 ?
    Name=Google WAP Settings
    CurrentBearer=WAPIPBearer
    StartPage=wap.google.com
    FIELD_COUNT=3
    END_ADD

    ADD_SECTION
    # COMMDB_ID = 3 ?
    Name=Happy WAP Settings
    CurrentBearer=WAPIPBearer
    StartPage=www.wapstart.com
    FIELD_COUNT=3
    END_ADD





    ############################################################
    ## WAPIPBearer
    ##
    [WAPIPBearer]
    ADD_TEMPLATE
    AccessPointId=0
    IAP=0
    WSPOption=CONNECTIONLESS
    Security=FALSE
    ProxyPortNumber=0
    FIELD_COUNT=5
    END_TEMPLATE



    ## The following seems to get inserted ALWAYS

    ADD_SECTION
    # COMMDB_ID = 2
    AccessPointId=2
    GatewayAddress=www.wapgateway.com
    IAP=1
    WSPOption=CONNECTIONORIENTED
    Security=FALSE
    ProxyPortNumber=1
    FIELD_COUNT=6
    END_ADD


    ############################################################
    ## WAPSMSBearer
    ##
    [WAPSMSBearer]
    ADD_TEMPLATE
    AccessPointId=0
    WSPOption=CONNECTIONLESS
    Security=FALSE
    FIELD_COUNT=3
    END_TEMPLATE

    ADD_SECTION
    # COMMDB_ID = 2
    AccessPointId=2
    GatewayAddress=+4412345678901
    ServiceCentreAddress=+442071234567
    WSPOption=CONNECTIONORIENTED
    Security=FALSE
    FIELD_COUNT=5
    END_ADD

  2. #2
    Registered User
    Join Date
    Mar 2004
    Posts
    6

    The same problem

    I'm having the same problem. Did you find any solution?

  3. #3
    Regular Contributor
    Join Date
    Sep 2003
    Posts
    169

    Series 60 2.0) KErrNotFound on RConnect.Start using CCommsDatabase defaults? (long)

    Hey,

    I don't think you can use HTTP over a WAP access point. You probably need GPRS access point for that.

    Regards, Aljaz

  4. #4
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    371
    Hello,

    See following posting:

    http://discussion.forum.nokia.com/fo...threadid=41691

    Best Regards,
    Marko / Forum Nokia

Posting Permissions

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