Showing posts with label CLI. Show all posts
Showing posts with label CLI. Show all posts

Saturday, August 19, 2006

Getting the Current Cell Id using Symbian S60

What you need:
Series 60 SDK
Communicator 9200 SDK version 0.9 or higher
etel.h from Communicator 9200 SDK
etelbgsm.h from Communicator 9200 SDK

Instructions:
Copy etel.h and etelbgsm.h to the \Symbian\6.1\Series60\Epoc32\Include directory.

Link your app to gsmbas.lib and etel.lib.

Use this code:

 RBasicGsmPhone phone;
RTelServer server;

User::LeaveIfError( server.Connect() );
// load a phone profile
_LIT(KGsmModuleName, "phonetsy.tsy");
User::LeaveIfError( server.LoadPhoneModule( KGsmModuleName ) );

// initialize the phone object
RTelServer::TPhoneInfo info;
User::LeaveIfError( server.GetPhoneInfo( 0, info ) );
User::LeaveIfError( phone.Open( server, info.iName ) );

MBasicGsmPhoneNetwork::TCurrentNetworkInfo netinfo;
User::LeaveIfError( phone.GetCurrentNetworkInfo( netinfo ) );

Now you should be able to access the fields of
MBasicGsmPhoneNetwork::TCurrentNetworkInfo
which are
.iCellId
.iLocationAreaCode
.iNetworkInfo.iShortName

Once you have grabbed the info use this code to clean up:

phone.Close();
server.UnloadPhoneModule( KGsmModuleName );

server.Close();

All the code should work for the 6600 as well. You have the option of
just compiling with the 1.2 SDK or copying the headers to the 2.0 SDK .

Explore the other functions and data available through these objects as well. The headers should provide you with enough information to figure out what they are. Not all of them are completely implemented. According to a Forum Nokia post you can get to the information by:

  • ManufacturerId, Serial No: GetPhoneInfo()
  • BER, battery status: GetX - async version
  • Signal Strength: SignalStrengthNotification()

Use the NotifyChangeOfCurrentNetwork, so that works as well.


Wednesday, August 02, 2006

Color-Coded Caller ID


For people who still have land-lines, this Color-Call caller ID should be quite useful. First you set it up by assigning color groups to people who call in—blue for family, green for friends, red for work, for example. Then, when people in these groups call in, the caller ID will light up with that color, allowing you to decide from across the room whether you want to get the call. Scrolling colors indicate an unassigned, unknown or blocked call. Great for when you're watching TV and don't want to get up, or if you're taking a nap and you're too groggy to read the actual caller ID numbers. Available for $50 and holds 100 numbers and 30 missed calls.