Bananian

Missing AC and Battery in /sys/class/power_supply

4 608
Hi all,

I connected my Banana Pi to a battery and made a little GUI with battery indicator. To get battery capacity an so on, I read "/sys/class/power_supply/battery/uevent". Watching if battery is loading I do with "/sys/class/power_supply/ac/uevent".


I updated my Bananian to 16.04r01 and installed the linux-image-4.4-baniana Kernel 4.4.10. After Installing Kernel 4.4.10 /sys/class/power_supply/ does only have one folder: axp20x-usb. Uevent has the same structure, but I can't get any info about the battery.


Has anyone an idea, how I can get the information like before?


Donwgrading seems not the best option, because kernel 4.4.10 comes with configfs and libcomposite. I need this two modules for my project.


Hoping for good ideas.
Yours,
Martin
igorpec  
Edited by igorpec at Jul 15, 2016 12:43

Our 4.x kernel provide basic power / battery info.
http://forum.armbian.com/index.p ... ine-sysfs-interface
No need to use image / kernel from the thread. It's already build into by default for some time.

Edited by MartinKeppler at Jul 22, 2016 00:25

Hi igorpec,

thanks for the idea. I gave it a try. Seems to be working.
But now I got a new problem. I've installed Jessie 4.6.2 on my Banana Pi. While armbian is booting the first time, it expands the fs to fit the patition size. I need 1 GB for the g_mass_storage, but after expanding I only have 153 MB.
Do you have any expirience in stopping the expand of fs?


Martin

Ok, I got it!
First I used Rufu 2.9 to burn the image of armbian on my SD. After burning I took MiniTool Partition Wizard Free Edition 9.1 to create a separate partition on the SD card.

Rufus from here: https://rufus.akeo.ie
Partition Wizard from here: https://www.partitionwizard.com/free-partition-manager.html

Yours Martin

Note: The author has been banned or deleted.

You have to log in before you can reply Login | Sign Up

Points Rules