#Power Reporting to PopOs on a nice_nano v2 Macropad

1 messages · Page 1 of 1 (latest)

pulsar gyro
#

Hey everyone! I am trying to get my custom Macropad to report the battery power. I'd like to see the power in PopOs power menu, or by doing upower from the terminal. I am using a nice_nano v2 and running PopOs (fairly similar to Ubuntu).

Following this https://zmk.dev/docs/config/battery I have added CONFIG_ZMK_BLE=y to my conf file. Here is my complete .conf File https://pastebin.com/9QYG7rUu.

According to https://zmk.dev/docs/features/battery I have to enable a sensor by adding it to my .dts file. I dont have a .dts since i couldnt get it to work with it. Pretty much all my configuration is in my .overlay here https://pastebin.com/EmNhtsRg.

A few points that might help you help me:

  • I am fairly inexperienced using git, and couldnt really get the zmk-config route to work.
  • I cloned the zmk Repo, added my board as a folder there and am builindg locally using the west commands.
  • I want to build a custom split keyboard and am using a Macropad as a lil prototype.
  • I understood that .dts files are not needed when the keyboard isn't split, so I dont have one but the doc for battery reference the .dts file.
  • The Macropad works - It connects to the machine without a problem, the keys/layers work as expected. The Encoder works, it just runs out of power without me noticing haha.

See the battery level feature page for more details on configuring a battery sensor.

If your keyboard has a battery sensor, ZMK will report its battery level to the connected bluetooth host and show it on the keyboard's display, if it has one.

brazen chasm
pulsar gyro
#

That is the guideline I followed, I have created a shield called Marsupad.
The Command I use to build is:
west build -p -b nice_nano_v2 -- -DSHIELD=marsupad
I assume it would bind(?) to this config for the nice_nano_v2 https://github.com/zmkfirmware/zmk/blob/2c50cff891becd70e04152202ee76a1be95089fa/app/boards/arm/nice_nano/nice_nano_v2.dts

But with or without my changes I don't get the power state info into my OS. upower -e Lists only 2 devices:
/org/freedesktop/UPower/devices/mouse_hidpp_battery_0
/org/freedesktop/UPower/devices/DisplayDevice

GitHub

ZMK Firmware Repository. Contribute to zmkfirmware/zmk development by creating an account on GitHub.

pulsar gyro
brazen chasm
#

Well...best of luck troubleshooting why it doesn't work on your OS/hardware. You might want to try building against that PR to see if it helps.

#

(Absolutely no sarcasm intended. I'm speaking as someone who just put Fedora on an old laptop only to find out I cannot pair my keyboard to it at all; an apparent regression from Ubuntu 20.04. Different hardware works just fine for others with Fedora, I should point out.)

#

I don't know how you've got your local git repo setup, but if the zmkfirmware/zmk repo is your origin, you could grab that PR locally with

git fetch origin pull/2045/merge
git checkout FETCH_HEAD

(you can go back to normal with git checkout <name_of_branch>, probably git checkout main)

pulsar gyro
#

Mmh thank you for the encouragement 😄 I dug a very old windows laptop out of the basement, it gets information about the power state so I assume it is something that I'd have to fix on the OS side of things.