maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [HACK] Display remaining minutes left out of free minutes (https://talk.maemo.org/showthread.php?t=74904)

rajil.s 2011-07-13 20:17

[HACK] Display remaining minutes left out of free minutes
 
2 Attachment(s)
Some places like in UK here allot free minutes each month. The scripts attached are to display the remaining minutes and the used minutes each month.

Steps:
1. Enable endtime recording in database following the triggers script here
2. Copy freecalls.sh and calltimerpopup.sh in /home/user/scripts and make them executable (chmod +x freecalls.sh calltimerpopup.sh).
3. Copy callhangup and freecalllimit to /etc/dbus-scripts.d
4. Edit freecalls.sh for the freeminutes, starting date and number of sms which count to 1 minute. Leave SMSPERMINUTE=0 if they are not counted in minutes.
5. If there any phone numbers which shouldnt be counted edit FREE line. For me numbers 123 and 333 are free.
6. Reboot device and make a gsm call. Popup will appear after the call is terminated.

*Dbus-scripts need to be installed.
*Thanks to DocScrutinizer for sorting out the niggles.

Jigzy 2011-07-13 20:35

Re: [HACK] Display remaining minutes left out of free minutes
 
looks good will give it a try

moepda 2011-07-13 21:38

Re: [HACK] Display remaining minutes left out of free minutes
 
will try now as my minutes change at 12 !

update : followed install instructions and did reboot , made 1st call and message worked with used and remaining minutes.
will test again after midnight as my minutes for month restart then...

moepda 2011-07-13 23:37

Re: [HACK] Display remaining minutes left out of free minutes
 
tested after midnight and not working , message pops up ok but says used and remaining minutes but no numbers only blanks...

rajil.s 2011-07-14 05:50

Re: [HACK] Display remaining minutes left out of free minutes
 
Quote:

Originally Posted by moepda (Post 1050523)
tested after midnight and not working , message pops up ok but says used and remaining minutes but no numbers only blanks...

That probably happened because there were no calls in the database. I have updated the freecalls.sh script to consider that.

moepda 2011-07-14 08:44

Re: [HACK] Display remaining minutes left out of free minutes
 
used original script this morning and working . updating script anyway though . cheers for the update :)

t4ure4n 2011-07-14 10:43

Re: [HACK] Display remaining minutes left out of free minutes
 
I am going to give this a try and let you know how it goes?

t4ure4n 2011-07-14 11:34

Re: [HACK] Display remaining minutes left out of free minutes
 
My Data-plan is Flext 35 (T-Mobile UK). I get 900 Minutes or 1800 Text Messages..
i.e 2 text messages equates 1 minute

I just have 2 questions

1. Does your script count messages as well? If not can your script be enhanced to do it?

2. I am not sure about T-Mobile but some companies charge you by minute i.e even if you talk for say 30 seconds you will still be charged for a minute. Do you round of seconds to minutes?

Regards

t4ure4n 2011-07-14 15:06

Re: [HACK] Display remaining minutes left out of free minutes
 
I have managed to get it working on my N900.

The problem I am getting this message

Free minutes consumed: 0
Remaining minutes: 900

I have followed step by step instructions and updated the freecalls.sh for freeminutes and starting date too.

I have restarted the phone and made few calls but it does not show correct information.

rajil.s 2011-07-14 17:41

Re: [HACK] Display remaining minutes left out of free minutes
 
@t4ure4n. Sms capability is now added. Set SMSPERMINUTE=2 to in freecalls.sh in your case. Also, the minutes are rounded off to a minute.

With regards to your free minutes not being updated, i think your triggers function in the database (Step 1) is not working. The triggers script i linked to is for firmware 1.2 and above.


All times are GMT. The time now is 10:27.

vBulletin® Version 3.8.8