You are not logged in.

#1 2017-03-08 12:24:10

nachopro
Member
Registered: 2013-08-23
Posts: 78

[SOLVED] How to Power On BT?; hciconfig is missing

Hi All! I have a udev rule extracted from the Wiki:
https://wiki.archlinux.org/index.php/bl … uetoothctl

/etc/udev/rules.d/10-local.rules

# Set bluetooth power up
ACTION=="add", KERNEL=="hci0", RUN+="/usr/bin/hciconfig %k up"

But today I figured that the hciconfig and hcitool commands have been deprecated.

The bluetooth has a "terminal mode" that can not be executed from udev.
How can I make it work?

Thanks!

Last edited by nachopro (2017-03-28 20:15:57)

Offline

#2 2017-03-08 13:20:50

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [SOLVED] How to Power On BT?; hciconfig is missing

You can either install bluez-utils-compat[1] or maybe with some some changes you can use btmgmt which comes with bluez-utils and should have better long term support than bluez-utils-compat, which apparently has been deprecated[2].

[1] https://aur.archlinux.org/packages/bluez-utils-compat/
[2] https://bbs.archlinux.org/viewtopic.php?id=223682


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#3 2017-03-08 23:00:15

andrej.podzimek
Member
From: Zürich, Switzerland
Registered: 2005-04-10
Posts: 115

Re: [SOLVED] How to Power On BT?; hciconfig is missing

<rant>
Just for the record, there are two major problems with btmgmt at the moment:

  1. A lack of documentation. Even reading through btmgmt.c doesn't provide a detailed enough (yet quickly readable) reference to the meaning of the commands. I don't know of any comprehensive document that would compare e.g. hciconfig to btmgmt, showing which commands are equivalent and expand on the (reasons behind) differences.

  2. btmgmt doesn't seem to be feature-complete and/or compatible with hciconfig. For example, for all of my headsets and mice to connect and work, I run the following (from a systemd unit) on boot and resume: hciconfig hci0 up lm master,accept encrypt noauth There seems to be nothing like that in btmgmt. One can try various options one by one using hciconfig to see what they do from the btmgmt standpoint -- nothing, in most cases. There might be a link between link-security in btmgmt and auth/noauth in hciconfig, among other things, but I'd prefer documentation over reverse-engineering.

</rant>

Offline

#4 2017-03-09 13:57:49

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [SOLVED] How to Power On BT?; hciconfig is missing

@andrej.podzimek
There are a few other tools that come with bluez-utils that you might have to use, however it seems that some functionality really is missing and not implemented[1] or you might have to use dbus which for simple stuff must be a pain.

I don't use bluetooth much so I haven't stumbled upon these problems but I can understand the pain of things breaking. The alternative is re-enabling the deprecated tools but they can stop working at any time and no one will fix them.

[1] https://lists.archlinux.org/pipermail/a … 43360.html


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#5 2017-03-10 14:25:20

re-mind
Member
From: Denmark
Registered: 2017-03-06
Posts: 43
Website

Re: [SOLVED] How to Power On BT?; hciconfig is missing

nachopro wrote:

Hi All! I have a udev rule extracted from the Wiki:
https://wiki.archlinux.org/index.php/bl … uetoothctl

/etc/udev/rules.d/10-local.rules

# Set bluetooth power up
ACTION=="add", KERNEL=="hci0", RUN+="/usr/bin/hciconfig %k up"

But today I figured that the hciconfig and hcitool commands have been deprecated.

The bluetooth has a "terminal mode" that can not be executed from udev.
How can I make it work?

Thanks!

I hope this helps smile

Well.. This is a big day for me since this is the first time I can answer something arch-related. I your case it seems that you have followed the archwiki and missed the same as me. Bluez has been updated some time ago and a new function has been added up automatically power up.  Change false to true in the last statement in /etc/bluetooth/main.conf “AutoEnable=true”, and now bluetooth will be powered on at boot..

If you manage to figure out how to thereafter pair a Apple keyboard and Magic Trackpad I will send you a beer. This is driving me nuts!


Mein.conf

Offline

#6 2017-03-28 20:15:40

nachopro
Member
Registered: 2013-08-23
Posts: 78

Re: [SOLVED] How to Power On BT?; hciconfig is missing

Thanks a lots! It's working!

Offline

Board footer

Powered by FluxBB