BATTERY GAUGE CHIP BQ27200 SEMI-AUTOMATIC CALIBRATION
for your convenience:
http://maemo.cloud-7.de/maemo5/patch...brate-bq27k.sh automatic calibration script for bq27200 chip.
(serving suggestion:
Code:
root
cd $(dirname $(which bq27200.sh));
wget http://maemo.cloud-7.de/maemo5/patches_n_tools/calibrate-bq27k.sh;
chmod +x calibrate-bq27k.sh
)
HOW TO USE:
There are two slightly different modes to use this:
- first plug in wallcharger, then start the script
will start charging battery on plugin of charger, and script waits untill battery full and VDQ:1, before the discharging begins (tested)
- first start the script, then plug in wallcharger
the script, when finding a valid discharge process (VDQ:1) in progress, will try to stop charging (also emergency charging aka flatbatrecover) and continue to DIScharge battery until the learning cycle complete. Advantage: faster. Tested to work by Kerio
You will need
bq27200.sh (also here, plain file) installed (incl
i2ctools) - quite probably you already have that otherwise why would you want to calibrate bq27200 chip ;-)
and
you need to cd to the directory where bq27200.sh lives, before starting the calibrate-bq27k.sh script (the script calls ./bq27200.sh).
The script will
- charge battery until full (actually until VDQ:1), then
- switch off charging (stop bme) and
- discharge battery until
- learning cycle complete (EDV1:1), when it will
- re-enable charging by starting bme.
For proper unattended discharging/calibrating during you're asleep in the night, you want to set screen backlight to 'always on' and level 5
(will result in discharge during ~4h).
Don't feel shocked when BME starting charging - after learning cycle - will leave device completely dark - some even think it's not something exactly inconvenient. Just engage lockslider 2 times to 'revive' your acting dead device ;-)
(or un-comment last line in calibrate-bq27k.sh which restarts mce and thus as well reverts backlight to normal operation)
PS: you'll probably need root for all of the above
enjoy
/jOERG
ps: you may want to check for improved or bugfixed script versions every now and then. I won't announce every minor update here.