Welcome, Guest

Author Topic: Battery level on Lime2  (Read 619 times)

mhammouda

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Battery level on Lime2
« on: April 01, 2018, 03:33:47 AM »
Hi,
I started using Lime2 recently. I am using OpenWRT with Lime2. I am powering the board using LiPo battery. I could not find a way to find the battery level. I use SSH to communicate with the board. Is there any script or way to find the battery level through SSH. Help, please.

Gerrit

  • Full Member
  • ***
  • Posts: 244
  • Karma: +7/-0
Re: Battery level on Lime2
« Reply #1 on: April 01, 2018, 01:56:04 PM »
cat /sys/class/power_supply/battery/status

will give you the status,
and you can find more information in the directory /sys/class/power_supply/battery/ reading the files in it

elvisfernandes

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: Battery level on Lime2
« Reply #2 on: June 14, 2018, 03:11:23 PM »
hello,
 haven't one to test, but generally you find this on sys/class/power/...  after power maybe battery/status or battery/voltage.
To read
cat /sys/class/power/battery/voltage
This path is only a sample, you have to look inside sys/class/power/ the correct one.


ronin07

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: Battery level on Lime2
« Reply #3 on: September 16, 2018, 10:55:19 AM »
Another option is talking to AXP chip via I2C which is a bit more complicated. I am sure i saw that thread once in some forum - do some forum search. Sorry couldn't find the link to that forum thread. Google might become your lifesaver.

andru97

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: Battery level on Lime2
« Reply #4 on: September 18, 2018, 05:16:18 PM »

Howdy,

I began utilizing Lime2 as of late. I am utilizing OpenWRT with Lime2. I am driving the board utilizing LiPo battery. I couldn't figure out how to discover the battery level. I utilize SSH to speak with the board. Is there any content or approach to discover the battery level through SSH. Help, if you don't mind.
 ;D ;D


Regards,


Download Terrarium TV for PC.

Install terrarium tv app on roku

LubOlimex

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1798
  • Karma: +46/-2
Re: Battery level on Lime2
« Reply #5 on: September 19, 2018, 07:13:01 AM »
Maybe the OpenWRT doesn't support it out-of-the-box. Worth asking the OpenWRT community. If it doesn't support it then you can access the AXP209 power management chip via I2C and read it, but this might be a little bit more complicated (but challenge will not stop you I hope). Refer to the AXP209 documentation about the registers.

Another option is to switch to our Debian or Armbian images, or use Armbian directly, these support battery level in the kernel and you can find the level with a command or even application.
Technical support and documentation manager at Olimex