Hello everyone,
I working on Nokia N95. I would like to get the Timing Advance parameter in my application. I know that it is not possible by CTelephony class. I used it a lot to get other things but there is no TA available.
I search internet and this forum as well and I found some post about it. Unfortunately there was no solution also none of these informations regarding to Nokia N95. All posts were pretty old as well.
I hope that maybe something changed since that time
My idea is to try send AT command to my device. I used the following code:
_LIT(PDD_NAME,"EUART1");
_LIT(LDD_NAME,"ECOMM");
_LIT(KCommModuleName, "dataport");
_LIT(KPort, "DATAPORT::1");
_LIT8(KATCommand,"AT+CREG\r\n");
User::LoadPhysicalDevice (PDD_NAME);
User::LoadLogicalDevice (LDD_NAME);
StartC32();
User::LeaveIfError(iCommServer.Connect());
iCommServer.LoadCommModule(KCommModuleName);
User::LeaveIfError(iComm.Open (iCommServer, KPort, ECommShared));
//Wait for some time
User::After(2000000);
TCommConfig portSettings;
iComm.Config (portSettings);
portSettings().iRate = EBps19200;
portSettings().iParity = EParityNone;
portSettings().iDataBits = EData8;
portSettings().iStopBits = EStop1;
portSettings().iFifo = EFifoEnable;
portSettings().iHandshake = (KConfigObeyXoff | KConfigSendXoff);
portSettings().iTerminator[0] = 10;
portSettings().iTerminatorCount = 1;
User::LeaveIfError(iComm.SetConfig (portSettings));
iComm.SetSignals (KSignalDTR, 0);
iComm.SetSignals (KSignalRTS, 0);
TInt curlenth = iComm.ReceiveBufferLength ();
iComm.SetReceiveBufferLength (4096);
curlenth = iComm.ReceiveBufferLength ();
TRequestStatus writeStatus;
TRequestStatus readStatus;
iComm.Write(writeStatus, KATCommand);
User::WaitForRequest(writeStatus);
User::After(1000000);
TBuf8<128> iResponseDes;
iResponseDes.Zero();
TInt counter = 0;
while(counter<2){
iComm.ReadOneOrMore(readStatus, iResponseDes);
User::WaitForRequest(readStatus);
counter++;
User::After(500*1000);
}
iComm.Close();
iCommServer();
I put some logs (which are not shown above). I can see that just after iComm is oppened I get the following pop up message on the screen:
"Unable to execute file for security reasons"
Can someone tell if I can go around this "security reasons"?? Maybe someone faced this problem before and already got the answer.
Or perhaps there is better and faster way to get the TA parameter?? Or there is just no way to find it out??
Thank You very much for Your help
Best Regards
songoku


Reply With Quote

