Reply
Thread Tools
Posts: 14 | Thanked: 3 times | Joined on Jan 2010
#1
Hello

I noticed that the N900 does not estimate how long it's going to take for the battery to get fully charged. Such an indication would be helpful to me and I can imagine that other people would be interested too.

I'm trying to do this, but I'm not sure if the information provided by lshal is accurate enough for a decent estimation. To figure that out, I have to profile the charging process. I wrote a script to do that, but I'd like to obtain samples from other N900 users. This enables me to get more samples faster and I can cross-check my code with other charging profiles.

If you want to help me out, use the following script:

#/bin/sh

FILE=$(date +%s|tr -d '\n').charge

while true
do
date +%s|tr -d '\n' >> $FILE
lshal|grep battery >> $FILE
echo "-- " >> $FILE
sleep 30
done


Put this code into the file /home/user/profile.sh, then cd into that directory (cd /home/user) and run chmod 755 profile.sh. When you are going to charge your device, open a terminal and run ./profile.sh before attaching the charger. Quit the script (ctrl-c) after you detached the charger. The script will generate a file with a timestamp and the suffix charge, for example 1262531100.charge. (Note that the internal file browser does not display suffixes). Send me these files; you may remove them afterwards. Please only send in files of charging processes where the device was fully charged, and if possible, write me which charger (USB or power outlet) you used, if WLAN was active and whether the device was idle during charging process.

I can't promise that the data will be accurate enough for a widget to predict charging time, but I promise I'll publish some graphs and analysis of the data if enough samples are returned.

Best regards and thank you

Matt

EDIT:
1. send the files to weyland - a t - library.ethz.ch
2. I was asked whether the script has to be stopped right after the battery gets fully charged. This is not necessary, you can keep the script running and stop it after you come back from whatever you were doing in the meantime. But please don't stop the script before the battery gets full, so that I can use the log file to determine precisely when this happens.

Last edited by papo; 2010-01-04 at 00:01.
 

The Following 3 Users Say Thank You to papo For This Useful Post:
zehjotkah's Avatar
Posts: 2,361 | Thanked: 3,746 times | Joined on Dec 2007 @ Berlin - Love this city!!
#2
welcome to the forum! nice to have you here! i will see, what i can do. a widget with that function would be nice



edit: i've a problem:
made that file
chmod that file
but after ./ it says permission denied...

Last edited by zehjotkah; 2010-01-03 at 15:38.
 
Posts: 14 | Thanked: 3 times | Joined on Jan 2010
#3
Hello

Originally Posted by zehjotkah View Post
but after ./ it says permission denied...
Can you post ls -l profile.sh and make sure that there is no space between ./ and profile.sh? And can you post the full error message (there should be something before Permission denied)?

Regards & thanks

Matt
 
zehjotkah's Avatar
Posts: 2,361 | Thanked: 3,746 times | Joined on Dec 2007 @ Berlin - Love this city!!
#4
-rw-r--r-- 1 user root 162 Jan 3 17:32 profile.sh

-sh: -/profile.sh: Permission denied

my battery is low, so i must fix that soon...
 
Posts: 14 | Thanked: 3 times | Joined on Jan 2010
#5
Hi

Originally Posted by zehjotkah View Post
-rw-r--r-- 1 user root 162 Jan 3 17:32 profile.sh
The chmod did not work then:

~ $ chmod 644 profile.sh
~ $ ls -lh profile.sh
-rw-r--r-- 1 user users 152 Jan 3 16:56 profile.sh
~ $ chmod 755 profile.sh
~ $ ls -lh profile.sh
-rwxr-xr-x 1 user users 152 Jan 3 16:56 profile.sh


You can only execute the script if the executable bit (x) is set. Alternatively, you can also try sh ./profile.sh which does not require the executable bit.

Thank you for your efforts

Matt
 
Posts: 377 | Thanked: 97 times | Joined on Dec 2009 @ US
#6
Email address to send .charge logfiles to?
 
Posts: 14 | Thanked: 3 times | Joined on Jan 2010
#7
Originally Posted by That One Guy View Post
Email address to send .charge logfiles to?
weyland - a t - library.ethz.ch
 
zehjotkah's Avatar
Posts: 2,361 | Thanked: 3,746 times | Joined on Dec 2007 @ Berlin - Love this city!!
#8
i can't get the file mark as executable^^ thats really strange. i've tried it in the mmc1 but also in .documents...
stays at -rw-r--r--
i've made a .txt in windows, with the content, renamed to profile.sh, transferred to my n900..
something i'm doing wrong... feeling stupid right now^^
 
Posts: 1,224 | Thanked: 1,763 times | Joined on Jul 2007
#9
You can't execute files on the VFAT partition. copy them to another partition.
 
Posts: 14 | Thanked: 3 times | Joined on Jan 2010
#10
Hm, it just popped into my mind that you may be trying on a filesystem that does not support modes (such as vfat). That would explain it. I'm trying in /home/user which is ext3. Anyway, sh ./profile.sh (or whatever the name of the file is) should work anyway, so just add a preceding 'sh' and you should be fine. I'll fix the first post in this thread.

Thanks, Matt
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 13:47.