![]() |
Guide to get detailed battery information
N900 allows one to check full detailed information about the battery.
The basic way to get everything is to open the X terminal and type "lshal|grep bat". There is also another way to get the information, but the output isn't well sorted. It is "hal-device bme" which is executed much faster and as such is used in the aliases later on. Note. The commands don't show anything useful while charging. You will get following output (numbers on front of lines have been added for easier explaining): Code:
~ $ lshal|grep bat 2. Remaining battery life in bars (number representation of the battery bar shown on top left of the screen just right of programs button). 3. Bar value of full charged new battery. 4. Bar value the battery had last time it was fully charged. Typically 8 for quite new battery. Seems to reset to 0 in a few minutes after taking off the charger. 5. Percentage of battery charge remaining. This is the most useful value for most users. 6-10. Self explanatory. 11. Very inaccurate time remaining on battery charge at current usage. Supposed to be in seconds (I recall reading that from somewhere) but is far from reality and updates very rarely. 12. Not sure what this should mean. Always shows false for me. 13. Current remaining battery charge in mAh. 14. Capacity of the current battery when it was manufactured. 15. Full charge mAh value from last full charge. Seems to reset to 0 in a few minutes after taking off the charger. 16-17. Self explanatory. 18. Current battery voltage. Depends on recent usage level and battery charge level. Only useful for advanced users. 19. Voltage of the battery when fully charged. The value is for when manufactured, but this does not change for old batteries. 20. Self explanatory 21-22. Useless. So, all in all, the lines 5, 13, 14 and 18 are of more use. And the line 14 can be easily remembered approximately and as such is generally useless in long term. The only useful value shown while charging, is the line 18 (voltage). After getting used to the voltage behavior of rechargeable Li-Ion battery, you can approximate the remaining charge time from the voltage value. Here are some aliases premade for various people to ease the life. They are put into a file ".profile" in the home directory (the directory X terminal puts you on at start). A quick newbie quite for how to use vi (the only editor I found on the X terminal). Start editing the file with "vi .profile". Type "a" to enter editing mode. Edit the file normally (do not press anything strange such as keys with CTRL or ESC etc). If something strange happens, close the X terminal and start from beginning. Once ready, click ESC, type ":write" and type ":q". To get "|" symbol, use secondary function of CTRL-key on the keyboard. Aliases work as such that the word before "=" does the command between parenthesis. You can easily customize the aliases to be done with other commands. Eg. following 2 aliases do same thing, except first is executed with foo and second with bar. alias foo="echo test" alias bar="echo test" Some basic aliases to simplify the rest of the aliases. Grep is a command used to look for given pattern from the lines. Matching lines are left remaining. With -v parameter the behavior is reverse, thus only lines not matching are left remaining. alias lg="hal-device bme|grep" alias g="grep" alias gv="grep -v" Alias suited for most users showing only line 5 (charge percentage): alias b="lg erc" (or alias b="hal-device bme|grep erc" ) Alias giving a bit more info for more advanced users and for battery usage testing. Shows lines 5, 13 and 18 (charge percentage, mAh remaining and voltage): alias ba="lg erc;lg rr|gv h" Alias for same as above except with line 14 (design charge in mAh) as well: alias bat="lg erc;lg g.des;lg rr|gv h" Alias for generally everything at least somewhat useful (lines 1-5, 13-15 and 18-19): alias battery="lg bat|gv nf|gv pr|gv yp|gv un|gv is|gv lc|gv im" As for advanced info about how charge remaining in mAh and voltage vary depending on power usage. Voltage tends to drop somewhat below the normal level when you do something intensive. More than when the charge is lower. The remaining charge shouldn't raise, but it seems the logic used in determining battery charge is a bit simplified, and as such there are some differences there. After a period of intensive usage, the charge remaining may actually raise around 10-20 mAh while the device is at idle for 5-20 minutes. It is crucial to experiment around with this a bit for more accurate results on battery usage tests. In case you have something to add (or perhaps found an error), feel free to comment. I will be updating this post to match latest information and answering all possible questions people might have. |
Re: Guide to get detailed battery information
um... thanks?
is it possible to make a script or something like that which only outputs specific values? (and then, consequently, create some kind of shortcut for the desktio so you can just click/push on it and get all intersting information for you output on the screen) |
Re: Guide to get detailed battery information
Quote:
|
Re: Guide to get detailed battery information
A small hint: "hal-device" will give you the output much faster. As I still have no n900 I can propose "hal-device bme" ;)
|
Re: Guide to get detailed battery information
Quote:
|
Re: Guide to get detailed battery information
Quote:
|
Re: Guide to get detailed battery information
Quote:
|
Re: Guide to get detailed battery information
Wouldn't it be possible to create a widget with detailed battery info?
I have to admit I have yet to take a look at the sdk/docs etc. :) |
Re: Guide to get detailed battery information
Quote:
Would be neat to have a widget that replaces the normal battery bar with battery charge percentage number. |
Re: Guide to get detailed battery information
Quote:
Quote:
|
Re: Guide to get detailed battery information
Quote:
|
Re: Guide to get detailed battery information
Thanks for the useful post...
Have you found anything that shows the charging current? I have been trying to compare the rate of charge of the supplied charger and various other chargers (using the supplied CA-146 adapter). Rgrds Peter |
Re: Guide to get detailed battery information
Quote:
Do note that Li-Ion batteries are charged with fixed current to 60-70 % charge and after that with fixed voltage to 100 %. The first stage on a fast charger is something like 40 minutes and the second stage will last somewhat over an hour. As such, a slower charger (or heavy usage while on fast charger) mainly affects the first stage only. |
Re: Guide to get detailed battery information
can any one explain why N900 says its battery says its full , the lahal batter charged level is only about 90%
|
Re: Guide to get detailed battery information
Quote:
And the fully charged level may vary by at least 5 % between 2 sequential charges. As such, a single reading isn't too reliable. Thus, you might get 95 % next time you charge it. |
Re: Guide to get detailed battery information
I was successfully using the command "lshal grep | percentage", but now the terminal replies "-sh: percentage: not found"
What is going on here? Thanks! |
Re: Guide to get detailed battery information
Try: lshal | grep percentage
|
Re: Guide to get detailed battery information
:o DOH! thanks
|
Re: Guide to get detailed battery information
Is it possible to get a "battery usage application" like the one on the DROID? Where it shows which app/process is using % of drain:
http://affbook.com/wp-content/upload...tery-usage.png |
Re: Guide to get detailed battery information
Quote:
Anyways there is another threadHERE - a desktop widget to show the percentage of battery but its not yet integrated into the status bar, currently it resides on the home screen. have taken some inputs from this thread will see if I can incorporate it. cheers |
Re: Guide to get detailed battery information
Look at this thread. Those info might be exactly what can be used with the widget I mentioned!!
Desktop Command Execution Widget http://talk.maemo.org/showthread.php?t=39177 |
Re: Guide to get detailed battery information
Quote:
With a widget to show the percentage Ive noticed this every time. The battery never reaches 100% is there already a bug raised ? |
Re: Guide to get detailed battery information
I'd prefer if it was left the way it is. Or possibly recalibrate the battery capacity making 98% the new 100% instead of just using the capacity supplied by the battery at bootttime, which seems to varry from boot to boot, probably due to temperature.
N8x0 always reports 100%, remaining millamphours = battery's original capacity, and the meter thus gets progressively worse as battery ages and loses capacity. |
Re: Guide to get detailed battery information
Quote:
As a summary battery charge percentage is current capacity divided by DESIGN capacity. Thus it is a feature it never reaches 100 %. Instead, a new battery at 60 % will last as long as say a 2 years old battery that can only reach 60 % at full charge lasts from that. |
Re: Guide to get detailed battery information
Quote:
anyways, i wasnt fully convinced with that bug resolution, will be getting back on that with more info when I have to reopen. Any *fairly new" phone on the market always reports 100% battery and I dont believe that other OS'es extrapolate the value to display 100%. All facts stated abt a lithium battery in that bug holds good for even other phones not only the N900 so that explanation didnt convince me fully. |
Re: Guide to get detailed battery information
Quote:
N900 doesn't do it the same way. Yes, it calibrates the capacity every full cycle, but it doesn't use the capacity for calculating the percentage. It is only used in calculating the mAh of the current charge. Eg. on a full charge, you'll get the mAh of fully charged battery based on latest capacity calibration. Then the mAh the device sees you having will be divided by design capacity and you get current charge percentage. It is a feature and not a bug and there is no way around it whatsoever. If you have something regarding some people having problem with the new phone battery rarely having figures in the order of 70 % or even lower when fully charged, then that is case for another bug report regarding that problem. It is no use reopening the old bug report for a whole different problem, as the bug report only deals with the specific problem it is about. |
All times are GMT. The time now is 12:53. |
vBulletin® Version 3.8.8