<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://maemo.octonezd.me/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=84.220.132.64</id>
	<title>Maemo Wiki Mirror - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://maemo.octonezd.me/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=84.220.132.64"/>
	<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php/Special:Contributions/84.220.132.64"/>
	<updated>2026-04-22T08:16:00Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Bme_replacement&amp;diff=1958</id>
		<title>Bme replacement</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Bme_replacement&amp;diff=1958"/>
		<updated>2013-03-24T15:56:08Z</updated>

		<summary type="html">&lt;p&gt;84.220.132.64: /* 2. Battery applet showing wrong value for capacity */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
BME Replacement is a project aiming to bring proper FOSS replacement to Maemo&#039;s BME bits. It consists of both kernel and userland bits, cooperating, and make use of data provided by build-in hardware bq27x00 chip.&lt;br /&gt;
&lt;br /&gt;
Unlike vanilla BME, replacement fully support USB hostmode, via [[usbmode]].&lt;br /&gt;
&lt;br /&gt;
==Prerequisities==&lt;br /&gt;
&lt;br /&gt;
Kernel which provides bq2415x_charger, bq27x00_battery and rx51_battery modules. It also need to have &amp;quot;glue&amp;quot; between bq2415x_charger and monolitic musb driver. In practice, it means kernel-power52 or above (See: [[Kernel_Power]])&lt;br /&gt;
&lt;br /&gt;
==Current state==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Beta&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
.debs are available from:&lt;br /&gt;
https://atrey.karlin.mff.cuni.cz/~pali/rx51-bme-replacement/&lt;br /&gt;
(might need to ignore expired certificate)&lt;br /&gt;
&lt;br /&gt;
It works for everyday usage, but some major problems were found, see below.&lt;br /&gt;
&lt;br /&gt;
=Problems/bugs and proposed solutions=&lt;br /&gt;
&lt;br /&gt;
==1. Premature shutdown==&lt;br /&gt;
Device is shutting down at &#039;&#039;&#039;EDV1&#039;&#039;&#039; voltage, not allowing bq27x00 chip to calibrate capacity. Calibrating require device to be *at or below* &#039;&#039;&#039;EDV1&#039;&#039;&#039; for 15 seconds straight - going above even for a split second resets timer, so another straight 15 seconds is required.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Proposed solutions&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. gconf value&#039;&#039;&#039;, that allow power users to change voltage, at which device shutdowns to any arbitrary value.&lt;br /&gt;
&lt;br /&gt;
This is preffered solution, as some devices are more like to have problems with GSM chip restarting at low voltage, even around &#039;&#039;&#039;EDV1&#039;&#039;&#039; 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.&lt;br /&gt;
&lt;br /&gt;
This method can be also augmented by solution 2, for &amp;quot;default&amp;quot; shutdown treeshold.&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Using EDV1 flag&#039;&#039;&#039;, instead of &#039;&#039;&#039;EDV1&#039;&#039;&#039; voltage, as trigger to shut device down. &#039;&#039;&#039;EDV1&#039;&#039;&#039; *flag* being set, means, that device was just calibrated - it spares need complicated replication of 15 sec. calibration timer, mentioned in problem description.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;EDV1&#039;&#039;&#039; flag can be read from &#039;&#039;/sys/class/power_supply/bq24150a-0/registers&#039;&#039; address 0x55 0x0A, divided by 2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2.a&#039;&#039;&#039; In case of &#039;&#039;&#039;EDV1&#039;&#039;&#039; flag being not available&#039;&#039;&#039;*&#039;&#039;&#039;, fallback to using 3150 mV as shutdown treeshold. Rationale: 3150 mV shouldn&#039;t cause GSM chip restarts on devices, where 3248 mV haven&#039;t caused it already.&lt;br /&gt;
&lt;br /&gt;
It doesn&#039;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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;*&#039;&#039;&#039; &#039;&#039;theoretical possibility with custom kernels, that fullfill basic requiments, but don&#039;t feed all data - currently, no such kernel exist&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==2. Battery applet showing wrong value for capacity==&lt;br /&gt;
[http://mg.pov.lt/maemo-ssu-irclog/%23maemo-ssu.2013-03-24.log.html#t2013-03-24T14:15:42 From the #maemo-ssu irclog:]&lt;br /&gt;
&lt;br /&gt;
[14:15] &amp;lt;kerio&amp;gt;	2) instead of showing wildly inaccurate data, it&#039;s preferrable to show nothing, or a message indicating that data is unavailable&lt;br /&gt;
&lt;br /&gt;
[14:16] &amp;lt;kerio&amp;gt;	3) fuck rx51-battery, given 2) there&#039;s no reason whatsoever to use it (except the temperature thing, but that&#039;s for dsme and pulseaudio, not for the battery/charging)&lt;br /&gt;
&lt;br /&gt;
[14:17] &amp;lt;kerio&amp;gt;	4) bq27200 is our lord, bq27200 is our ruler, bq27200 is our saviour - when calibrated, /everything/ should be grabbed from bq27200 and that&#039;s it - percentages, capacity (when full and at the moment)&lt;/div&gt;</summary>
		<author><name>84.220.132.64</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Bme_replacement&amp;diff=1959</id>
		<title>Bme replacement</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Bme_replacement&amp;diff=1959"/>
		<updated>2013-03-24T15:55:50Z</updated>

		<summary type="html">&lt;p&gt;84.220.132.64: /* 2. Battery applet showing wrog value for capacity */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
