| Author |
TariffMonitor - quick random questions... |
julianmclean Joined: Mar 11, 2003 Posts: 118 PM |
I know this isn't a techie forum but there seems to be quite a few people here who know some stuff and response rates are good so here goes:
Alot of you know I'm trying to develop an tariff monitoring app for the P800 - see previous posts if you don't. My major stumbling block looks like being extracting the call logs from the phone as I am using Java and it isn't supported. The only "proper" option available looks like JNI/C++ stuff which I know nothing of as yet. However, with a bit of help from some people here, I've located the file in the P800 (c:systemdataCallLog.dat) which stores this info and so I thought maybe I could extract it directly.
Problems are:
This file is in use from the moment the phone is switched on and so I can;t open it, read it, or even copy(!) it as the Symbian OS presumably won't allow it. Does anyone know if there is a way around this problem so that system files can be read when the phone is running? I wonder if installed applications have more permissions over these files but I doubt it.
Secondly, assuming I can solve that problem, I need to make some sense of the file. I finally managed to read it by opening a phone backup file in winzip and getting at the file from there. The file looks almost readable; phone numbers and address book names can be identified and the data lokos to be in a repeating delimited structure. However, it also looks like all the other useful data relating to timings and durations is in gobbledegook. I am guessing this is some sort of encoding, but I don't know what it is. I have pasted a bit of the file below; if anyone recognises the encoding, could they please point me in the right direction of how to decode it!! (Alternatively, if someone who thinks they might have the answer could look at their CallLog.dat file in one of their own backups, it might make more sense.)
Cheers for any help...
Section of CallLog.dat:
ç¬@ !078XXXXX440 € Rà 44/ ¬@ !078XXXXX440 €SarXXXXXXXXrth Zà .#pƒ ¬@ !020XXXXX9032 €Julian Mclean [à _iŒý ¬@ !+44XXXXX00123 €AnXXXXone ]à ƒv^Ë ¬@ !0142XXXXX08 €LyXXXXXXXean _à ÑáÏ ¬@ !0774XXXXX39 € pà Ë÷+h Ï ¬@ ! € tà "Ò g ¬
>>edit>>
This doesn't seem to come out to well on the html forum page. Follow the edit link to be able to copy the text out of the edit box.
< [ This Message was edited by: julianmclean on 2003-07-15 21:55 ] | |
|
Geezer041 Joined: May 03, 2003 Posts: 89 PM |
Have you downloaded UIQ SDK 7.0?
Theres loads of information that should help you. (Its huge)
Here's what i've found:
Location: etelmm.h
Link against: etelmm.lib
Class RMobileCall
class RMobileCall : public RCall;
Support:
Supported from 7.0
Description:
Provides access to the functionality associated with a specific mobile call.
RMobileCall encapsulates access to a mobile phone. The functionality of RMobileCall is divided into a number of functional units, for the purpose of easier documentation and navigation and selectable support by TSY.
Note:
Some RMobileCall function members must be supported by the TSY while others are part of optional "functional unit" and only need to be supported if the TSY supports that functional unit. When a functional unit is mandatory then the TSY should at least support the Get...Caps() member function to indicate the member functions that are supported for this unit.
Derivation:
RCall Call sub-session
RMobileCall Provides access to the functionality associated with a specific mobile call
RTelSubSessionBase A base class used in the derivation of RCall, RLine, and RPhone
Theres also information on how to interpret the .h file from above.
the file etel.h is mentioned a lot too.
I hope i am on the right lines for you. Keep up the good work!
|
julianmclean Joined: Mar 11, 2003 Posts: 118 PM |
Cheers for the pointers. I'll investigate the SDK a bit more. I have been looking through the Symbian C++ API documentation, but I haven't yet been able to find any native functions for getting at the call records - I'm not sure if that etelmm.dll is only for making and receiving calls, or if it also provides methods for looking at the history. If anyone knows how to do what I want to do in C++ then that would be a great start. |
Lordmike Joined: Apr 29, 2003 Posts: > 500 From: Sweden PM |
@julianmclean
Have you tried a hex editor on the file? Could be interresting to try hexing a .dat file.
|
julianmclean Joined: Mar 11, 2003 Posts: 118 PM |
@Lordmike
Yeah, I spent a bit of time looking at it in HEX, but it was very difficult to decipher! I think I managed to identify a delimeter as hex "01" which fits with some sort of standard, but I couldn't make head nor tail of alot of it! It seems a bit strange that the phone numbers and contact names are in normal text, but the other info, which presumably includes the time of call, duration, incoming/outgoing, etc, etc, is all encoded somehow - anyone would think SE don't want an application developed that allow people to monitor their bill!
I'm sure the info is there, but I don't know how to read it! |
Geezer041 Joined: May 03, 2003 Posts: 89 PM |
Mate,
I'm certain you have the right file (etelmm.h) and i'm certain that it contains the information you need. I've been browsin the UIQ SDK and there's loads of information that i don't understand. However it says defined in that file is
efined in RMobileCall ::TMobileCallInfoV1:
TMobileCallInfoV1(), iAlternatingCall, iCallId, iCallName, iDialledParty, iDuration, iEmergency, iExitCode, iForwarded, iLineName, iPrivacy, iRemoteParty, iService, iStartTime, iStatus, iTch, iValid
maybe that helps for now. But i'll keep looking
|
Geezer041 Joined: May 03, 2003 Posts: 89 PM |
Whilst searching SDK came across this. Seems they've allowed for development of such a tool
Location: etelmm.h
Link against: etelmm.lib
Class RMobilePhone
Mobile Cost functional unit
--------------------------------------------------------------------------------
GetCostCaps()
TInt GetCostCaps(TUint32& aCaps) const;
Description
This function member gets a snapshot of the combination of the static and dynamic call cost capabilities of the phone.
Parameters
TUint32& aCaps On return, the sum of TMobilePhoneCostCaps constants
Return value
TInt On return, KErrNone if successful KErrNotSupported if the phone does not support access to any call cost functionality
--------------------------------------------------------------------------------
NotifyCostCapsChange()
void NotifyCostCapsChange(TRequestStatus& aReqStatus, TUint32& aCaps) const;
Description
This request allows a client to be notified when the phone's call cost capabilities change — probably in response to a change of network mode.
Parameters
TRequestStatus& aReqStatus On return, KErrNone if successful.
TUint32& aCaps On return, the sum of TMobilePhoneCostCaps constants
Notes:
Use RTelSubSessionBase::CancelAsyncRequest(EMobilePhoneNotifyCostCapsChange) to cancel a previously placed asynchronous NotifyCostCapsChange() request.
--------------------------------------------------------------------------------
ClearCostMeter()
void ClearCostMeter(TRequestStatus& aReqStatus, TMobilePhoneCostMeters aMeter) const;
Description
This function member clears the cost meter specified by the aMeter parameter.
If PIN2 still requires verification before the ACM or CCM can be cleared, then the TSY will take the following approach.
TSY keeps ClearCostMeter request uncompleted while it looks for an outstanding NotifySecurityEvent() request. If it can not find one, then the ClearCostMeter request will be completed with the extended error KErrGsm0707SimPin2Required and core error KErrAccessDenied.
If TSY does find a NotifySecurityEvent request, it will trigger it and return the EPin2Required security event. The user should then be prompted to enter PIN2 and when he/she has done so, the VerifySecurityCode() function member will be used to send the PIN2 digits to the SIM via the TSY. Assuming the user has entered the correct digits, the TSY can successfully complete the VerifySecurityCode() request.
The TSY can then return to the ClearCostMeter request and send this to the SIM too. Once the SIM (or phone) has confirmed that the resetting of ACM (or CCM) was successful, the TSY will successfully complete the ClearCostMeter() request.
Parameters
TRequestStatus& aReqStatus On return, KErrNone if successful.
TMobilePhoneCostMeters aMeter The cost meter to clear.
Notes:
Use RTelSubSessionBase::CancelAsyncRequest(EMobilePhoneClearCostMeter) to cancel a previously placed asynchronous ClearCostMeter() request.
--------------------------------------------------------------------------------
SetMaxCostMeter()
void SetMaxCostMeter(TRequestStatus& aReqStatus, TUint aUnits) const;
Description
This function member sets the maximum value that the call cost meter will be allowed to rise to.
If PIN2 still requires verification, then the TSY will follow the same approach as outlined for clearing of ACM.
Parameters
TRequestStatus& aReqStatus On return, KErrNone if successful.
TUint aUnits An integer value that represents the maximum number of charging units
Notes:
Use RTelSubSessionBase::CancelAsyncRequest(EMobilePhoneSetMaxCostMeter) to cancel a previously placed asynchronous SetMaxCostMeter() request.
--------------------------------------------------------------------------------
SetPuct()
void SetPuct(TRequestStatus& aReqStatus, const TDesC8& aPuct) const;
Description
This function member sets the Price per Unit and Currency Table to the specified values.
If PIN2 is required before PUCT can be set, then the TSY will follow the same approach as outlined for clearing of ACM.
Parameters
TRequestStatus& aReqStatus On return, KErrNone if successful.
const TDesC8& aPuct The TMobilePhonePuctV1Pckg holding the pricing parameters.
Notes:
Use RTelSubSessionBase::CancelAsyncRequest(EMobilePhoneSetPuct) to cancel a previously placed asynchronous SetPuct() request.
See also:
TMobilePhonePuctV1
--------------------------------------------------------------------------------
GetCostInfo()
void GetCostInfo(TRequestStatus& aReqStatus, TDes8& aCostInfo) const;
Description
This function member retrieves a snapshot of the information associated with the call cost services.
This information includes current values of all the cost meters (CCM, ACM, ACMmax), the current currency settings and the current status of the call cost service ( i.e. which type, if any, is currently active).
Parameters
TRequestStatus& aReqStatus On return, KErrNone if successful, KErrNotFound if the TSY is unable to return this information in the current mode.
TDes8& aCostInfo On return, a TMobilePhoneCostInfoV1Pckg with the current cost information.
Notes:
Use RTelSubSessionBase::CancelAsyncRequest(EMobilePhoneGetCostInfo) to cancel a previously placed asynchronous GetCostInfo() request.
See also:
TMobilePhoneCostInfoV1
--------------------------------------------------------------------------------
NotifyCostInfoChange()
void NotifyCostInfoChange(TRequestStatus& aReqStatus, TDes8& aCostInfo) const;
Description
This function member allows a client to be notified when any part of the call cost information changes.
The CCM and ACM information will change most regularly, but it is also possible for the ACMmax or PUCT to change as a result of a client action or a network initiated update (e.g. data download via SMS to update the ACMmax).
Parameters
TRequestStatus& aReqStatus On return, KErrNone if successful.
TDes8& aCostInfo On return, a TMobilePhoneCostInfoV1Pckg with the current cost information.
Notes:
Use RTelSubSessionBase::CancelAsyncRequest(EMobilePhoneNotifyCostInfoChange) to cancel a previously placed asynchronous NotifyCostInfoChange() request.
See also:
TMobilePhoneCostInfoV1
I know the layout isn't very clear. I'll think you'll have to download the SDK |
julianmclean Joined: Mar 11, 2003 Posts: 118 PM |
Cheers again for all the help. I'll start looking into it tomorrow. It looks like that might provide the functionality I need. I don't suppose you know anything about using JNI to actually use any of this functionality?!! |
Geezer041 Joined: May 03, 2003 Posts: 89 PM |
Not a clue mate. I'll say it again; get the SDK its got tutorials and examples etc aswell as an emulator so that you don't mess up your P800.
I've been browsing and found that the 7650 has a call cost calculator already although it depends on the service provider allowing access to it. Assholes. Anyway, just to give you hope!!! Perhaps you could obtain the software from the 7650 and manipulate it?
[ This Message was edited by: Geezer041 on 2003-07-17 13:48 ] | |
|
Access the forum with a mobile phone via esato.mobi
|