Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] BLE Advertising Battery Level #338

Open
2 of 4 tasks
spit4520 opened this issue Dec 3, 2024 · 5 comments
Open
2 of 4 tasks

[Feature Request] BLE Advertising Battery Level #338

spit4520 opened this issue Dec 3, 2024 · 5 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@spit4520
Copy link

spit4520 commented Dec 3, 2024

Feature Request Type

  • Core functionality
  • Add-on hardware support (eg. audio, RGB, OLED screen, etc.)
  • Alteration (enhancement/optimization) of existing feature(s)
  • New behavior

Description

Hello,

I have the Keychron K10 Pro, and I love it. I would love it if I could submit a PR with the necessary changes to expose the the proper GATT service for the Battery Level. I have been writing automotive, infotainment, and embedded for for 10 years and I am willing to donate the feature. If you could please let me know if this is the correct repository so submit the PR, and give me the specifications you would require in order to merge this upstream, then I can get started. I understand that battery life could be a concern, so if you could provide your internal product goals on the refresh interval for the advertisement then I can make sure the PR is compliant.

I've loved my Keychron and this is the only feature that I have found in the last year that has been missing, you are doing a wonderful job and I'd love to volunteer to keep the ball rolling

Best,

S.Joseph

@spit4520 spit4520 added enhancement New feature or request help wanted Extra attention is needed labels Dec 3, 2024
@PeterMortensen
Copy link

Presuming it is the same thing, it works for the V6 Max (presumably the whole V Max series. And probably also the K Max and Q Max series).

Proof.

But not for the K Pro series in the same setup.

Presumably, they use different Bluetooth modules. I don't know if this has anything to do with it.

@bam80
Copy link

bam80 commented Dec 13, 2024

But not for the K Pro series in the same setup.

Might be related, please confirm:
#341

@PeterMortensen
Copy link

PeterMortensen commented Dec 27, 2024

But not for the K Pro series in the same setup.

Might be related, please confirm: #341

For a K5 Pro and V6 Max connected (and working fine) at the same time, I get, respectively ("EE:0A:F9:0F:92:FC" is the V6 Max),

bluetoothd -v
sudo btmgmt con 

Output:

5.53
6C:93:08:65:8E:E6 type BR/EDR
EE:0A:F9:0F:92:FC type LE Random

That is using a host side Bluetooth 5.3 adapter (PCIe, but the Bluetooth part is internally connected through USB).

Both keyboards have the latest official Bluetooth firmware (version 1.32 and 0.2.1, respectively) and main firmware close to the latest (compiled from source, approx. November 2024).

@bam80
Copy link

bam80 commented Dec 27, 2024

6C:93:08:65:8E:E6 type BR/EDR

So this is the problem - BR/EDR corresponds to Bluetooth 2.0/2.1, no BLE connection in this mode, and no battery services available.

Bluetooth Core specification versions
https://www.mathworks.com/help/bluetooth/gs/comparison-of-bluetooth-bredr-and-bluetooth-le.html

@PeterMortensen
Copy link

PeterMortensen commented Jan 30, 2025

Perhaps they copy-pasted the Bluetooth 5.1 claim for the K Pro series from the K series, which seem to have it?

With the V6 Max connected (and working properly):

upower --dump | grep keyboard -A 7

Output:

Device: /org/freedesktop/UPower/devices/keyboard_dev_DD_4B_7B_83_76_EE
  native-path:          /org/bluez/hci0/dev_DD_4B_7B_83_76_EE
  model:                Keychron V6 Max
  serial:               DD:4B:7B:83:76:EE
  power supply:         no
  updated:              Thu 01 Jan 1970 01:00:00 CET (1738250122 seconds ago)
  has history:          yes
  has statistics:       no
  keyboard
    present:             yes
    rechargeable:        no
    state:               unknown
    warning-level:       none
    percentage:          90%
    icon-name:          'battery-missing-symbolic'

With the K5 Pro connected (and working properly), the output is empty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants