Notices


Reply
Thread Tools
Posts: 429 | Thanked: 217 times | Joined on Apr 2010 @ Dubai
#1
Disclamer:this script needs OCing and no one is responible for the damage made by it except YOU

what this script does checks the Temperature of the phone and if its above 45c then it will change to a very low voltage
and also depending on the battery level, so the batery level the lower the voltage given to the N900


notes:
1.you must read the whole post before doing anything!
2.if you have any ideas please share them but incase you want to declare how you find this script useless to you then please i dont need to hear about it. JUST keep it to yourself.
3.you will be needing to install the following:
1.kernel-power-settings
2.rootsh
3."queen beecon widget" or "desktop command execution widget"
4.if your N900 starts rebooting then its not because of the script! your N900 just needs diffrent profiles or voltages, so try editing the script based on what suits you (eg. starving profile might not work for you but ideal will and so on...)


okay so lets start:
1.make sure you downloaded what i asked for above, then try OCing manually just to see if it works
try entering the following code :
Code:
sudo gainroot
kernel-config load ideal
kernel-config limits 500 805
if everything was sucessful then please do continue to the next step, if not then try reinstalling or rebooting.

2.download the .zip file attached below and extract the smartclocker.sh to your /MyDocs directory.
and by that i mean "/home/user/Mydocs" or in simpler words the first directory you put the folders for the music and videos.

3.okay so for the sake of testing and to make sure you got everything going right.
open the terminal
and type in the following:
Code:
sudo gainroot
sh /home/user/MyDocs/smartclocker
you should get a notification that says "phone limits reset"
if so then you can go to the next step

4.this is a must do to enable a proper temperature reading!
open the terminal then type in the following:
Code:
sudo gainroot
modprobe bq27x00_battery
echo bq27x00_battery >> /etc/modules
5. finally just create a QBW or DCEW and click on "add cmd"
choose a name for it, then in the code area put:
Code:
sudo gainroot ; sh /home/user/MyDocs/smartclocker
then just choose a time interval for lets say every 30min or 1hour
and DONT choose the option where it says "@ start up" or "@ sight" or "@ Desktop"

and here you are done, please tell me how it goes with you
i also re updated the script to fix something
also many thanks to Almehdi and techie and to my biggest supporter renaldoTT
Attached Files
File Type: zip smartclocker.zip (603 Bytes, 170 views)
__________________
N900 @850Mhz
My N900 changed my life and made it ALOT easier!

Last edited by bakuur; 2010-10-27 at 19:12. Reason: made it more user friendly
 

The Following 14 Users Say Thank You to bakuur For This Useful Post:
Posts: 968 | Thanked: 974 times | Joined on Nov 2008 @ Ohio
#2
Just a suggestion, no need to load ulv every time. I would just reset the limits at each level.

Perhaps add an additional check for last profile (ulv), then only change the profile if it will be different than current profile. But, I don't see why anyone would change profiles very often if ever.
__________________
*Consumer*, not a developer! I apologize for any inconvenience.
My script to backup /home and /opt
Samsung Galaxy S Vibrant, Huawei S7, N900(retired), N800(retired)
 
Posts: 429 | Thanked: 217 times | Joined on Apr 2010 @ Dubai
#3
Originally Posted by lemmyslender View Post
Just a suggestion, no need to load ulv every time. I would just reset the limits at each level.

Perhaps add an additional check for last profile (ulv), then only change the profile if it will be different than current profile. But, I don't see why anyone would change profiles very often if ever.
mate i already mentioned that for now im testing it to load ulv only
so that i know it actully worked or not
ofcource this needs alot of work
but at the end am sure even you will need it
__________________
N900 @850Mhz
My N900 changed my life and made it ALOT easier!
 
RenaldoTT's Avatar
Posts: 511 | Thanked: 128 times | Joined on Aug 2010 @ Trinidad and Tobago
#4
as expected another great idea from bakuur
__________________
Trini 2 D' Bone

I miss my N900
Hello DELL Venue Pro Mango
Listen to my music >>> www.reverbnation.com/rrule

TRINIDAD & TOBAGO
 
Posts: 429 | Thanked: 217 times | Joined on Apr 2010 @ Dubai
#5
Originally Posted by RenaldoTT View Post
as expected another great idea from bakuur
Part of it was your idea

IM only here to help , let's just hope that soon I'll find someone to help me (a) with this script
__________________
N900 @850Mhz
My N900 changed my life and made it ALOT easier!
 

The Following User Says Thank You to bakuur For This Useful Post:
Posts: 208 | Thanked: 220 times | Joined on Apr 2010
#6
Originally Posted by bakuur View Post
let's just hope that soon I'll find someone to help me (a) with this script
  1. The expression for curbar returned two matched lines leading to incorrect value being stored.Fixed!
  2. I removed sudo gainroot.You can't issue sudo when you are already root Fixed!
  3. You might wanna replace if's with elif's to reduce comparision.Getting late here else would have done that as well for you.
Code:
#!/bin/bash

#set variables for current bar level and previous bar level
 curbar=`hal-device bme | grep battery.charge_level.current | awk '{print $3}'`
prevbar=`cat /home/user/.ledcharge/lastbar`
 
if [ $curbar -eq $prevbar ]; then
#exit without doing anything
 echo `date | awk '{print $4}'`
exit
else
echo $curbar
#set pattern to current bar level
 if [ $curbar -eq 8 ];then 
sudo kernel-config load ulv
 sudo kernel-config limits 250 805
fi
 if [ $curbar -eq 7 ];then 
sudo kernel-config load ulv
 sudo kernel-config limits 250 805
fi
 if [ $curbar -eq 6 ];then 
sudo kernel-config load ulv
 sudo kernel-config limits 250 805
fi
 if [ $curbar -eq 5 ];then 
sudo kernel-config load ulv
 sudo kernel-config limits 250 805
fi
 if [ $curbar -eq 4 ];then 
sudo kernel-config load ulv
 sudo kernel-config limits 250 805
fi
 if [ $curbar -eq 3 ];then 
sudo kernel-config load ulv
 sudo kernel-config limits 250 805
fi
 if [ $curbar -eq 2 ];then 
sudo kernel-config load ulv
 sudo kernel-config limits 250 805
fi
 if [ $curbar -eq 1 ];then 
sudo kernel-config load ulv
 sudo kernel-config limits 250 805
fi
 if [ $curbar -eq 0 ];then 
sudo kernel-config load ulv
 sudo kernel-config limits 250 805
fi

fi

exit
Didn't have time to check more thoroughly.Let me know if you face anymore problems.

Edit:
Another possible optimization- awk can completely replace use of grep
__________________
With Linux-powered N900..ANYTHING is possible

Last edited by techie; 2010-10-22 at 19:44.
 
woody14619's Avatar
Posts: 1,455 | Thanked: 3,309 times | Joined on Dec 2009 @ Rochester, NY
#7
I was of the impression that setting the lower limit to 500 was more efficient power wise in the long run. Is that not the case? If so, why are you setting the lower limit to 250 in your script?
 
AMLJ's Avatar
Posts: 226 | Thanked: 59 times | Joined on Sep 2010 @ Mierlo, Netherlands
#8
lol
I don't have time to check your script, but what you are trying to do looks good... Thanks
WORK FASTER jk
__________________
AMLJ**0-1-47
 

The Following User Says Thank You to AMLJ For This Useful Post:
Posts: 429 | Thanked: 217 times | Joined on Apr 2010 @ Dubai
#9
Originally Posted by woody14619 View Post
I was of the impression that setting the lower limit to 500 was more efficient power wise in the long run. Is that not the case? If so, why are you setting the lower limit to 250 in your script?
its just for the sake of testing
my limits are 500 950
so that if the script would work id be sure both limits will change

i will have to do alot of testing to give a proper limit for each battery level

hopefully wont disappoint you guys :d
__________________
N900 @850Mhz
My N900 changed my life and made it ALOT easier!
 
Posts: 429 | Thanked: 217 times | Joined on Apr 2010 @ Dubai
#10
dear techie!

thanks alot for taking the time to check it out

something is wrong with my N900 so ill have to reflash so that i can text the script

so ill reply my result soon hopefully
cant wait till i test it!!
__________________
N900 @850Mhz
My N900 changed my life and made it ALOT easier!
 

The Following User Says Thank You to bakuur For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 19:19.