This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1823697 - Export the battery level advertised through AVRCP
Summary: Export the battery level advertised through AVRCP
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: bluez
Version: 8.3
Hardware: Unspecified
OS: Linux
low
low
Target Milestone: rc
: 8.0
Assignee: D. Marlin
QA Contact: Vilém Maršík
URL:
Whiteboard:
Depends On: 1694133
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-14 09:59 UTC by gopal krishna tiwari
Modified: 2023-10-06 19:38 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1694133
Environment:
Last Closed: 2023-09-02 14:33:28 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker   RHEL-2044 0 None Migrated None 2023-09-02 14:33:21 UTC

Comment 1 gopal krishna tiwari 2020-04-16 08:52:18 UTC
Hi Andreas, 

Can you please check and verify over upstream bluez version which is currently 5.54. If it works I'll re-sync it with rhel-8.3. 

Thanks 
Gopal

Comment 2 Andreas Bleischwitz 2020-04-16 09:19:16 UTC
Hi Gopal,

I tested on bluez-5.54-1.fc31.x86_64 and did not see any power reported by my bluetooth device.

I will attach Teufel-Real-Blue-NC-power-on.pcapng with a packet dump taken during power-on and power-off of that device.
Hope it helps.

Best regards,

/Andreas

Comment 4 gopal krishna tiwari 2020-04-21 07:20:09 UTC
Hi Andreas, 

I've checked the code for bluez seems like we have support for AVRCP and could see the patches also available. We probably have to check are there any configuration changes require or the device does support that or not ?. 

Can you help me out with some bluez debug logs as well as with the packet dump ? 

Another can you help me with the method you are testing with so that I also can try at my end.

Thanks 
Gopal

Comment 5 Andreas Bleischwitz 2020-05-13 10:29:53 UTC
Hi Gopal,

sorry for coming back to you late.

Yes for sure I would assist where ever possible. I just found that I may be able to provide some bluetooth dumps from my mobile which does show the battery-level.

My testing had been limited to pairing a bluetooth device (headset in my case) which does report it's battery-level on a mobile-phone. After the device was connected, I checked whether there was an entry visible in the "power" tab of gnome-settings - which was not.

If you would provide further advise how to provide logs/dumps/states, I'm happy to help.

Thanks
/Andreas

Comment 6 gopal krishna tiwari 2020-05-13 11:20:49 UTC
(In reply to Andreas Bleischwitz from comment #5)
> Hi Gopal,
> 
> sorry for coming back to you late.
> 
> Yes for sure I would assist where ever possible. I just found that I may be
> able to provide some bluetooth dumps from my mobile which does show the
> battery-level.
> 
> My testing had been limited to pairing a bluetooth device (headset in my
> case) which does report it's battery-level on a mobile-phone. After the
> device was connected, I checked whether there was an entry visible in the
> "power" tab of gnome-settings - which was not.
> 
> If you would provide further advise how to provide logs/dumps/states, I'm
> happy to help.
> 
> Thanks
> /Andreas

Thanks Andreas, 

1) How to ? 

$ \<edit\> /usr/lib/systemd/system/bluetooth.service
\<add '-d' to ExecStart line as option to bluetoothd\> as follows :

ExecStart=/usr/libexec/bluetooth/bluetoothd -d 

\<save and quit\>

$ systemctl daemon-reload
$ systemctl restart bluetooth

To capture the log

$ journalctl -r -u bluetooth > output_to_a_file.log 

2) In parallel you can start btmon capture as well.

Please share out put of both.  

Gopal..

Comment 16 gopal krishna tiwari 2020-05-25 07:24:05 UTC
Hi Gnome-bluetooth team, 

Do you suggest any application which display's bluetooth-battery level or support bluetooth battery level ? or can you help me in approaching to the right team ? 

Thanks 
Gopal Tiwari

Comment 17 Bastien Nocera 2020-06-26 09:01:09 UTC
(In reply to gopal krishna tiwari from comment #16)
> Hi Gnome-bluetooth team, 
> 
> Do you suggest any application which display's bluetooth-battery level or
> support bluetooth battery level ? or can you help me in approaching to the
> right team ? 

Sorry, I don't understand what's being asked here. If the battery information
isn't exported, then there will be nothing to show it.

Did you figure out which battery protocol the headset uses?

Comment 18 gopal krishna tiwari 2020-06-29 07:07:02 UTC
(In reply to Bastien Nocera from comment #17)
> (In reply to gopal krishna tiwari from comment #16)
> > Hi Gnome-bluetooth team, 
> > 
> > Do you suggest any application which display's bluetooth-battery level or
> > support bluetooth battery level ? or can you help me in approaching to the
> > right team ? 
> 
> Sorry, I don't understand what's being asked here. If the battery information
> isn't exported, then there will be nothing to show it.
> 
> Did you figure out which battery protocol the headset uses?

As far as I could read Gatt doesn't have anything related to battery profile. So I am assuming avrcp as I can see from journalctl logs its mostly dealing in avrcp code path. Let me know if I missing anything.

Gopal

Comment 19 Bastien Nocera 2020-07-01 08:17:25 UTC
(In reply to gopal krishna tiwari from comment #18)
<snip>
> As far as I could read Gatt doesn't have anything related to battery
> profile. So I am assuming avrcp as I can see from journalctl logs its mostly
> dealing in avrcp code path. Let me know if I missing anything.

You need to find out what battery protocol is used, then implement said battery level
reading in the right place, depending on that protocol.

This issue has some hints:
https://gitlab.freedesktop.org/upower/upower/-/issues/38

There's nothing to be done in gnome-bluetooth, and unfortunately, I don't have the time
nor the hardware to look into this myself so I'll reassign to bluez.

Comment 20 gopal krishna tiwari 2020-07-01 10:01:00 UTC
(In reply to Bastien Nocera from comment #19)
> (In reply to gopal krishna tiwari from comment #18)
> <snip>
> > As far as I could read Gatt doesn't have anything related to battery
> > profile. So I am assuming avrcp as I can see from journalctl logs its mostly
> > dealing in avrcp code path. Let me know if I missing anything.
> 
> You need to find out what battery protocol is used, then implement said
> battery level
> reading in the right place, depending on that protocol.
> 
> This issue has some hints:
> https://gitlab.freedesktop.org/upower/upower/-/issues/38
> 
> There's nothing to be done in gnome-bluetooth, and unfortunately, I don't
> have the time
> nor the hardware to look into this myself so I'll reassign to bluez.

Sure, will try. So what I understood upower will display once we have things in place.

Gopal

Comment 21 Bastien Nocera 2020-07-01 10:26:50 UTC
(In reply to gopal krishna tiwari from comment #20)
<snip>
> Sure, will try. So what I understood upower will display once we have things
> in place.

If, and only if, that battery information is exported through the org.bluez.Battery1
interface in bluez. There's currently no support for any other type of battery reporting
in any other parts of the stack.

Comment 22 gopal krishna tiwari 2020-07-01 11:05:55 UTC
(In reply to Bastien Nocera from comment #21)
> (In reply to gopal krishna tiwari from comment #20)
> <snip>
> > Sure, will try. So what I understood upower will display once we have things
> > in place.
> 
> If, and only if, that battery information is exported through the
> org.bluez.Battery1
> interface in bluez. There's currently no support for any other type of
> battery reporting
> in any other parts of the stack.

Ok sure, I've checked if we have this interface supported mostly with the hardware I have but I am getting 

 "No such interface 'org.bluez.Battery1'". 

Gopal

Comment 27 Doug Ledford 2023-08-31 13:44:08 UTC
This bug is scheduled for migration to Jira.  When that happens, this bugzilla issue will be permanently closed with the status MIGRATED and all future interaction on this issue will need to happen in the Jira issue.  The new issue will be part of the RHEL project (a project for Jira only issues, which will sync once, then close the bugzilla issue and all future updates will happen in Jira), not part of the RHELPLAN project (which is part of the automated bugzilla->Jira mirroring and which allows ongoing updates to the bugzilla bug and syncs those updates over to Jira).

For making sure you have access to Jira in order to continue accessing this issue, follow one of the appropriate knowledge base articles:

KB0016394 - https://redhat.service-now.com/help?id=kb_article_view&sysparm_article=KB0016394
KB0016694 - https://redhat.service-now.com/help?id=kb_article_view&sysparm_article=KB0016694
KB0016774 - https://redhat.service-now.com/help?id=kb_article_view&sysparm_article=KB0016774

For general issues with Jira, open a ticket with rh-issues

Comment 28 RHEL Program Management 2023-09-02 14:31:46 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 29 RHEL Program Management 2023-09-02 14:33:28 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues.

Comment 30 Doug Ledford 2023-09-08 17:30:47 UTC
Additional information on creating a Jira account to access the migrated issue can be found here:

https://access.redhat.com/articles/7032570


Note You need to log in before you can comment on or make changes to this bug.