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.
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.
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
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.
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
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.
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);
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
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.
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.
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..
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.
Forum posts: 98
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.
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.
Forum posts: 3
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
Forum posts: 19
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
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
Forum posts: 3
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
Forum posts: 98
Can you elaborate how to get the imsi on nokia 6630 detailly. i can't get some header files.
Thanks !
Forum posts: 3
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
Forum posts: 274
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 --
Forum posts: 6
Forum posts: 274
What do you mean by "call a SIS file"? SIS file is an archive, just like a ZIP file.
-- JumpJack --
Forum posts: 20
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..
anyway, tnx!
Forum posts: 20
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
Forum posts: 212
"I only know that I know nothing." (Socrates)
Forum posts: 274
http://www.symbian.com/developer/development/syslibs.html#mobinfo
-- JumpJack --
Forum posts: 274
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.
I can't compile this example:
http://developer.sonyericsson.com/getDocument.do?docId=68337
error:
make: *** [TARGETMOBINFOTEST] Error 2
I created the ABLD.BAT before using BLDMAKE BLDFILES as stated in that page, but then the ABLD.... command gives this error.
-- JumpJack --