Check Battery Level for Keyboard
#10
Building the keyboard utilities on an SD card loaded up with the prerequisites and copying them over to the eMMC's /usr/local/sbin worked fine. (Since root privileges are needed to run them I put them in sbin.) To make it easy to check battery status from the command line I added /usr/local/sbin/ppkb-i2c-charger-ctl to the sudoers file as a command not requiring a password for sudo and added the following in .bashrc to make the command "kbatt" to check keyboard battery status:

Code:
alias kbatt='sudo /usr/local/sbin/ppkb-i2c-charger-ctl info'

Also the i2c-dev module is required to be loaded but apparently is not by default, so I added it to the /etc/modules file to hopefully be loaded at boot time.

I have not played around with any of the other options or utilities. Controlling power and charging between the phone's battery and the keyboard battery is still very much a work in progress as documented in Megi's development log:

https://xnux.eu/log/#057
  Reply


Messages In This Thread
Check Battery Level for Keyboard - by ragreenburg - 02-07-2022, 12:59 PM
RE: Check Battery Level for Keyboard - by Zebulon Walton - 02-07-2022, 08:35 PM
RE: Check Battery Level for Keyboard - by Savrik - 02-10-2022, 06:58 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  keyboard case charging but not typing new2pinephone 18 6,027 02-19-2024, 07:30 AM
Last Post: theResonant
  Keyboard doesn't charge my phone no matter what, so can I charge my phone directly ragreenburg 3 10,898 01-14-2024, 03:34 PM
Last Post: acid andy
  I've added an I2C connector to the PP keyboard eugenr 0 457 11-26-2023, 07:24 AM
Last Post: eugenr
  Update the PinePhone keyboard driver to support missing characters? Peter Gamma 8 8,297 10-22-2023, 08:43 PM
Last Post: Peter Gamma
  key repeat with pinephone keyboard rotwang 0 480 10-22-2023, 03:39 PM
Last Post: rotwang
Exclamation USB mouse isn't working when a PP keyboard is attached? mikeb 3 1,299 10-21-2023, 08:21 PM
Last Post: Peter Gamma
  Pinephone with mini keyboard, trackpad and large power bank? Peter Gamma 0 548 10-21-2023, 07:50 AM
Last Post: Peter Gamma
  Which mini keyboard and mouse to choose for the PP? Peter Gamma 0 648 10-21-2023, 02:55 AM
Last Post: Peter Gamma
  Use the Linux Console with the PinePhone Keyboard mburns 2 1,072 10-20-2023, 04:11 PM
Last Post: mburns
  How to disassemble Keyboard top and replace cables? elof 2 881 10-11-2023, 09:03 AM
Last Post: elof

Forum Jump:


Users browsing this thread: 1 Guest(s)