Model: BPI R1
Firmware Version: OpenWrt Chaos Calmer 15.05-rc3 / LuCI Master (git-15.233.47308-791ca8b)
Kernel Version: 3.18.19
Other images on this same hardware had various methods to monitor the AXP209's battery port, so a script could check it every so often and provide a basic UPS service:
- If I remember right, an earlier version of OpenWRT had a
sensors
command that would print several things including the internal battery status. - The Lubuntu image can read
/sys/class/power_supply/battery/uevent
. - This wiki says that OpenWRT can read either of these files:
/sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/axp20-supplyer.28/power_supply/battery/current_now
/sys/power/axp_pmu/battery/amperage
But this OpenWRT image has no sensors
command, and all of these paths have problems:
/sys/class/power_supply/
exists, but is empty according tols
/sys/devices/platform/
exists and has stuff in it, butsunxi...
isn't one of them/sys/power/state
is an empty file, and the only thing in that directory (noaxp_pmu
)
dmesg | grep axp
returns:
[ 0.991670] axp20x-regulator axp20x-regulator: regulators node not found
[ 1.021570] axp20x 0-0034: AXP20X driver loaded
Does this image actually not have access to the AXP Power Management Unit?
Or is there something missing such that "the regulators aren't found" despite the driver loading?