MobInfo API

Login to reply to this topic.
Sun, 2004-10-24 14:13
Joined: 2004-05-24
Forum posts: 23
I may have missed this being discussed, but looking at symbian.com, I just found the MobInfo API.

MobInfo lets you:
Get current battery level
Get current network state (flight mode, signal strength, base station ID, etc)
IMEI
IMSI
Own phone number

It is specifically for Symbian 7.0. I have not yet tried it personally; unfortunately, it's a Windows .EXE installer so I need to get to a windows box before I can look at it.

It's at:
http://www.symbian.com/developer/development/syslibs.html#mobinfo

Wed, 2004-12-08 06:38
Joined: 2004-08-16
Forum posts: 98
MobInfo API
Sorry!
When I use the API provided by symbian website, I can't new an object of CMobileInfo. It will throw out "KERN-EXEC 3".
Who can tell me why ?
I have include <mobileinfo.h> and mobileinfo.lib in my projects, and installed the required sis file "mobinfo.sis" provided by symbian.
Thu, 2004-12-09 23:18
tanoshimi (not verified)
Forum posts: 2019
MobInfo API
The API works fine for me - try the example app available from:
http://developer.sonyericsson.com/getDocument.do?docId=68337

Notice though that the source is riddled with errors, so you might need to remove references to activehello.rsg etc. before it will actually compile.
Mon, 2005-01-24 11:51
Joined: 2005-01-04
Forum posts: 3
Mobinfo: does it works on series 60 without UIQ?
hi all,
I have been able to compile the mobinfo library in my code,
but when i call the GetIMEI() i got an KErrNotFound status code
in return, and the IMEI string is empty.
Though is clearly specified that the library was developed and tested
for 7.0s and UIQ, is there also a version that can be used on normal
series 60 without UIQ?
thanx for the feedback
sandro
Fri, 2005-01-28 12:20
Joined: 2004-12-29
Forum posts: 19
MobInfo API
Hi Sandro

The current mobinfo is for UIQ only!
Future versions might work on Series60.

