Data provided by Battery and Power driver
This page lists the information you can gather from the battery and power supply in the pandora when it is booted. It lists readout data that is provided so that you can eg easily write your own applet showing current power status or include some power information in your application.
Power information is available via sysfs. This is the dmesg information about the battery:
bq27x00-battery 3-0055: support ver. 1.1.0 enabled
Fuel Gauge
This device is used to report how long the battery will run for. You can find the information at /sys/class/power_supply/bq27500-0. To read out the following information you can eg use 'cat' from a terminal. Here is a list of the provided information and how to interpret the values:
| node | meaning | interpretation |
|---|---|---|
| capacity | remaining capacity in % | 100=full, 0=empty |
| current_now | discharging/loading rate | µA; negative: discharging; positive: loading |
| present | is a battery inserted? | 1=yes; 0=no |
| status | Discharging/Charging | |
| temp | monitoring IC temperature | decidegree celsius, value of 250 = 25.0°C |
| time_to_empty_avg | battery time left based on drain on some average; not used in XFCE applet | seconds; only relevant/existing when discharging! |
| time_to_empty_now | time left based on current drain; used in the XFCE applet | seconds; only relevant/existing when discharging! |
| time_to_full_now | time left for charging with the current usage; not used in XFCE applet | seconds; only relevant/existing when charging! |
| type | should always read "Battery" since it is a battery... | |
| uevent | empty | |
| voltage_now | current voltage left | µV |
Power Management IC
This device manages the charging, from the mains charger or from USB. /sys/class/power_supply/twl4030_bci_battery/
- online
- 0 = No charger
- 2 = Mains charger
- 3 = USB charge
The mains charger takes precedence if USB and mains charger are plugged in. Pandora seems not to take power from both inputs for charging. Charging by USB only works with a powered system. If the system is off or the battery is empty, it is not possible to boot the system only by USB power (only tested on one Pandora, please recheck).
Please do keep in mind that all time values are plain estimates and can be "jumpy" depending on current system load, display brightness, WiFi/Bluetooth activity and things like the phase of the moon.