×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Aug 2008
    Posts
    3

    Question Access Point Connection Problem on N96... Help!

    Hi,

    I am working on a project where we use the RConnection object to manage Wi-Fi and GPRS connections. Our application needs to run on MR, FP1 and FP2 phones, so we use the backward compatibility feature of the Symbian OS and build against the S60 3rd Edition SDK (Symbian OS 9.1).

    So far all phones on which we tested worked perfectly with respect to connection management except the N96. The connection attempts always results in connection failures. The test environment is always the same and the access points used to test with the N96 are exactly the same as with all other phones so signal quality is not in cause. Furthermore, the access points are perfectly useable by the phone's browser.

    The following describes with more details what we have experienced.

    We synchronize our application's known access points with the phone's database and this seems to work perfectly since all configured access points are listed in our application. Lets say that there are access points with IDs 9 and 10.

    When we scan the air for the available access points, an access point with ID 11 is found. We cannot connect to it, since it is not configured in the phone's database nor in our application. Yet one of the two known access point is available at that time (this is known for the test environment). Why is this unknown access point returned ?

    The application offers the possibility to select the access point to which it should connect and when it is told to attempt a connection to AP ID 9, the connection succeeds. But even though this access point is WLAN and is properly configured as such, the phone indicates that it connects in GPRS. Once the connection is established the signal strength level is monitored. Upon the first report, the signal strength is reported as low (> 90).

    Why is the access point connected in GPRS? And, why is this signal strength value returned since we are very close to the access point.

    At other times a connection attempt done in the exact same way as the last point will result in a failure of the RConnection::Start() method. The returned error is TRequestStatus(-2). The access point is available and close to the phone.

    The API used for those various operations are:

    - Database synchronization:
    - CCommsDatabase
    - CApSelect

    - Access point scanning:
    - RConnectionMonitor::GetPckgAttribute(EBearerIdWLAN, 0, KIapAvailability, iapBuf, status)

    - Access point connection:
    - TCommDbConnPref::SetIapId,
    - TCommDbConnPref::SetBearerSet
    - RSocketServ::Connect(40),
    - RSocketServer::ShareAuto(),
    - RConnection::Open(sockerServer)
    - RConnection::Start()

    - Access point signal strength monitoring:
    - RConnectionMonitor::GetConnectionCount
    - RConnectionMonitor::GetConnectionInfo
    - RConnectionMonitor::GetUintAttribute(uConnectionId, 0, KIAPId, uIApId, status)
    - RConnectionMonitor::GetPckgAttribute(uConnectionId, 0, KClientInfo, clientBuf, status)
    - RConnectionMonitor::GetIntAttribute(uConnectionId, 0, KSignalStrength, nStrength, status)

    Is there known issues or has anyone ever got any problems with any of these APIs on the N96 phone ?

    Our N96 phone info is as follows:
    Software version: 11.101
    Software version date: 23-09-2008
    Custom version: 11.101.098.1
    Custom version date: 23-09-2008
    Language set 002
    Model: N96
    Type: RM-247

    Thanks for your help,
    Regards,

    Alexandre Senechal

  2. #2
    Regular Contributor
    Join Date
    Feb 2008
    Location
    Pune, India
    Posts
    340

    Re: Access Point Connection Problem on N96... Help!

    As you said, the browser is able to use the access point perfectly. Could you try using the following piece of code and see if a connection is established?

    Code:
    TUint32 iapId(0);
    
    	CCommsDatabase* cdb = CCommsDatabase::NewL(EDatabaseTypeIAP);
    	CleanupStack::PushL(cdb);
    
    	CCommsDbConnectionPrefTableView* commDBView = cdb->OpenConnectionPrefTableInRankOrderLC(ECommDbConnectionDirectionOutgoing);
    	if(commDBView->GotoFirstRecord() == KErrNone)
    	{
    		CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref pref;
    		commDBView->ReadConnectionPreferenceL(pref);
    		iapId = pref.iBearer.iIapId;
    	}
    
    	CleanupStack::PopAndDestroy(commDBView);
    	CleanupStack::PopAndDestroy(cdb);
    Regards,
    Sainagakishore Srikantham (Kishore)

    Don't Hope, KNOW!!! ---------- Visit me at http://ssnkishore.blogspot.com ----------

  3. #3
    Registered User
    Join Date
    Aug 2008
    Posts
    3

    Re: Access Point Connection Problem on N96... Help!

    Hi,

    Thanks for the reply, I will try that and get back to you.

    Regards,
    Alexandre Senechal

  4. #4
    Registered User
    Join Date
    Sep 2006
    Posts
    33

    Re: Access Point Connection Problem on N96... Help!

    I have the same problem on Nokia6210S/N96(Symbian OS 9.3).
    http://discussion.forum.nokia.com/fo...d.php?t=147397

    Code:
    void TestL()
    {
        User::LeaveIfError(iSocketServ.Connect());
        CleanupClosePushL(iSocketServ);  // iSocketServ
        User::LeaveIfError(iConn.Open(iSocketServ));
        CleanupClosePushL(iConn);        // iConn
    
        TRequestStatus aStatus;
        TCommDbConnPref prefs;
        prefs.SetDialogPreference(ECommDbDialogPrefPrompt);
        prefs.SetBearerSet(KCommDbBearerUnknown);
        prefs.SetDirection(ECommDbConnectionDirectionOutgoing);
        iConn.Start(prefs, aStatus);
        User::WaitForRequest(aStatus);
        if (aStatus.Int() != KErrNone)   // -4145/KErrGsmMMNetworkFailure
        {
        	CleanupStack::PopAndDestroy(2);	 // iConn, iSocketServ
        	User::LeaveIfError(aStatus.Int());
        }
    
        iAddress.SetPort(8084);
        iAddress.SetAddress(INET_ADDR(10, 254, 2, 10));
    
        User::LeaveIfError(iSocket.Open(iSocketServ, KAfInet, KSockStream, KProtocolInetTcp, iConn));
        iSocket.Connect(iAddress, aStatus);
        User::WaitForRequest(aStatus);
        iSocket.Close();
    
        CleanupStack::PopAndDestroy(2);    // iConn, iSocketServ
    }
    Last edited by ##^_^##; 2008-11-17 at 01:34.

  5. #5
    Registered User
    Join Date
    Aug 2008
    Posts
    3

    Re: Access Point Connection Problem on N96... Help!

    Hi,

    Just to update this issue, I did not test this yet. I should do so soon.

    Thanks,

    Alexandre Senechal

    EDIT:
    After testing it seems that the CAPSelect API does not return the correct ID for the access points it lists. The proposed code worked to connect the access point since it seems to return the proper ID.

    Thanks for your help.

    ---
    Alexandre Senechal
    Last edited by asenechalM5T; 2008-11-28 at 20:16. Reason: Update status

Similar Threads

  1. Problem MMC+USB Connection
    By Fede81 in forum Symbian
    Replies: 1
    Last Post: 2007-06-14, 06:13
  2. Problem MMC+USB Connection
    By Fede81 in forum General Development Questions
    Replies: 3
    Last Post: 2006-07-19, 15:21
  3. Access point creation problem
    By stv2005 in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2005-05-11, 18:25
  4. Access Point Problem on Emulator
    By IlyaEck in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2004-09-06, 01:32
  5. 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

Posting Permissions

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