Here is another mobinfo app example (though quite basic, but working one Smiley
http://symbianos.org/~andreh/HelloWorld.zip

For getting the same functionality as mobinfo in serie60 please have a look for:
etelagsm.h
etelbgsm.h
etelmm.h
(etel 3rd party api).h
Above is depending on verion and feature pack of your Series SDK used. Plus that some of the headers are not public, but can be found in the forum.

Cheers,

Andre
Mon, 2005-01-31 20:06
Joined: 2005-01-04
Forum posts: 3
ok, i did it, thanx for the info
Thank you for the answer Andre,
I figured out how to get the imsi on nokia 6630, another thread from the very useful newLc had an example on how to use etelagsm, even if i had to fight using the headers because in the libraries delivered with sdk 2.0 the functions needed are actually obfuscated to normal use by appending a nice NS postfix to the name of the methods needed.
Anyway, it works on 6630 and fortunately it returns lenght 0 on 6600 so is possible to use the apis on both phones, and actually use the info when available on 6630.
sandro
Wed, 2005-02-02 05:33
Joined: 2004-08-16
Forum posts: 98
MobInfo API
Hi, Zanisan
Can you elaborate how to get the imsi on nokia 6630 detailly. i can't get some header files.
Thanks !
Wed, 2005-02-02 18:12
Joined: 2005-01-04
Forum posts: 3
how to use gsmadv.dll to get imsi
you can get the imsi on nokia 6630 with the gsmadv library together with
etelagsm.h

etelagsm.h apis are not public, it describes extra member functions available inside the gsmadv.dll distributed with 6600 and 6630.
To obtain the header file I had to download a sample application
"sinfo60.zip" (search with google where to download it) but this
sample application is not retrieving the IMSI, so I just got the
headers files.

To use them i copied some code from
http://forum.newlc.com/viewtopic.php?t=3904&highlight=radvgsmphone

this a snipplet from my code: i copied the header in a local directory called
"extra"
..
#include "..\..\extra\etelagsm.h"
...
void GetImeiOrImsi(TDes8& aValue, TBool& isImsi)
{
#ifndef __WINS__
   // try first to read the IMSI
   RTelServer iServer;
   RAdvGsmPhone iPhone;
   RTelServer::TPhoneInfo info;

   // Connect to the telephony server and load the TSY.
   User::LeaveIfError(iServer.Connect());
   CleanupClosePushL(iServer);

   _LIT(KTsyName, "phonetsy.tsy");
   User::LeaveIfError(iServer.LoadPhoneModule(KTsyName));

   // Get the details for the first (and only) phone.
   User::LeaveIfError(iServer.GetPhoneInfo(0, info));

   // Open the phone.
   User::LeaveIfError(iPhone.Open(iServer, info.iName));
   CleanupClosePushL(iPhone);

   TRequestStatus status;
   MAdvGsmPhoneInformation::TSubscriberId myId;

        // get the imsi
   iPhone.GetSubscriberIdNS(status, myId);

   _LIT8(KFormatDecimal, "size of subscriberId:%u");
   TBuf8<200> imeiString;
   imeiString.Format(KFormatDecimal,myId.Length());
   // trace it ReportMessage(imeiString);   

   TBuf<200> x;
   TInt i=0;
   aValue.Zero();
   _LIT8(KFlwFormat,"%u");
   for(i=0; i<myId.Length();i++)
   {
      aValue.Append(myId[i]);
   }
   // trace it ReportMessage(aValue);

   CleanupStack::PopAndDestroy(&iPhone);
   User::LeaveIfError(iServer.UnloadPhoneModule(KTsyName));

   CleanupStack::PopAndDestroy(&iServer);

   if (myId.Length() == 0)
   {
      // get the imei then
      // This only works on target machine
      TPlpVariantMachineId imei;
      PlpVariant::GetMachineIdL(imei);
      aValue.Copy(imei);
      isImsi = EFalse;
   }
   else
   {
      // imsi is already inside aValue
      isImsi = ETrue;
   }

#else
   // Return a fake IMEI when working on emulator
   _LIT8(KEmulatorImei, "123456789012345");
   aValue.Copy(KEmulatorImei);
   isImsi = EFalse;
#endif
}

....

this code do not compile with original etelagsm because the important
function:
iPhone.GetSubscriberId(status, myId); is not defined like this
inside the real gsmadv.dll that is inside the phones, how did i know?
i decompiled the gsmadv.lib library delivered with the sdk 2.0

I found on the internet how to extract the list of functions declared inside
a symbian library:
read
     http://www.newlc.com/article.php3?id_article=530

then by ispecting the extracted file i discovered that the members i needed
(the one not public) were still exported and available but symbian (or nokia?)  obfuscated their names by adding "NS" at the end¨
So I renamed the member (iPhone.GetSubscriberId->iPhone.GetSubscriberIdNS)
and I had to change the name also inside the original header file (etelagsm.h)
doing this is working on 6630 and return lenght 0 on 6600.

cheers
sandro
Wed, 2005-04-27 18:39
Joined: 2005-02-24
Forum posts: 276
MobInfo API
Do somebody know how I could access mobinfo.dll functionalities from a java program? I know that PersonalJava CAN access C++ libraries, but I don't understand HOW.

I need to know exact battery status, as my UIQ phone (Motorola A1000) only shows 4 values: empty, full, 1/3 and 2/3, while other phones like p800/p900 shows exact percentage, very more useful.

-- JumpJack --

Mon, 2005-05-16 14:26
Joined: 2005-05-16
Forum posts: 6
Cell Id
hi Jumpjack are you able to call a sis file in J2ME
Fri, 2005-05-20 08:01
Joined: 2005-02-24
Forum posts: 276
Re: Cell Id
Quote from: citu_rai
hi Jumpjack are you able to call a sis file in J2ME
I'm not exactly talking about J2ME but PersonalJava.
What do you mean by "call a SIS file"? SIS file is an archive, just like a ZIP file.

-- JumpJack --

Tue, 2005-06-21 04:28
Joined: 2005-05-24
Forum posts: 20
Re: MobInfo API
hi andreh, i tried compiling your code, but i can't...
i already installed the mobinfo installer
but i keep on getting this error ..     
"\Symbian\Series60_1_2_B\EPOC32\RELEASE\WINSB\UDEB\MOBINFO.LIB"' does not exist - don't know how to make it
what could possibly be wrong?

btw, pardon me for asking that.. i'm still a beginner.. Cheezy

anyway, tnx!
Wed, 2005-08-17 13:25
Joined: 2004-01-14
Forum posts: 20
Re: MobInfo API-Need Help
Hi All,

Please let me know, where I could get gsmadv.lib, compatible with 6630 or I would be great if some one can send it to me.
It is very urgent.

Thanks in Advance
Irfan

ik_er@yahoo.co.in



Thu, 2005-08-18 06:46
Joined: 2005-02-11
Forum posts: 214
Re: MobInfo API
You can copy them over from Symbian 6.1 SDK. They work OK (at least the ARMI one does)

"I only know that I know nothing." (Socrates)

Thu, 2005-09-15 19:56
Joined: 2005-02-24
Forum posts: 276
Re: MobInfo API
How to implement new features of just released MOBINFO.DLL to read battery charge level?
http://www.symbian.com/developer/development/syslibs.html#mobinfo

-- JumpJack --

Fri, 2005-09-16 17:42
Joined: 2005-02-24
Forum posts: 276
Re: MobInfo API
Quote from: tanoshimi
The API works fine for me - try the example app available from:
http://developer.sonyericsson.com/getDocument.do?docId=68337

Notice though that the source is riddled with errors, so you might need to remove references to activehello.rsg etc. before it will actually compile.
restoring old post...

I can't compile this example:
http://developer.sonyericsson.com/getDocument.do?docId=68337

error:
Quote
make[1]: *** No rule to make target `\Symbian\UIQ_21\EPOC32\INCLUDE\ACTIVEHELLO.RSG', needed by `..\..\..\EPOC32\BUILD\SYMBIAN\UIQ_21\UIQEXAMPLES\MOBINFOTEST\GROUP\MOBINFOTEST\ARMI\UREL\CMOBINFOTESTAPPVIEW.o'.  Stop.
make: *** [TARGETMOBINFOTEST] Error 2

Any clue?

I created the ABLD.BAT before using BLDMAKE BLDFILES as stated in that page, but then the ABLD.... command gives this error.

-- JumpJack --

  • Login to reply to this topic.