linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Iain Hibbert <plunky-+vE1BRBCC0GuOtvtkYNheg@public.gmane.org>
To: Jiri Kosina <jkosina-AlSwsSmVLrQ@public.gmane.org>
Cc: Bastien Nocera <hadess-0MeiytkfxGOsTnJN9+BGXg@public.gmane.org>,
	linux-bluetooth-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-input <linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: Apple Bluetooth devices: Battery level?
Date: Sat, 13 Jun 2009 14:16:15 +0100 (BST)	[thread overview]
Message-ID: <1244898975.477818.1961.nullmailer@galant.ukfsn.org> (raw)
In-Reply-To: <alpine.LNX.2.00.0906121529210.7457-B4tOwbsTzaBolqkO4TVVkw@public.gmane.org>

On Fri, 12 Jun 2009, Jiri Kosina wrote:

> It doesn't seem to be sending the battery level in a standard-compliant
> way, at least according to these reports.

but I wonder what is the standard-compliant way?

> Could you also please post the report descriptor data? They should appear
> in a hid debugging mode once the mouse is connected.

Sorry, I posted a parsed version of the report descriptor previously
though I failed to cross post:

Collection page=Generic_Desktop usage=Mouse
  Input id=2 size=1 count=1 page=Button usage=Button_1 Variable, logical range 0..1
  Input id=2 size=1 count=1 page=Button usage=Button_2 Variable, logical range 0..1
  Input id=2 size=1 count=1 page=Button usage=Button_3 Variable, logical range 0..1
  Input id=2 size=1 count=1 page=Button usage=Button_4 Variable, logical range 0..1
  Input id=2 size=4 count=1 page=0x0000 usage=0x0000 Const Variable, logical range 0..1
Collection page=Generic_Desktop usage=Pointer
  Input id=2 size=8 count=1 page=Generic_Desktop usage=X Variable Relative, logical range -127..127
  Input id=2 size=8 count=1 page=Generic_Desktop usage=Y Variable Relative, logical range -127..127
  Input id=2 size=8 count=1 page=Consumer usage=AC_Pan Variable Relative, logical range -127..127
  Input id=2 size=8 count=1 page=Generic_Desktop usage=Wheel Variable Relative, logical range -127..127
End collection
  Input id=2 size=8 count=1 page=0x00ff usage=0x00c0 Variable, logical range -127..127
Feature id=71 size=8 count=1 page=Device_Controls usage=Battery_Strength Variable NoPref Volatile, logical range 0..100
End collection

As you can see, there is a Feature report relating to the Battery
Strength, but I do not know what to do with that. I suppose that it is to
be polled in order to return a percentage value..

> Does 00ff.00c0 usage change it's value if you put different batteries into
> the mouse?

The mighty mouse has a single hard shell and detects the difference
between left click and right click by a capacitance detector underneath
the finger positions. This usage contains bits indicating where the mouse
is being touched though I guess it is just for testing as the OS does not
really need to know (it generates normal button clicks).

There is one more data point that may be interesting. The mighty mouse
(and an old Apple keyboard I have) spits out an input report that is not
mentioned in the descriptor with id=48 just before the battery fails. I
captured it once and it contained a single byte with value 0x01. I have no
idea what that report is for but as I use NiMH batteries which maintain
voltage until very near the end, it could be a charge level warning.

regards,
iain

  parent reply	other threads:[~2009-06-13 13:16 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-07 14:17 Apple Bluetooth devices: Battery level? Bastien Nocera
     [not found] ` <1244384236.30768.5690.camel-MYKcRh6MmTE/Ra3EetS/fF6hYfS7NtTn@public.gmane.org>
2009-06-07 15:52   ` Marcel Holtmann
2009-06-08 13:33   ` Jiri Kosina
2009-06-09 23:22     ` Bastien Nocera
     [not found]       ` <1244589738.5973.1954.camel-MYKcRh6MmTE/Ra3EetS/fF6hYfS7NtTn@public.gmane.org>
2009-06-10  7:03         ` Marcel Holtmann
2009-06-12 13:25           ` Jiri Kosina
     [not found]             ` <alpine.LNX.2.00.0906121521490.7457-B4tOwbsTzaBolqkO4TVVkw@public.gmane.org>
2009-06-12 13:27               ` [PATCH 2/2] HID: use debugfs for events/reports dumping Jiri Kosina
2009-06-12 13:27             ` [PATCH 1/2] HID: use debugfs for report dumping descriptor Jiri Kosina
2009-06-10  7:14         ` Apple Bluetooth devices: Battery level? Dmitriy Geels
     [not found]           ` <78f5d6bf0906100014r5b7f5c14p4544ef13442c8f0b-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-06-10  7:24             ` Marcel Holtmann
2009-06-10  8:25             ` Bastien Nocera
2009-06-10  8:25         ` Jiri Kosina
     [not found]           ` <alpine.LNX.2.00.0906101023460.7457-B4tOwbsTzaBolqkO4TVVkw@public.gmane.org>
2009-06-10 14:25             ` Bastien Nocera
     [not found]     ` <alpine.LRH.2.00.0906081530330.31685-1ReQVI26iDCaZKY3DrU6dA@public.gmane.org>
2009-06-10 14:06       ` Bastien Nocera
     [not found]         ` <1244642769.2690.51.camel-MYKcRh6MmTE/Ra3EetS/fF6hYfS7NtTn@public.gmane.org>
2009-06-10 18:19           ` Iain Hibbert
2009-06-12 13:31           ` Jiri Kosina
     [not found]             ` <alpine.LNX.2.00.0906121529210.7457-B4tOwbsTzaBolqkO4TVVkw@public.gmane.org>
2009-06-13 13:16               ` Iain Hibbert [this message]
     [not found]                 ` <1244898975.477818.1961.nullmailer-miDnOI7kXJ/y0YX2dClxIw@public.gmane.org>
2009-06-16  9:59                   ` Jiri Kosina
2009-06-16 13:37                     ` Marcel Holtmann
2010-02-12 15:41                     ` Bastien Nocera

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1244898975.477818.1961.nullmailer@galant.ukfsn.org \
    --to=plunky-+ve1brbcc0guotvtkynheg@public.gmane.org \
    --cc=hadess-0MeiytkfxGOsTnJN9+BGXg@public.gmane.org \
    --cc=jkosina-AlSwsSmVLrQ@public.gmane.org \
    --cc=linux-bluetooth-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).