Editing Bme replacement

Warning: You are not logged in. Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 14: Line 14:
.debs are available from:
.debs are available from:
-
http://talk.maemo.org/showthread.php?t=93183
+
https://atrey.karlin.mff.cuni.cz/~pali/rx51-bme-replacement/
-
http://maemo.merlin1991.at/cssu/bme-replacement/
+
(might need to ignore expired certificate)
It works for everyday usage, but some major problems were found, see below.
It works for everyday usage, but some major problems were found, see below.
-
 
-
'''Notice'''
 
-
 
-
According to Estel, these bugs aren't present anymore. Compare [http://talk.maemo.org/showpost.php?p=1439376&postcount=1691 1] [http://talk.maemo.org/showpost.php?p=1439709&postcount=1693 2] --[[User:marmistrz|marmistrz]] 16:13, 25 October 2014 (UTC)
 
=Problems/bugs and proposed solutions=
=Problems/bugs and proposed solutions=
Line 32: Line 28:
'''1. gconf value''', that allow power users to change voltage, at which device shutdowns to any arbitrary value.
'''1. gconf value''', that allow power users to change voltage, at which device shutdowns to any arbitrary value.
-
This is preferred solution, as some devices are more like to have problems with GSM chip restarting at low voltage, even around '''EDV1''' 3248 mV. People with such problems, that prefer GSM stability over calibration, could bump voltage threshold, to avoid problems. OTOH, people with less picky devices and/or dual-cell setups, could decrease limit, getting more from their batteries.
+
This is preffered solution, as some devices are more like to have problems with GSM chip restarting at low voltage, even around '''EDV1''' 3248 mV. People with such problems, that preffer GSM stability over calibration, could bump voltage treeshold, to avoid problems. OTOH, people with less picky devices and/or dual-cell setups, could decrease limit, getting more from their batteries.
-
This method can be also augmented by solution 2, for "default" shutdown threshold.
+
This method can be also augmented by solution 2, for "default" shutdown treeshold.
-
'''1.a gconf value plus guard time''' use a timer plus frequent probing to ensure the voltage stays below the threshold set by gconf. This is the recommended method since the whole shutdown shouldn't get triggered by sub-second "brownouts" caused by power consumption spikes. A suggested guard time is 30..60s, a suggested sampling frequency for voltage is 1/s, though the hardware has limited support for such high sampling frequencies of voltage - further evaluation needed. Other alternative concepts like average over moving window (again window size: 30..60s)  might be worth to consider.
+
'''1.a gconf value plus guard time''' use a timer plus frequent probing to ensure the voltage stays below the threshold set by gconf. This is the recommended method since the whole shutdown shouldn't get triggered by sub-second "brownouts" caused by power consumption spikes. A suggested guard time is 30..60s, a suggested sampling frequency for voltage is 1/s, though the hardware has limited support for such high sampling frequencies of voltage - further evaluation needed. Other alternative concepts like average over moving window (again widow size: 300..60s)  might be worth to consider.
Note that the high sampling frequency is only needed during the guard time. For moving window average this complicates the design a fair bit.
Note that the high sampling frequency is only needed during the guard time. For moving window average this complicates the design a fair bit.
Line 46: Line 42:
'''EDV1''' flag can be read from ''/sys/class/power_supply/bq24150a-0/registers'' address 0x55 0x0A, divided by 2.
'''EDV1''' flag can be read from ''/sys/class/power_supply/bq24150a-0/registers'' address 0x55 0x0A, divided by 2.
-
'''2.a''' In case of '''EDV1''' flag being not available'''*''', fallback to using 3150 mV as shutdown threshold. Rationale: 3150 mV shouldn't cause GSM chip restarts on devices, where 3248 mV haven't caused it already.
+
NOTE: EDV1 flag might never get set, when discharge (=learning cycle) been "spoiled" by e.g. a short charging period in between.
 +
 
 +
'''2.a''' In case of '''EDV1''' flag being not available'''*''', fallback to using 3150 mV as shutdown treeshold. Rationale: 3150 mV shouldn't cause GSM chip restarts on devices, where 3248 mV haven't caused it already.
It doesn't guarantee calibration, as it require 15 seconds *straight* below 3248 mV (EDV1 voltage), and 3150 mV might be just momentary low voltage spike. But, it is better than current implementation, which permits calibration *ever* - and, after all, it is just theoretical fallback for hyphotetical, non-existing kernel.
It doesn't guarantee calibration, as it require 15 seconds *straight* below 3248 mV (EDV1 voltage), and 3150 mV might be just momentary low voltage spike. But, it is better than current implementation, which permits calibration *ever* - and, after all, it is just theoretical fallback for hyphotetical, non-existing kernel.
Line 96: Line 94:
* Proposal from Kerio on this: hald-addon-bme should provide a way to know if bq27k is calibrated or not, and the battery applet should show a "(CI)" whenever it's not; battery.reporting.design should always come from rx51-battery, other data should always come from bq27k (with the implicit message that if it's uncalibrated, it might be inaccurate); the battery applet should have three modes: a mode where it does *the same thing as stock*, without showing anything at all (default for CSSU stable maybe?), a mode (default on CSSU testing, maybe?) where it prefers to calculate against the battery design reported by rx51-battery, and a mode where it calculates against the last full charge as reported by bq27k, regardless of calibration (but showing the CI indicator next to the charge/full charge report)
* Proposal from Kerio on this: hald-addon-bme should provide a way to know if bq27k is calibrated or not, and the battery applet should show a "(CI)" whenever it's not; battery.reporting.design should always come from rx51-battery, other data should always come from bq27k (with the implicit message that if it's uncalibrated, it might be inaccurate); the battery applet should have three modes: a mode where it does *the same thing as stock*, without showing anything at all (default for CSSU stable maybe?), a mode (default on CSSU testing, maybe?) where it prefers to calculate against the battery design reported by rx51-battery, and a mode where it calculates against the last full charge as reported by bq27k, regardless of calibration (but showing the CI indicator next to the charge/full charge report)
** Pali: I do not agree, there should be only one version of bme replacement, not N versions with different preconfigured modes.
** Pali: I do not agree, there should be only one version of bme replacement, not N versions with different preconfigured modes.
-
 
-
there's no sane rationale in using battery.reporting.design for anything. User isn't interested in charge relative to what battery been able to store when it been new. This would result in battery never reaching 100%, which for sure is odd! Rather user is interested when battery has reached 100% of capacity it can store '''right now''' - and that's LMD, not battery.reporting.design --[[User:joerg_rw|joerg_rw]] 21:11, 27 March 2013 (UTC)
 

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)