Openmoko Bug #1158: Charging stops even while connected
Openmoko Public Trac
bugs at docs.openmoko.org
Wed Dec 3 01:18:55 CET 2008
#1158: Charging stops even while connected
------------------------------+---------------------------------------------
Reporter: plr@… | Owner: openmoko-devel
Type: defect | Status: new
Priority: high | Milestone: Om2008.10
Component: System Software | Version: unspecified
Severity: critical | Resolution:
Keywords: power management | Blockedby:
Blocking: | Reproducible: sometimes
------------------------------+---------------------------------------------
Comment(by lindi):
I found a crude workaround: If battery capacity is less than 95% and the
battery is in state "Not charging" I switch to usb host mode and back to
device mode. After that battery switches back to "Charging" state and you
should always have a full battery if you have left the phone to charge
over night. My script to do this is very ugly but I thought I should
mention it here anyway:
{{{
#!/bin/sh
set -e
dir="/sys/devices/platform/bq27000-battery.0/power_supply/bat"
if [ ! -d $dir ]; then
dir="/sys/class/power_supply/battery"
fi
while true; do
echo -n "`date -Iseconds` `date +%s`"
for i in type status voltage_now current_now charge_full temp
technology present time_to_empty_now time_to_full_now capacity online; do
val="`cat $dir/$i | sed 's/ /_/'`"
echo -n " $val"
done
val="`cut -d' ' -f2 /proc/loadavg`"
echo -n " $val"
echo ""
if [ "`cat $dir/capacity`" -lt 95 ]; then
if [ "`cat $dir/status`" = "Not charging" ]; then
usbhost-start
usbhost-stop
fi
fi
sleep 120
done
}}}
--
Ticket URL: <https://docs.openmoko.org/trac/ticket/1158#comment:31>
docs.openmoko.org <http://docs.openmoko.org/trac/>
openmoko trac
More information about the buglog
mailing list