bluedevil rfkill
David Rosca
nowrep at gmail.com
Fri Apr 10 14:20:55 UTC 2015
On Fri, Apr 10, 2015 at 12:58 PM, Jonathan Riddell <jr at jriddell.org> wrote:
> Hi David, I see you say:
Hi Jonathan,
> could you explain to us distro packagers what rfkill is and how
> distros can provide access to /dev/rfkill? (and why doesn't this have
> a better interface through bluez?)
Basically, rfkill provides a way to block radio devices (Bluetooth,
Wi-Fi, ..) so that
they stop consuming power. On some laptops, the led for Bluetooth will
only light off
when Bluetooth is blocked through rfkill (setting adapter powered to
false via Bluez
is not enough).
rfkill is accessed through /dev/rfkill device. For more info, see [1].
By default, /dev/rfkill is rw for root and r-only for others. However,
Bluedevil needs
a write acces to be able to block/unblock Bluetooth.
Exactly the same situation was in gnome-bluetooth, where it was solved by
distributions shipping an udev rules file [2].
Current gnome-bluetooth versions moved the rfkill handling to
gnome-settings-daemon
and the udev rules file was moved to upstream [3]. It can be done the same way
in Bluedevil (installed by Bluedevil itself), but I am not sure if it
is a good idea.
As to why there is no better interface in Bluez. Well, I have no idea.
For example, NetworkManager does expose a rfkill state for network
devices (except
Bluetooth), but Bluez does not.
I would suggest to use [2] udev rule.
David
[1] https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Power_Management_Guide/RFKill.html
[2] https://anonscm.debian.org/viewvc/pkg-gnome/desktop/unstable/gnome-bluetooth/debian/61-gnome-bluetooth-rfkill.rules?view=markup
[3] https://bugzilla.gnome.org/show_bug.cgi?id=711373
More information about the release-team
mailing list