![]() |
Re: [Announce] bnf - nifty little tool, allowing to have battery info at glance
Temperature: 43°C. Current: 75 mA. Combination of ambient temperature (read: heatwave), fan of nearby desktop computer, and on-principle-not-turned-on air-conditioner. No applications running on N900, except cellular GSM connection.
|
Re: [Announce] bnf - nifty little tool, allowing to have battery info at glance
1 Attachment(s)
Quote:
So, saving and loading battery profiles won't be possible, due to hardware restrictions. Quote:
Quote:
--- It have been some time, since Pali fixed bq27x00_battery module, and released beta of his and freemangordon's BME FOSS Replacement kit. bq27x00_battery is loaded automatically, as a integral part of replacement solution. Hoever, one problem with bq27x00_battery - from bnf's perspective - is that it blocks access to i2c data. there *is* a way to access it simultaneously, via i2c_slave - but it's complicated, and no one is sure, if perfectly safe. Other than that, fixed bq27x00_battery is blessing, as it allows hassle-free access to most data provided by chip, as sysfs (and less hassle-free access to rest of them, via raw registers). Some time ago, I've promised to release bnf that will work with bq27x00_battery, if it get fixed/incorporated into BME replacement. Hoever, I'm sure, that not all of bnf users want to jump into replacement bandwagon just yet (it's quite devel'ish in full sense of word) or at all, preffering i2c method (reinob, I'm thinking about you, especially ;) ) So, I've created a new version of bnf, that works for *both* bq27x00_battery, and "old" i2cget method. It determines if user have bq27x00_battery loaded and if yes, use it - otherwise, transparently switches to i2cget method. For ease of maintaining, I've divided it into 3 scripts now - "bnf" which only does module checks, and then, run either "bnf-bq27x00" or "bnf-i2c". Of course, I could still keep it as one file (more than 2x as big as before), but I feel it's more cleaner this way. Also, for those of you, that only use one method, and never plan to use another, you may just delete unneeded file (and/or rename *needed* one to "bnf", replacing controller script). http://imageshack.us/scaled/landing/407/bnf11.png Changelog:
Happy using! /Estel |
Re: [Announce] bnf - nifty little tool, allowing to have battery info at glance
As repositories are up again, bnf 1.2 has been just queued for loading into fremantle extras-devel repository. Changelog:
It's a minor release, which contain changes since last repo version, plus fix for sudoers file - users of 1.1 tar-only release, please update too. All people that experience problems with bnf running as root only (failing from user sudo), should be OK now - there was a typo in sudoers file. I have no idea, why it worked on some devices (including mine), despite that error. /Estel |
Re: [Announce] bnf - nifty little tool, allowing to have battery info at glance
I have just returned to my N900 after flirting with some other devices. Installed a new polar 1500 mAh battery. It was charged three times before I found this post while updating the device with all the great stuff people have come up with since I last looked.
Installed bnf. No problem. Followed the excellent calibration post - everything happened exactly as you said. Now on the second discharge cycle. Full Charge has gone from 2000 mAh (or something - i did not take a screen shot) down to 1782 mAh and I suspect, as you say, that another one or two calibration cycles will bring it down the the real capacity. My question is: On the charge after the first calibration cycle I was monitoring the device using bq27200, bnf and grepping the battery stats. I unplugged the device when bq27200 and bnf said the battery was 100% full. I did this as I was not sure and could not find any info to the contrary. However the battery stats showed that the battery was only at 66% charge!! The battery was still charging and flashing the orange LED. BUT shortly after being unplugged when I checked again - showed 97%. So should I leave the charger connected until i get the green LED or should I do what I did and remove the charger when bnf shows that battery to be full (with the expected mV values etc)? I am not using and special charge scripts like charge21.sh. Just bme. I also could not find a post giving a real insight into the pros and cons of stopping bme and using charge21. (Apart from not having the automatic shutdown happen before you get EDV1 = 1 which i have not had a problem with) |
Re: [Announce] bnf - nifty little tool, allowing to have battery info at glance
Quote:
--- From "different barrel" - I've found some problems with BME + bq27x00_battery combination, when device is plugged in and charging ended already. Nothing serious - it just doesn't work then, due to Pali's bad design decisions about bq27x00_battery sysnodes (When charging ended, bq27x00_battery stops exporting some sysnodes, causing read_erro,r when trying to access them). Sadly, same happens when battery is uncalibrated and bqx00_battery loaded - for same reasons. Pali seems confident into keeping it that way to maintain compatibility with upstream bq27x00_battery, which I see as plain wrong (sysfs nodes should *always*.report what hardware gives, not censor data, due to someone's idea that it may be good thing). Workaround for that is to unload bq27x00_battery, when device is not calibrated. Due to it's being PITA, I plan to rewrite BNF again, to only use i2cget, even when bq27x00_battery is loaded - fortunately, I2C_FORCE_SLAVE allows for safe accessing i2c values of bq27x00 chip, even if bq27x00_battery.ko access them already (due to bq27x00_battery module reads being atomic). This should fix both problems mentioned above. /Estel |
Re: [Announce] bnf - nifty little tool, allowing to have battery info at glance
Quote:
By Battery stats I mean the info obtained when the command lshal|grep battery So what i did was correct - unplugging the charger when the bnf showed SOC 100%? What difference would it make to leave the cahrger connected until the green LED is shown? As I am technically going from a lower capacity to a higher capacity BUT the phone had this higher capacity (2487 or whatever) stored already and I am now working down from that to the genuine capacity!! Don't know how this situation arose but I think that is the nature of the beast!! **Additional - found this on page 82 of the battery mod thread "The N900 actually has a chip that can do this capacity measurement and tracking, but it's unused, and the OS shuts down before 6% level at which the chip updates/"learns" battery capacity, so it's stuck at 2048mAh on most N900s. - shadowjk" Perhaps this 2048 is the value that my phone started with as "default". |
Re: [Announce] bnf - nifty little tool, allowing to have battery info at glance
Yes, 2048 is the default value (aka ILMD), which chip have set, if lost calibration data for some reason.
As for that wiki info, it's outdated - we're using exactly this chip for bnf, and kernel-power module bq27x00_battery uses it, too. Whole BME replacement is also using this chip. BTW, "shutting down before calibration" wasn't entirely true, either. old, vanilla BME used sophisticated algorithm to "guess" when low voltage spikes could affect GSM modem, and shutdown then - so, it wasn't shutting down at certain treesholds. For most intents and purposes, it indeed was shutting down before EDV1, although, with some patience (and masochists nature), it was possible to calibrate with BME running. The bigger capacity/more cells battery had, the more stable voltage was at near edv1, so it was easier with dual cell setup. Anyway, now those problems are gone - upcoming bme replacement will ensure, that calibration was done, before shutting down. /Estel |
Re: [Announce] bnf - nifty little tool, allowing to have battery info at glance
Thank you sir. That has completed the lesson!
And, for the benefit of other readers I found Estel's advice based on his being a "fanatic of accurate measurement" when charging - also useful when discharging to ensure the EDV1 value changes before shutdown. Turn GSM off, close all apps, run bq27200 5 in terminal and (this is the twist) if you need to use a bit more charge to get you down to 3248 mV up the screen brightness for a few seconds and then drop it back down to minimum, monitoring the battery charge with the bq27200 5. I found it extremely easy to get the desired 15 second result without bme getting in the way. |
Re: [Announce] bnf - nifty little tool, allowing to have battery info at glance
Hi. Installed bnf from repos 3 days ago. it worked at first but now its not working. When i launch it from menu via bnf icon. it shows nothing and when i launch it via terminal it gives me error.
Quote:
|
Re: [Announce] bnf - nifty little tool, allowing to have battery info at glance
It fails due to things I've just described - bq27x00_battery module is loaded in your system, and for some reasons, your chip started to report itself as requiring calibration - either device was without battery for a while, or you had more than 32 cycles since last calibration.
Due to - IMO, and in opinion of anyone even remotely related to BME replacement, that I've talked to - bad design decisions by Pali, bq27x00_battery stop exporting few sysf nodes *at all*, when battery isn't calibrated - causing "read errors", despite, that chip itself is still providing proper values. It means, that after 32 charging cycles, perfectly fine data will get dropped all-together. I tried (and other people too - in fact, there is no one, except Pali, that think current approach is good), to convince Pali that in linux world, sysfnodes should *always* report what hardware reports, instead of censoring it for whatever reasons (not that here we have any good reasons, too). Sadly, he is very stubborn, and no luck here. You may try your luck at pestering him. --- For now, only workaround is to modprobe -r bq27x00_battery (BNF will switch to i2cget access), or calibrate your battery. As said, in next version, BNF will switch back to i2c-only access, that will work even with bq27x00_battery module loaded, though (due to I2C_FORCE_SLAVE and bq27x00_battery reads being atomic) /Estel |
All times are GMT. The time now is 12:11. |
vBulletin® Version 3.8.8