Forcing fast charge mode
This page is intended to consolidate the information about forcing fast charge mode on the Neos.
When is this necessary
By default, the Neos will only draw 100 mA of power from a USB connection, in accordance with the standard. This is not much power. The Neo almost always draws more than 100 mA to operate. So the battery can actually go dead while the Neo is plugged in and you think it is charging. But:
If the Neo recognizes the connection as a "smart" USB connection (by communicating with the host about power availability) or as a standard Openmoko charger (by recognizing an expected resistance across two of the connectors) then it will switch into 'fast charge mode', drawing 500 mA or 1000 mA.
The detection logic is done in software, one can bypass it. If the USB charger used is not signaling the phone its capacity to deliver 500 or 1000 mA, then one may use these scripts to force fast charge mode anyway. Please double check. Trying to draw 1A from an electric system rated lower will lead to overheating and physical damage.
The behaviour is pretty much the same as described below for the Neo 1973. There's also a 1000 mA mode for the Openmoko-provided wall charger. Please note, that the sys-fs path changed slightly. It is now /sys/devices/platform/s3c2440-i2c/i2c-adapter/i2c-0/0-0073/ .
See the GTA02 sysfs page for a description of how to set/get the bit controlling power charge from the FR. What you want to do is something like this:
cat /sys/class/i2c-adapter/i2c-0/0-0073/usb_curlim echo 500 > /sys/class/i2c-adapter/i2c-0/0-0073/force_usb_limit_dangerous cat /sys/class/i2c-adapter/i2c-0/0-0073/usb_curlim
The battery package
Here's a nicely packaged battery level and charge state script:
- Package: http://hdr.meetr.de/neo/openmoko/battery/battery_0.20080721_armv4t.ipk
- Screenshot: http://hdr.meetr.de/neo/openmoko/battery/battery_05.png
1. If you see no icon on your desktop, just edit /usr/share/applications/battery.desktop changing the line
2. If program cannot be launch because of a python error, check line 82 in :
and replace the init call by _init, that is add an underscore.
Nytowl's power center
User:Nytowl wrote a python script to control the fast charge states : Power Center.
Power Center allows you to force a Neo FreeRunner into Fast charge modes. It can damage your hardware so be careful with what its plugged into. I'm not responsible if you toast the USB port on your brand new laptop.
copy Power Center into /usr/bin and "chmod u+x /usr/bin/power_center"
copy Power Center Desktop fileinto /usr/share/applications
To enable fast 500 mA charge "touch /home/root/allow_force_500"
To enable fast 1000 mA charge "touch /home/root/allow_force_1000" I don't recommend using this one
Beni wrote a small shellscript providing status output and the ability to change charge settings. Just download the script and execute it. You can fetch it here: http://beni.skyforcesystems.de/openmoko/fast_charge_gta02.sh
This battery monitor batmon.py can force fast-charge mode.
The Battery project
See this other Battery project on the forge.
Neo 1973 and the checkFastCharge.py daemon
There are several ways of forcing fast charge mode:
- From a terminal or ssh session, execute '
echo -n "fast_cccv" > /sys/devices/platform/s3c2410-i2c/i2c-adapter/i2c-0/0-0008/chgmode'
- To add a uboot menu entry, see Bootloader commands
- Use a script. User:Wurp has written a python script to monitor for slow charge and automatically pop up a gui asking if you want to switch to fast charge, see next CheckFastrCharge.py below.
What it does
Your neo will detect when it is charging slowly and pop up a gui to ask if you want to switch to fast charge mode. It will take a few seconds to detect that you are charging slowly.
This will not work for the FreeRunner. Andy Green has a patch to give the FreeRunner the needed functionality, then I'll need to update my script after that becomes available.
checkFastCharge will remember if you select slow charge and not ask you again. If you accidentally selected slow charge, unplug the neo from the charger for several seconds, then plug it back in. Next time the script checks, it will ask again if you want slow or fast charge.
When you select fast charge, the script goes through a confirmation sequence, because fast charge can be dangerous for your hardware if the charger doesn't support 500 mA or more. Just click 'Confirm' four times to confirm that you want to go into fast charge mode.
Install as a daemon
On your neo, with an internet connection available:
- cd /
- wget http://static.frimp.net/neo/checkFastCharge.tgz
- tar xzf checkFastCharge.tgz
- /etc/init.d/checkFastCharge start
(The above just creates /home/root/bin/checkFastCharge.py, /etc/init.d/checkFastCharge, and the links to make checkFastCharge start up automatically when the neo reboots.)
Just install the script
If you want to run checkFastCharge manually, without the /etc/init.d script...
- Download the tgz
- extract checkFastCharge.py from the tgz to somewhere on your path
I'll package this up into an ipkg with an /etc/init.d and a startup script when I get the time...
Options are only available if you run the script manually, rather than through /etc/init.d
- -f means start up even if the script thinks another instance is running
- -d means check every few seconds for slow charge (without this flag it just checks once immediately)
- -q means don't print out messages on the terminal about what the script is doing