Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Sep 2015 21:37:40 +0200
From:      Dirk Engling <erdgeist@erdgeist.org>
To:        Maksim Yevmenkin <maksim.yevmenkin@gmail.com>
Cc:        "freebsd-bluetooth@freebsd.org" <freebsd-bluetooth@freebsd.org>
Subject:   Re: Apple Magic Mouse
Message-ID:  <55F72204.5060007@erdgeist.org>
In-Reply-To: <CAFPOs6pYoPGNfWheDyG2vNu46oLyN%2BSgh2rPYrew=iYmeFFuZA@mail.gmail.com>
References:  <1437909200.57929.3.camel@yandex.com> <alpine.NEB.2.11.1508092034290.5638@galant.ogmig.net> <55F4362A.4050203@erdgeist.org> <CAFPOs6p%2BEZDctPodY6DBbnhfZQFz%2Bo0uKSRvvqQBcM1QL3ACXw@mail.gmail.com> <55F60ED8.8080203@erdgeist.org> <CAFPOs6pYoPGNfWheDyG2vNu46oLyN%2BSgh2rPYrew=iYmeFFuZA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 14.09.15 19:07, Maksim Yevmenkin wrote:

> this looks good. i only have one comment: why does it have to be in
> bthidd ? we already query hid descriptor from the device (in
> bthidcontrol)  as part of initial device setup. why can't we query
> device id at the same too? and simply stick it into the bthidd.conf
> and be done with it? the nice thing about it is that if device
> specific code does not work (for whatever reason), one can simply turn
> it off by removing device id lines from the bthidd.conf.
> 
> does it make sense to you?

Oh, I saw it the other way around: I never understood the stony road to
achieving something as simple as connecting a bluetooth mouse, in the
first place and I did not want to further complicate things.

It took _me_ a while to understand all the steps and quirks necessary to
get a bluetooth device running and adding fields to a file that needs to
be dumped and re-parsed later was something I could not imagine to be
good practice.

Maybe I just missed the crucial glue script that helps an average user
to properly configure all the required daemons and start all the
necessary tools, but neither is the handbook particularly useful [1]
(seriously, an introduction into the basics of bluetooth when all you
should need is inquiry, select a device and provide a PIN!?) nor does
"man bluetooth" guide the novice user. In the end I needed to resort to
[2] and manually copy&paste instructions.

I just noticed, this is a little off-topic, but I think that you get the
point that something is odd, if I am able to dwell into the depths of a
hid driver but fail to get all the basic info. And before you ask: Yes,
I volunteer to write an interactive/scriptable bluetooth framework
configure script, if it is not yet there. ;)

Back to the topic at hand: I do not know what kind of init magic other
devices might require, but maybe bthidcontrol can offer to dump certain
control commands that bthidd would execute when it attaches to the
device. Iain suggested to also fake the hid descriptor, this way we
would not even need to store vendor/product. However, I am not sure
about the unofficial report ids apple uses for magic mouse and magic
trackpad, and would not blindly handle them the way they are handled by
the magic mouse driver.

Still now I need to touch parser and generator and its documentation.
Well, then.

What do you think?

  erdgeist

[1] https://www.freebsd.org/doc/handbook/network-bluetooth.html
[2] http://astralblue.livejournal.com/357664.html



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?55F72204.5060007>