Ticket #241 (closed defect: fixed)

Opened 19 months ago

Last modified 19 months ago

A43 gen8 does not charge via USB

Reported by: CalcProgrammer1 Owned by: BuBu
Priority: major Milestone: Android 2.3 Bull
Component: Android 2.3 Version: Android 2.3 - Anoa
Keywords: Cc:

Description

On the A43 (and presumably other gen8's that only support USB charging), the device is never being put into charging mode. The USB cable is detected and the charging system is available, but it must be manually enabled each time to charge.

To put the device into charging mode:
echo 1 > /sys/devices/platform/battery/usb_online
echo 3 > /sys/devices/platform/battery/charge_level

Charge level is 1, 2, or 3 depending on level of current draw, not sure of the exact mA values for each.

The other thing that is probably necessary is to detect the USB status. I've found /sys/class/switch/USB_SWITCH/status which provides one of 3 values:
ATTACHED_VBUS - Shows when USB attached to a power source (mounted/unmounted doesn't seem to matter)
ATTACHED_HOST - Shows when USB OTG host mode is active
DETACHED - Shows when USB cable is disconnected or no USB power available

Note that if you leave the device with usb_online = 1 and charge_level not equal to zero, it will think it is charging even if the cable is unplugged. This can lead to mis-calculation of battery level (as it still shows 100% Charging when it is not) and the power LED keeps flashing even after the battery starts discharging (including when device is in sleep mode). Having charge_level set low may result in the battery being drained even while "charging". I'm not sure how it detects when a USB wall charger is used vs. a PC, but the A43 can fully charge while running off of either one (500mA).

Boot up messages:
logcat:  http://pastebin.com/QMuuTkR6
dmesg:  http://pastebin.com/6eYgfFgF

Attachments

Change History

Changed 19 months ago by divx118

  • status changed from new to closed
  • resolution set to fixed

Issue is solved by patching vold and tested on an A43, but should also work on A32. Patch file is pushed to the git. Code needs some improvement, but will do the job for now.  https://gitorious.org/openaos-cyanogenmod/device_archos/commit/160703b3ebb8131c8c3e0a72d7844663132c8f9a

Add/Change #241 (A43 gen8 does not charge via USB)

Author


E-mail address and user name can be saved in the Preferences.


Action
as closed
The resolution will be deleted. Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.