From: Alexander Holler <holler@ahsoftware.de>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] bluetoothd: add option to automatically power on the first adapter found
Date: Sat, 11 Apr 2015 18:48:35 +0200 [thread overview]
Message-ID: <55295063.2010106@ahsoftware.de> (raw)
In-Reply-To: <5528AC01.80804@ahsoftware.de>
Am 11.04.2015 um 07:07 schrieb Alexander Holler:
> Am 11.04.2015 um 06:06 schrieb Alexander Holler:
>> Am 10.04.2015 um 19:15 schrieb Alexander Holler:
>>> Am 10.04.2015 um 19:10 schrieb Marcel Holtmann:
>>
>>>> We took the power on policy out of BlueZ 5 on purpose.
>>>
>>> Nobody has to use the option which is by default off.
>>
>> Sorry, but I just have to ask that in order to keep my reputation as
>> troll:
>>
>> What's that purpose?
>>
>> Defeating usability? ;)
>
> Just to clarify my patch. Its purpose is not to reimplement a "power on
> by default" policy because I understand that it's a good idea to not
> power on bt-adapters by default.
>
> The purpose of my patch is to offer users a simple, fast and reliable
> way to power on an adapter on startup, without the need to wait until
> dbus and udev are ready and without the need for additional tools (or
> complications) like udev-rules, hciconfig or bluetootctl.
And just in case some people don't understand why I'm calling a simple
looking udev-rule a complication, here is an incomplete list what all
might fail when using such error-prone mechanisms:
As example I use the rule
ACTION=="add", KERNEL=="hci0", RUN+="/usr/bin/hciconfig hci0 up"
which might work as a bad replacement for the patch I've posted.
- There is the devicename (hci0). That might change.
- There is the need for a working hciconfig-executable.
- The path to the executable might change (think at /usr/bin -> /bin)
- The call to hciconfig (like options) might change without notice
- The partition the unnecessarily needed third executable (besides
bluetoothd and dbus) might be mounted to late (maybe through a change in
some mount order)
- the udev-rule syntax might change
- udev might not be available at all (there are still some alternatives)
- ...
And please don't try to tell me that all of the above possiblities for
errors are pure fiction which only might be found inside my brain. I've
experienced almost all of them (not in regard to bluez or hciconfig) and
most of them not just once or on systems I (mis)configured myself.
> E.g. one of my use-cases is to be able to use a bt-keyboard right after
> the system shows me a login. Without that patch waiting 4 seconds
> haven't been enough, and with the patch the keyboard is now usable
> almost immediately.
>
> And there are many other use cases where people do want that an adapter
> is turned on after it's found. E.g. I assume on most systems which don't
> have a fixed bt-adapter but rely on usb-dongles, people might prefer
> that their dongle will be automatically turned on when it's plugged in
> (otherwise they likely wouldn't plug it in). And the patch offers just a
> very simple, clean and easy to use way to reach that goal and is not a
> try to change the default policy.
>
> Regards,
>
> Alexander Holler
next prev parent reply other threads:[~2015-04-11 16:48 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-10 16:57 [PATCH] bluetoothd: add option to automatically power on the first adapter found Alexander Holler
2015-04-10 17:10 ` Marcel Holtmann
2015-04-10 17:15 ` Szymon Janc
2015-04-10 17:15 ` Alexander Holler
2015-04-11 4:06 ` Alexander Holler
2015-04-11 5:07 ` Alexander Holler
2015-04-11 16:48 ` Alexander Holler [this message]
2015-04-11 17:55 ` Marcel Holtmann
2015-04-12 9:23 ` Alexander Holler
2015-04-12 18:50 ` Marcel Holtmann
2015-04-13 9:10 ` Alexander Holler
2015-04-13 14:32 ` Marcel Holtmann
2015-04-13 19:08 ` Alexander Holler
2015-04-13 20:22 ` Marcel Holtmann
2015-04-14 8:33 ` Alexander Holler
2015-04-14 13:50 ` Marcel Holtmann
2015-04-14 14:14 ` Szymon Janc
2015-04-14 15:56 ` Szymon Janc
2015-04-15 17:59 ` Alexander Holler
2015-04-25 10:26 ` Alexander Holler
2015-04-27 4:40 ` Marcel Holtmann
2015-04-27 9:11 ` Alexander Holler
2015-04-27 18:53 ` Marcel Holtmann
2015-04-27 20:36 ` Alexander Holler
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=55295063.2010106@ahsoftware.de \
--to=holler@ahsoftware.de \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcel@holtmann.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).