Forcing fast charge mode

From Openmoko

(Difference between revisions)
Jump to: navigation, search
m (Neo 1973: Minor language fixes)
(Using a script: Paste two more projects)
Line 55: Line 55:
  
 
[[Special:Emailuser/Beni|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
 
[[Special:Emailuser/Beni|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
 +
 +
'''or (3rd)'''
 +
 +
This battery monitor [http://tehinterweb.com/freerunner/batmon/ batmon.py] can force fast-charge mode.
 +
 +
'''or (4th)'''
 +
 +
See this other [http://projects.openmoko.org/projects/battery/ Battery] project on the forge.
  
 
== The checkFastCharge.py daemon ==
 
== The checkFastCharge.py daemon ==

Revision as of 09:27, 1 October 2008

This page is intended to consolidate the information about forcing fast charge mode on the Neos.

Contents

Why this may be necessary

By default, the Neos will only draw 100 mA of power from a USB connection.

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.

If the USB charger used is not properly signaling the phone its capacity to deliver 500 or 1000 mA, then you may (at your own risk) use this switch to force that mode (more details at http://quickstart.openmoko.org/#chargerdetection).

This switch is important, since the Neo almost always draws more than 100 mA to operate (I believe even while it's turned off, since the GSM stays powered up by default), so the battery will actually go dead while the Neo is charging!

Neo 1973

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

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.

Neo FreeRunner

The behaviour is pretty much the same as described above for the Noe 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/ .

Using a script

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

Here's a nicely packaged battery level and charge state script

http://hdr.meetr.de/neo/openmoko/battery/battery_0.20080721_armv4t.ipk

or

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

or (2nd)

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

or (3rd)

This battery monitor batmon.py can force fast-charge mode.

or (4th)

See this other Battery project on the forge.

The checkFastCharge.py daemon

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.

Details

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:

  1. cd /
  2. wget http://static.frimp.net/neo/checkFastCharge.tgz
  3. tar xzf checkFastCharge.tgz
  4. cfc-inst
  5. /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...

  1. Download the tgz
  2. 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

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
Personal tools

This page is intended to consolidate the information about forcing fast charge mode on the Neos.

Why this may be necessary

By default, the Neos will only draw 100 mA of power from a USB connection.

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.

If the USB charger used is not properly signaling the phone its capacity to deliver 500 or 1000 mA, then you may (at your own risk) use this switch to force that mode (more details at http://quickstart.openmoko.org/#chargerdetection).

This switch is important, since the Neo almost always draws more than 100 mA to operate (I believe even while it's turned off, since the GSM stays powered up by default), so the battery will actually go dead while the Neo is charging!

Neo 1973

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

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.

Neo FreeRunner

The behaviour is pretty much the same as described above for the Noe 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/ .

Using a script

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

Here's a nicely packaged battery level and charge state script

http://hdr.meetr.de/neo/openmoko/battery/battery_0.20080721_armv4t.ipk

or

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

or (2nd)

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

The checkFastCharge.py daemon

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.

Details

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:

  1. cd /
  2. wget http://static.frimp.net/neo/checkFastCharge.tgz
  3. tar xzf checkFastCharge.tgz
  4. cfc-inst
  5. /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...

  1. Download the tgz
  2. 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

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