BME Replacement is a project aiming to bring proper FOSS replacement to Maemo&#039;s BME bits. It consists of both kernel and userland bits, cooperating, and make use of data provided by build-in hardware bq27x00 chip.&lt;br /&gt;
&lt;br /&gt;
Unlike vanilla BME, replacement fully support USB hostmode, via [[usbmode]].&lt;br /&gt;
&lt;br /&gt;
==Prerequisities==&lt;br /&gt;
&lt;br /&gt;
Kernel which provides bq2415x_charger, bq27x00_battery and rx51_battery modules. It also need to have &amp;quot;glue&amp;quot; between bq2415x_charger and monolitic musb driver. In practice, it means kernel-power52 or above (See: [[Kernel_Power]])&lt;br /&gt;
&lt;br /&gt;
==Current state==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Beta&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
.debs are available from:&lt;br /&gt;
https://atrey.karlin.mff.cuni.cz/~pali/rx51-bme-replacement/&lt;br /&gt;
(might need to ignore expired certificate)&lt;br /&gt;
&lt;br /&gt;
It works for everyday usage, but some major problems were found, see below.&lt;br /&gt;
&lt;br /&gt;
=Problems/bugs and proposed solutions=&lt;br /&gt;
&lt;br /&gt;
==1. Premature shutdown==&lt;br /&gt;
Device is shutting down at &#039;&#039;&#039;EDV1&#039;&#039;&#039; voltage, not allowing bq27x00 chip to calibrate capacity. Calibrating require device to be *at or below* &#039;&#039;&#039;EDV1&#039;&#039;&#039; for 15 seconds straight - going above even for a split second resets timer, so another straight 15 seconds is required.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Proposed solutions&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. gconf value&#039;&#039;&#039;, that allow power users to change voltage, at which device shutdowns to any arbitrary value.&lt;br /&gt;
&lt;br /&gt;
This is preffered solution, as some devices are more like to have problems with GSM chip restarting at low voltage, even around &#039;&#039;&#039;EDV1&#039;&#039;&#039; 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.&lt;br /&gt;
&lt;br /&gt;
This method can be also augmented by solution 2, for &amp;quot;default&amp;quot; shutdown treeshold.&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Using EDV1 flag&#039;&#039;&#039;, instead of &#039;&#039;&#039;EDV1&#039;&#039;&#039; voltage, as trigger to shut device down. &#039;&#039;&#039;EDV1&#039;&#039;&#039; *flag* being set, means, that device was just calibrated - it spares need complicated replication of 15 sec. calibration timer, mentioned in problem description.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;EDV1&#039;&#039;&#039; flag can be read from &#039;&#039;/sys/class/power_supply/bq24150a-0/registers&#039;&#039; address 0x55 0x0A, divided by 2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2.a&#039;&#039;&#039; In case of &#039;&#039;&#039;EDV1&#039;&#039;&#039; flag being not available&#039;&#039;&#039;*&#039;&#039;&#039;, fallback to using 3150 mV as shutdown treeshold. Rationale: 3150 mV shouldn&#039;t cause GSM chip restarts on devices, where 3248 mV haven&#039;t caused it already.&lt;br /&gt;
&lt;br /&gt;
It doesn&#039;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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;*&#039;&#039;&#039; &#039;&#039;theoretical possibility with custom kernels, that fullfill basic requiments, but don&#039;t feed all data - currently, no such kernel exist&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==2. Battery applet showing wrong value for capacity==&lt;br /&gt;
[http://mg.pov.lt/maemo-ssu-irclog/%23maemo-ssu.2013-03-24.log.html#t2013-03-24T14:15:42 From the #maemo-ssu irclog:]&lt;br /&gt;
[14:15] &amp;lt;kerio&amp;gt;	2) instead of showing wildly inaccurate data, it&#039;s preferrable to show nothing, or a message indicating that data is unavailable&lt;br /&gt;
[14:16] &amp;lt;kerio&amp;gt;	3) fuck rx51-battery, given 2) there&#039;s no reason whatsoever to use it (except the temperature thing, but that&#039;s for dsme and pulseaudio, not for the battery/charging)&lt;br /&gt;
[14:17] &amp;lt;kerio&amp;gt;	4) bq27200 is our lord, bq27200 is our ruler, bq27200 is our saviour - when calibrated, /everything/ should be grabbed from bq27200 and that&#039;s it - percentages, capacity (when full and at the moment)&lt;/div&gt;</summary>
		<author><name>84.220.132.64</name></author>
	</entry>
</feed>