Jump to content

Recommended Posts

Posted

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.

Posted

I 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.

Posted

Thanks a lot for your reply. I could not find anything about the battery. This is a list of the folders in the path /sys/class/ the power_supply is empty.  Do you have any hints on how I should proceed?

ata_device    block         gpio          i2c-dev       mdio_bus      phy           pwm           scsi_host     udc
ata_link      devcoredump   graphics      ieee80211     mem           power_supply  regulator     sound         vc
ata_port      dma           hidraw        input         misc          ppp           rtc           spi_master    video4linux
backlight     extcon        hwmon         lcd           mmc_host      pps           scsi_device   thermal       vtconsole
bdi           firmware      i2c-adapter   leds          net           ptp           scsi_disk     tty           watchdog
 

Posted
4 hours ago, mido said:

I am using Openwrt with Lime2

 

If you don't use our kernel, this function might not be supported.If you do, check this part for reading things:
https://github.com/armbian/build/blob/master/packages/bsp/common/etc/update-motd.d/30-sysinfo#L53-L78

Another option is talking to AXP chip via I2C which is a bit more complicated. It was brought up once - do some forum search.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines