Re: Bluetooth LE battery reporting?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2017-09-06 at 16:37 +0200, Bastien Nocera wrote:
> On Wed, 2017-09-06 at 10:40 +0200, Marcel Holtmann wrote:
> > 
> 
> <snip>
> > I assumed that it is forbidden to include HID battery reporting
> > events via the GATT HID descriptors. I think the standard clearly
> > says these have to come via battery service and not via HID.
> 
> So we're back to implementing battery reporting as a separate
> profile.
> What would be a good example/skeleton to use to implement this?

This is what I managed to do so far:
https://github.com/hadess/bluez/commits/ble-battery

A first (gentle) pass at a review would be nice, especially if there's
a better way to get notifications on both the attributes in one go.

The second question is how I would export this.

I'm currently thinking that exporting a new interface on the device
itself might be the best idea, and I'll monitor devices directly in
UPower to export them to desktops. Would that be a good way?

And as UPower will be the likely consumer of this data, I think I'll
try mapping this set of flags:
https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.characteristic.battery_power_state.xml
to UPower properties rather than trying to export it as-is.

Cheers
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux