Hello
I bought my battery on eBay : 8000 mah and I use this OS : ARMbian Vanilla version.
When this battery is connected to my Olimex A20 I can have these information's at the first boot :
olimex@LUIGI:~$ sudo cat /sys/devices/platform/soc@01c00000/1c2ac00.i2c/i2c-0/0-0034/battery/charge
-8100
olimex@LUIGI:~$ sudo cat /sys/devices/platform/soc@01c00000/1c2ac00.i2c/i2c-0/0-0034/battery/amperage
221500
After 1 hour, I can have these information's :
olimex@LUIGI:~$ sudo cat /sys/devices/platform/soc@01c00000/1c2ac00.i2c/i2c-0/0-0034/battery/charge
-408234
olimex@LUIGI:~$ sudo cat /sys/devices/platform/soc@01c00000/1c2ac00.i2c/i2c-0/0-0034/battery/amperage
219500
How I can interpret these values ? I have no more information's.
Does the battery sold by Olimex provide more information's ?
My goal it's to have to calculate the remaining time for my battery
Thanks for your help.
At a glance looks like a bug in Linux (armbian/driver/...)
John
Thanks John I will post my question on this forum.
I hope to have a solution, because the official linux distribution provide by Olimex doesn't boot (Debian Jessie release 5 )...but after check , by writing this message : I saw a new release >> Release 6...I will test it now...
I'll keep you informed...
Quote from: JohnS on June 27, 2016, 08:56:30 PM
At a glance looks like a bug in Linux (armbian/driver/...)
John
Hi
You are right : it's a but ! After test Debian Jessie release 6 > I can see my battery, but I'm still locked at the same step : cannot configure the fed file ! no tools available to do it. ARMbian cannot manage battery LiPo, it's a pity !
Quote from: JohnS on June 27, 2016, 08:56:30 PM
At a glance looks like a bug in Linux (armbian/driver/...)
John
After check on ARMbian forum : this feature was disable ! It didn't work as expected, it's a pity !
Last time I was checking on this it was working - we could retrieve battery information in Vanilla kernel, but that's all what you can do at the moment.
QuoteAfter check on ARMbian forum : this feature was disable ! It didn't work as expected, it's a pity !
Where exactly did you find this info?
Check this:
http://forum.armbian.com/index.php/topic/611-wip-axp209-mainline-sysfs-interface/
Quote from: igorpec on June 29, 2016, 08:51:51 PM
Where exactly did you find this info?
Hi Igor
I found this information here : http://forum.armbian.com/index.php/topic/234-olimex-lime2-battery-support/?hl=%2Blime2.bin+%2Bbattery
This is a misunderstanding on my part?
Quote from: igorpec on June 29, 2016, 08:51:51 PM
Check this:
http://forum.armbian.com/index.php/topic/611-wip-axp209-mainline-sysfs-interface/
Thanks I'll check that.
QuoteI found this information here : http://forum.armbian.com/index.php/topic/234-olimex-lime2-battery-support/?hl=%2Blime2.bin+%2Bbattery
This is a misunderstanding on my part?
That's an old info. It was fixed in the mean time. Here is the patch if you want to DIY:
https://github.com/igorpecovnik/lib/blob/master/patch/kernel/sunxi-next/axp20x-sysfs-interface.patch
Otherwise its built in our recent kernel by default.
Quote from: igorpec on June 29, 2016, 08:51:51 PM
Check this:
http://forum.armbian.com/index.php/topic/611-wip-axp209-mainline-sysfs-interface/
Hi Igor
I checked this link :
- When my battery is connected and I use a power supply 5V / 1,5A : the battery doesn't fo in charging phase
- When my battery is connected and I user power supply 5V / 2A via USB OTG : the battery doesn't fo in charging phase
And I've got this result :
root@LUIGI:~# cat /sys/power/axp_pmu/battery/amperage
0
root@LUIGI:~# cat /sys/power/axp_pmu/battery/capacity
0
root@LUIGI:~# cat /sys/power/axp_pmu/battery/charge
0
root@LUIGI:~# cat /sys/power/axp_pmu/battery/charging
0
root@LUIGI:~# cat /sys/power/axp_pmu/battery/connected
1
root@LUIGI:~# cat /sys/power/axp_pmu/battery/power
0
root@LUIGI:~# cat /sys/power/axp_pmu/battery/ts_voltage
0
root@LUIGI:~# cat /sys/power/axp_pmu/battery/voltage
0
And on the boot I still got this status :
root@LUIGI:~# dmesg | grep axp
[ 3.771491] axp20x 0-0034: AXP20x variant AXP209 found
[ 3.784942] input: axp20x-pek as /devices/platform/soc@01c00000/1c2ac00.i2c/i2c-0/0-0034/axp20x-pek/input/input0
[ 3.791967] axp20x 0-0034: Battery detection is disabled, enabling
[ 3.792715] axp20x 0-0034: Backup (RTC) battery charging is disabled
[ 3.792941] axp20x 0-0034: AXP20X driver loaded
My release is (Vanilla Jessie server 5.10) :
root@LUIGI:~# cat /proc/version
Linux version 4.5.5-sunxi (root@pluton) (gcc version 5.3.1 20160413 (Ubuntu/Linaro 5.3.1-14ubuntu2) ) #10 SMP Mon May 23 22:10:54 CEST 2016
root@LUIGI:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 8.5 (jessie)
Release: 8.5
Codename: jessie
Do you know where is my problem ?
I saw a new release : 5.14 ! I'll test it.
Thanks
Quote from: igorpec on June 30, 2016, 09:15:12 AM
QuoteI found this information here : http://forum.armbian.com/index.php/topic/234-olimex-lime2-battery-support/?hl=%2Blime2.bin+%2Bbattery
This is a misunderstanding on my part?
That's an old info. It was fixed in the mean time. Here is the patch if you want to DIY:
https://github.com/igorpecovnik/lib/blob/master/patch/kernel/sunxi-next/axp20x-sysfs-interface.patch
Otherwise its built in our recent kernel by default.
Hi
I tested the last release "Xenial Server 5.14" > same problem
I've got this information on startup :
root@lime2:~# dmesg | grep axp
[ 4.721639] axp20x-i2c 0-0034: AXP20x variant AXP209 found
[ 4.740780] input: axp20x-pek as /devices/platform/soc@01c00000/1c2ac00.i2c/i2c-0/0-0034/axp20x-pek/input/input0
[ 4.752024] ldo1: supplied by axp-ipsout
[ 4.757262] ldo2: supplied by axp-ipsout
[ 4.761971] ldo3: supplied by axp-ipsout
[ 4.766239] ldo4: supplied by axp-ipsout
[ 4.771651] dcdc2: supplied by axp-ipsout
[ 4.776501] dcdc3: supplied by axp-ipsout
[ 4.782804] axp20x-i2c 0-0034: Battery detection is disabled, enabling
[ 4.790129] axp20x-i2c 0-0034: Backup (RTC) battery charging is disabled
[ 4.797090] axp20x-i2c 0-0034: AXP20X driver loaded
Any idea ?
Thanks
Than I guess my knowing is also not updated, perhaps this is broken again. Best is to open an issue (https://github.com/igorpecovnik/lib/issues) (copy/paste your findings) and wait that author come up with ideas or fix it. I know that driver has limited functionality at this point - I think only battery voltage reading is operational, the rest is waiting to be done.
Hi Igor,
Thanks. I created an issue on the tracker.
Pending this result : I installed the last official release provided by Olimex and its works as expected : I can monitor my battery and charge my battery via my Olimex
I hope to have a solution for ARMbian system.
Cheers
Quote from: LittleScarabee on July 01, 2016, 09:42:13 PM
Hi Igor,
Thanks. I created an issue on the tracker.
Pending this result : I installed the last official release provided by Olimex and its works as expected : I can monitor my battery and charge my battery via my Olimex
I hope to have a solution for ARMbian system.
Cheers
Battery monitoring works fine with Armbian legacy kernel (3.4.112), the exact same way as on stock images, while "ARMbian Vanilla version" uses modern (4.6.2 currently) kernel. One of the core crew made the driver and since it's not done, you won't find it elsewhere.
Quote from: igorpec on July 02, 2016, 08:11:19 AM
Battery monitoring works fine with Armbian legacy kernel (3.4.112), the exact same way as on stock images, while "ARMbian Vanilla version" uses modern (4.6.2 currently) kernel. One of the core crew made the driver and since it's not done, you won't find it elsewhere.
Yes its works. Thanks for this information.