Provide device type for Low Energy devices
ClosedPublic

Authored by elvisangelaccio on Mar 15 2017, 10:39 PM.

Details

Summary

Bluetooth Low Energy devices have an invalid class value, so we cannot
use it to deduce the type of the device. Instead we can use the
appearance value. This is what bluez does to set a proper icon for the
device. The appearanceToType() function is adapted from the
gap_appearance_to_icon() function (bluez.git/src/dbus-common.c).

More info about appearance values in:
https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?id=7c2a566b8a95fe3a701941c7d46ddccb14a78dae

Test Plan

Bluedevil applet now shows 'Mouse' rather than 'Unknown' as type for my
Bluetooth Low Energy mouse.

Diff Detail

Repository
R269 BluezQt
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
Restricted Application added a project: Frameworks. · View Herald TranscriptMar 15 2017, 10:39 PM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript
elvisangelaccio edited the test plan for this revision. (Show Details)Mar 15 2017, 10:41 PM
drosca accepted this revision.Mar 16 2017, 8:14 AM
This revision is now accepted and ready to land.Mar 16 2017, 8:14 AM
This revision was automatically updated to reflect the committed changes.