[PATCH v3] linux: Detect the battery of bluetooth input devices.
Martin Pitt
martin.pitt at ubuntu.com
Tue Sep 3 01:15:13 PDT 2013
Hey Shih-Yuan,
for the record, the Launchpad bugs have various upower --dump outputs
which are relevant for this:
http://pad.lv/1069075 attachment →
https://bugs.launchpad.net/ubuntu/+source/indicator-power/+bug/1069075/+attachment/3405886/+files/UPowerDump.txt
http://pad.pv/1086746 (inline)
http://pad.pv/1181640 (inline)
Note that all these already have "power supply: no", so at least that
property already seems to be correct.
I would like to create a test case for this to verify the fix and
ensure it stays working in the future. For this we need the sysfs
contents for these devices. Do you have such a device? I asked for it
in http://pad.lv/1153488, i. e. for
grep -r . /sys/class/power_supply/*hid*
I started writing a test case: http://paste.ubuntu.com/6058063/
But it needs to be updated with some real-life sysfs data, not just
from the bits that I reconstructed from above upower dumps.
Shih-Yuan Lee (FourDollars) [2013-09-02 17:50 +0800]:
> First, checking the device path. If it contains 'bluetooth', it is a bluetooth
> devices. Second, checking if there is an input folder. If there is mouse
> folder under the input folder, it is a mouse device. Otherwise, it is a
> keyboard device.
That's a rather complex logic indeed, so let's capture a keyboard and
a mouse in above test and ensure that upower detects the right thing
in all these.
Thanks!
Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
More information about the devkit-devel
mailing list