Bme replacement

(Fixed solutions 2)
m (Typo fix)
Line 29: Line 29:
This method can be also augmented by solution 2, for "default" shutdown treeshold.
This method can be also augmented by solution 2, for "default" shutdown treeshold.
 +
 +
---
'''2. Using EDV1 flag''', instead of '''EDV1''' voltage, as trigger to shut device down. '''EDV1''' *flag* being set, means, that device was just calibrated - it spares need complicated replication of 15 sec. calibration timer, mentioned in problem description.
'''2. Using EDV1 flag''', instead of '''EDV1''' voltage, as trigger to shut device down. '''EDV1''' *flag* being set, means, that device was just calibrated - it spares need complicated replication of 15 sec. calibration timer, mentioned in problem description.
Line 34: Line 36:
'''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 treeshold. Rationale: 3150 mV shouldn't cause GSM chip restarts on devices, where 3248 mV haven't caused it already.
+
'''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.
-
*''theoretical possibility with custom kernels, that fullfill basic requiments, but don' feed all data - currently, no such kernel exist''
+
'''*''' ''theoretical possibility with custom kernels, that fullfill basic requiments, but don't feed all data - currently, no such kernel exist''
==2. Battery applet showing wrog value for capacity==
==2. Battery applet showing wrog value for capacity==

Revision as of 12:22, 24 March 2013

Contents

Introduction

BME Replacement is a project aiming to bring proper FOSS replacement to Maemo's BME bits. It consists of both kernel and userland bits, cooperating, and make use of data provided by build-in hardware bq27x00 chip.

This article is a stub. Feel free to improve it, feed additional proposed solutions, etc.

Prerequisities

[kernel-power] <inert oldest supported kernel-power version here> or above.

Current state

Beta .debs are available from: <insert links here>

It works for everyday usage, but some major problems were found, see below.

Problems/bugs and proposed solutions

1. Premature shutdown

Device is shutting down at EDV1 voltage, not allowing bq27x00 chip to calibrate capacity. Calibrating require device to be *at or below* EDV1 for 15 seconds straight - going above even for a split second resets timer, so another straight 15 seconds is required.

Proposed solutions

1. gconf value, that allow power users to change voltage, at which device shutdowns to any arbitrary value.

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 treeshold.

---

2. Using EDV1 flag, instead of EDV1 voltage, as trigger to shut device down. EDV1 *flag* being set, means, that device was just calibrated - it spares need complicated replication of 15 sec. calibration timer, mentioned in problem description.

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 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.

* theoretical possibility with custom kernels, that fullfill basic requiments, but don't feed all data - currently, no such kernel exist

2. Battery applet showing wrog value for capacity

<insert description here>

Proposed solutions: 1. <placeholder>

2. <placeholder>