Problem with fetching IMEI number
| Thu, 2006-11-09 08:37 | |
|
I want to fetch the IMEI number from Series 60 phones.
My code snippet: _LIT(KGsmModuleName, "phonetsy.tsy"); // Connect to the ETel server RTelServer telServer; User::LeaveIfError(telServer.Connect()); CleanupClosePushL(telServer); // Make sure our TSY is loaded User::LeaveIfError(telServer.LoadPhoneModule(KGsmModuleName)); // Get the phone name RTelServer::TPhoneInfo phoneInfo; User::LeaveIfError(telServer.GetPhoneInfo(0,phoneInfo)); // Open the phone by name RBasicGsmPhone phone; User::LeaveIfError(phone.Open(telServer,phoneInfo.iName)); CleanupClosePushL(phone); // Get Phone Info RBasicGsmPhone::TId id; User::LeaveIfError(phone.GetGsmPhoneId(id)); //// Close the Phone handle, no longer //needed CleanupStack::PopAndDestroy(); // phone TBuf<20> imeiNumber; imeiNumber.Zero(); imeiNumber.AppendNum(id.iSerialNumber); telServer.UnloadPhoneModule(KGsmModuleName); CleanupStack::PopAndDestroy(); // telServer //-------------------------------------------------- The error occurs at the highlighted line. It is not allowing me to create an object of RBasicGsmPhone. This code gives no error when I run in the Series 60 emulator but application closes in the 6600 phone. I have included the etel.h and etelbgsm.h files as well as linked to etel.lib and gsmbas.lib. I took etelbgsm.h and gsmbas.lib from Nokia 9200 Communicator SDK. Please help me solve my error...I am terribly stuck up. |
|






Forum posts: 235
try with some higher version of this lib.
Or is it that Nk6600 doesn't have this lib atall?
Forum posts: 214
PlpVariant::GetMachineIdL(imei);
"I only know that I know nothing." (Socrates)