Skip to content
This repository has been archived by the owner on Nov 6, 2023. It is now read-only.

show battery percentage of paired devices #14

Closed
marceloiavenissi opened this issue Feb 1, 2020 · 6 comments · Fixed by #42
Closed

show battery percentage of paired devices #14

marceloiavenissi opened this issue Feb 1, 2020 · 6 comments · Fixed by #42

Comments

@marceloiavenissi
Copy link

marceloiavenissi commented Feb 1, 2020

Hello, in my day-to-day, I use several bluetooth devices with their own battery, but there is no indication of the percentage.
On my Android, I use the BatON application that provides this information; it would be very useful for users to view this information in that extension as well.

Link to BatON: https://play.google.com/store/apps/details?id=com.limi.baton&hl=pt_BR

Please can you implement this because it would be very useful for me? I am grateful.

@bjarosze
Copy link
Owner

I've tried to add this feature, but can't find a way to get battery level of bluetooth device on linux.
I will keep this issue opened. Maybe in future this will be possible.

@pacho2
Copy link

pacho2 commented May 23, 2020

@alexwbaule
Copy link

Hi guys.

I think its possible.

https://github.com/TheWeirdDev/Bluetooth_Headset_Battery_Level

For me, works well, to get my Headset battery level.

I can help to geyt this to work.

@sfllaw
Copy link

sfllaw commented Apr 26, 2021

I'm pretty sure UPower can give you this information:

slaw@nyancat:~$ bluetoothctl devices
Device D9:86:B5:62:2C:85 MX Anywhere 3
slaw@nyancat:~$ upower -i /org/freedesktop/UPower/devices/mouse_dev_D9_86_B5_62_2C_85
  native-path:          /org/bluez/hci0/dev_D9_86_B5_62_2C_85
  model:                MX Anywhere 3
  serial:               D9:86:B5:62:2C:85
  power supply:         no
  updated:              Wed 31 Dec 1969 04:00:00 PM PST (1619398947 seconds ago)
  has history:          yes
  has statistics:       no
  mouse
    present:             yes
    rechargeable:        no
    state:               unknown
    warning-level:       none
    percentage:          55%
    icon-name:          'battery-missing-symbolic'

@jp7677
Copy link

jp7677 commented Sep 8, 2021

Not sure how usable or up-to-date this is , but here is another gnome extension that fetches the battery percentage using upower for a specific Bluetooth tablet: https://github.com/fthx/wacom-indicator/blob/main/extension.js#L74 May be that provides some inspirations.

@kassick
Copy link
Contributor

kassick commented Oct 9, 2021

Headset battery is (currently) an experimental feature of bluez. Experimental features can be enabled by passing the -E flag to bluetoothd

  1. create a systemd drop-in /etc/systemd/system/bluetooth.service.d/10-experimental.conf with contents
[Service]
ExecStart=
ExecStart=/usr/libexec/bluetooth/bluetoothd -E none

(see #42 (comment))

  1. systemctl daemon-reload
  2. systemctl restart bluetoothd

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants