web-dev-qa-db-ja.com

FedoraでBluetoothを介してBose QC 35をペアリングする

Fedora 24をGnome Shellで実行しています。新しいBose QuietComfort 35をBluetoothでペアリングしてみます。

Gnomeインターフェースを使い始めました。残念ながら、接続は保持されていないようです。常に接続/切断しているように見えます:

https://youtu.be/eUZ9D9rGUZY

次のステップは、コマンドラインを使用していくつかのチェックを実行することでした。まず、bluetoothサービスが実行されていることを確認しました。

$ Sudo systemctl status bluetooth
● bluetooth.service - Bluetooth service
   Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
   Active: active (running) since dim. 2016-06-26 11:19:24 CEST; 14min ago
     Docs: man:bluetoothd(8)
 Main PID: 932 (bluetoothd)
   Status: "Running"
    Tasks: 1 (limit: 512)
   Memory: 2.1M
      CPU: 222ms
   CGroup: /system.slice/bluetooth.service
           └─932 /usr/libexec/bluetooth/bluetoothd

juin 26 11:19:24 leonard systemd[1]: Starting Bluetooth service...
juin 26 11:19:24 leonard bluetoothd[932]: Bluetooth daemon 5.40
juin 26 11:19:24 leonard bluetoothd[932]: Starting SDP server
juin 26 11:19:24 leonard bluetoothd[932]: Bluetooth management interface 1.11 initialized
juin 26 11:19:24 leonard bluetoothd[932]: Failed to obtain handles for "Service Changed" characteristic
juin 26 11:19:24 leonard systemd[1]: Started Bluetooth service.
juin 26 11:19:37 leonard bluetoothd[932]: Endpoint registered: sender=:1.68 path=/MediaEndpoint/A2DPSource
juin 26 11:19:37 leonard bluetoothd[932]: Endpoint registered: sender=:1.68 path=/MediaEndpoint/A2DPSink
juin 26 11:20:26 leonard bluetoothd[932]: No cache for 08:DF:1F:DB:A7:8A

次に、いくつかの Archlinux wikiからの説明 を試してみましたが、成功しませんでした。ペアリングが失敗していますペアリングに失敗しました:org.bluez.Error.AuthenticationFailed

$ Sudo bluetoothctl 
[NEW] Controller 00:1A:7D:DA:71:05 leonard [default]
[NEW] Device 08:DF:1F:DB:A7:8A Bose QuietComfort 35
[NEW] Device 40:EF:4C:8A:AF:C6 EDIFIER Luna Eclipse
[bluetooth]# agent on
Agent registered
[bluetooth]# scan on
Discovery started
[CHG] Controller 00:1A:7D:DA:71:05 Discovering: yes
[CHG] Device 08:DF:1F:DB:A7:8A RSSI: -77
[CHG] Device 08:DF:1F:DB:A7:8A UUIDs: 0000febe-0000-1000-8000-00805f9b34fb
[CHG] Device 08:DF:1F:DB:A7:8A RSSI: -69
[CHG] Device 08:DF:1F:DB:A7:8A UUIDs: 0000febe-0000-1000-8000-00805f9b34fb
[CHG] Device 08:DF:1F:DB:A7:8A UUIDs: 0000110d-0000-1000-8000-00805f9b34fb
[CHG] Device 08:DF:1F:DB:A7:8A UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
[CHG] Device 08:DF:1F:DB:A7:8A UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
[CHG] Device 08:DF:1F:DB:A7:8A UUIDs: 0000110f-0000-1000-8000-00805f9b34fb
[CHG] Device 08:DF:1F:DB:A7:8A UUIDs: 00001130-0000-1000-8000-00805f9b34fb
[CHG] Device 08:DF:1F:DB:A7:8A UUIDs: 0000112e-0000-1000-8000-00805f9b34fb
[CHG] Device 08:DF:1F:DB:A7:8A UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
[CHG] Device 08:DF:1F:DB:A7:8A UUIDs: 00001108-0000-1000-8000-00805f9b34fb
[CHG] Device 08:DF:1F:DB:A7:8A UUIDs: 00001131-0000-1000-8000-00805f9b34fb
[CHG] Device 08:DF:1F:DB:A7:8A UUIDs: 00000000-deca-fade-deca-deafdecacaff
[bluetooth]# devices
Device 08:DF:1F:DB:A7:8A Bose QuietComfort 35
Device 40:EF:4C:8A:AF:C6 EDIFIER Luna Eclipse
[CHG] Device 08:DF:1F:DB:A7:8A RSSI: -82
[CHG] Device 08:DF:1F:DB:A7:8A RSSI: -68
[CHG] Device 08:DF:1F:DB:A7:8A RSSI: -79
[bluetooth]# trust 08:DF:1F:DB:A7:8A
Changing 08:DF:1F:DB:A7:8A trust succeeded
[bluetooth]# pair 08:DF:1F:DB:A7:8A
Attempting to pair with 08:DF:1F:DB:A7:8A
[CHG] Device 08:DF:1F:DB:A7:8A Connected: yes
Failed to pair: org.bluez.Error.AuthenticationFailed
[CHG] Device 08:DF:1F:DB:A7:8A Connected: no

SSPModeを無効にしようとしましたが、効果がないようです:

$ Sudo hciconfig hci0 sspmode 0

Bluetoothctlを使用すると、journalctlは次のログを記録します。

juin 26 11:37:21 leonard Sudo[4348]: lpellegr : TTY=pts/2 ; PWD=/home/lpellegr ; USER=root ; COMMAND=/bin/bluetoothctl
juin 26 11:37:21 leonard audit[4348]: USER_CMD pid=4348 uid=1000 auid=4294967295 ses=4294967295 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='cwd="/home/lpellegr" cmd="bluetoothctl" terminal=pt
juin 26 11:37:21 leonard audit[4348]: CRED_REFR pid=4348 uid=0 auid=4294967295 ses=4294967295 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_env,pam_fprintd acct="roo
juin 26 11:37:21 leonard Sudo[4348]: pam_systemd(Sudo:session): Cannot create session: Already occupied by a session
juin 26 11:37:21 leonard audit[4348]: USER_START pid=4348 uid=0 auid=4294967295 ses=4294967295 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_open grantors=pam_keyinit,pam_limits,
juin 26 11:37:21 leonard Sudo[4348]: pam_unix(Sudo:session): session opened for user root by (uid=0)
juin 26 11:38:06 leonard bluetoothd[932]: No cache for 08:DF:1F:DB:A7:8A

残念ながら、出力がわかりません。どんなアイデアや助けでも大歓迎です。私はかなり迷っています。

私が使用しているBluetoothレシーバーは、CSL-ComputerのUSBドングルです。 Bluetoothctlのバージョンは5.40です。カーネル4.5.7-300.fc24.x86_64を実行しています。

以下は、私のBluetoothアダプターでサポートされている機能です。

hciconfig -a hci0 features
hci0:   Type: BR/EDR  Bus: USB
    BD Address: 00:1A:7D:DA:71:05  ACL MTU: 310:10  SCO MTU: 64:8
    Features page 0: 0xff 0xff 0x8f 0xfe 0xdb 0xff 0x5b 0x87
        <3-slot packets> <5-slot packets> <encryption> <slot offset> 
        <timing accuracy> <role switch> <hold mode> <sniff mode> 
        <park state> <RSSI> <channel quality> <SCO link> <HV2 packets> 
        <HV3 packets> <u-law log> <A-law log> <CVSD> <paging scheme> 
        <power control> <transparent SCO> <broadcast encrypt> 
        <EDR ACL 2 Mbps> <EDR ACL 3 Mbps> <enhanced iscan> 
        <interlaced iscan> <interlaced pscan> <inquiry with RSSI> 
        <extended SCO> <EV4 packets> <EV5 packets> <AFH cap. slave> 
        <AFH class. slave> <LE support> <3-slot EDR ACL> 
        <5-slot EDR ACL> <sniff subrating> <pause encryption> 
        <AFH cap. master> <AFH class. master> <EDR eSCO 2 Mbps> 
        <EDR eSCO 3 Mbps> <3-slot EDR eSCO> <extended inquiry> 
        <LE and BR/EDR> <simple pairing> <encapsulated PDU> 
        <non-flush flag> <LSTO> <inquiry TX power> <EPC> 
        <extended features> 
    Features page 1: 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00

ペアリングは、EDIFIER Luna Eclipseスピーカーでうまく機能します。問題は本当に設定しようとしているヘッドセットに関連していると思います。

26
Laurent

私はこれらのヘッドフォンと、Fedora 24を実行する便利なラップトップも持っています。IRCでBluez開発者の1人とチャットした後、私はうまくいきました。以下は私が見つけたものです。 (私はBluetoothについてほとんど知らないので、これの一部に誤った用語を使用している可能性があることに注意してください。)

ヘッドフォンはBluetooth LEをサポートしています(または少なくともサポートしていると言います)が、ペアリング用のLEはサポートしていません。 Bluezはまだこれをサポートしておらず、サポートされているBTモードを設定ファイルで静的に設定する方法以外は設定できません。ただし、通常のBluetoothでヘッドフォンを問題なく使用できます。これがBluez 4が機能する理由です。 LEは実際にはサポートされていません。

したがって、/ etc/bluetooth/main.confを作成します。 Fedora 24にはこのファイルが付属していないので、 pstream からコピーをフェッチするか、次の行を見つけます

#ControllerMode = dual

それを次のように変更します。

ControllerMode = bredr

または、以下のみを含む新しいファイルを作成します。

[General]
ControllerMode = bredr

次にBluetoothを再起動してペアリングします。 (これはbluetoothctlを使用して手動で行いましたが、bluetoothマネージャーを使用するだけで機能します。)

さて、これでうまくいきましたが、pulseaudioにA2DP-Sinkプロトコルの使用を強制しないと、何らかの理由で着信があったことをヘッドホンがアナウンスします。ただし、私のマウスにはBluetooth LEが必要なので、ControllerMode行を削除しました。そして、ヘッドフォンだけでなく、マウスも機能します。いったんペアになると、すべてが大丈夫だと思います。

27
Jason Tibbitts

私はあなたの特定のヘッドフォンを読みました、そして彼らはペアリングを容易にするために近距離無線通信(NFC)を使用します、そしてこれは特に Bluez 5. に追加されたように言及されました、しかし 少なくとも1つのブログ "NFCは新しいキーボードに組み込まれていますが、残念ながらGnu/LinuxはNFCをサポートしていませんまだ。NFCサポートはLinuxカーネルに組み込まれていますが、GnomeもKDEもそれをサポートしておらず、NFC私のFedora 20リポジトリで有効になっているアプリの数は非常に多いですNFCはデバイスのペアリングを助けてくれないので、代わりに昔ながらの方法で行う必要があります... "それで、それで私たちはあなたのアプローチに戻ります。

ただし、Bluez5.3は、PINを使用するデバイス(Boseヘッドフォンなど)とのペアリングをサポートしていませんでした。ペアリングのコード。
別のディストリビューションに、以前のバージョンからの バグレポート があります。したがって、これはFedoraで特に報告されていませんが、 Bluezの公式サイト は、少なくとも私が確認できることから、修正について具体的に言及していません。

この機能はサポートされていません。そして、少なくとも今のところそれが答えです。

また、ご想像のとおり、特定の専用drvierが必要であるなど、他の問題が発生する可能性もあります(ただし、OSXやWindowsまたはそれらがサポートするものでクラスに準拠したヘッドフォンをテストした場合)。私はそれが事実であることを本当に強く疑っています、またはそれはあなたまたは他の何かを出発点にすることができます。

これが誰かの助けになるかもしれない場合、私のubuntu 16.04で上記のすべてを実際に試した後、ついに「Bose Connect App」(私の場合はAndroid)を介して接続するのと同じくらい簡単になりました。私はブルーマンを使用してそれを行い、そしてようやくヘッドセットをペアリングすることができました。

私の場合、bluez 5.37v、blueman 2.0.4があり、最後にデフォルトの/etc/bluetooth/main.confに変更を加える必要はありません。デフォルトの "ControllerMode"はデュアルに設定されています。働いた。

私にとって有効な手順は次のとおりです。

1.-アプリを開き、新しいデバイスなどを接続するオプションを選択します。 (名前を正確に覚えていません)2.- bluemanから新しいデバイスを検索します。 3.-ヘッドセットが見つかったら、問題なくペアリングして、動作モードを選択できました。

最初のステップがなければ、私はそれらをペアにすることができませんでした。

私は方法を見つけるために多くの方法をとったが、方法を知ったら、それを行うのは非常に簡単です。

1
Miguel Machado

Ubuntu 16.04、Bose QC35:「Bluetoothアダプター」ソフトウェアをインストールし、簡単に接続できました。

0
Premchand

数日前にBose QCも購入しました。最初のいくつかの問題の後、ALSAとbluez 4.xを使用して、なんとかDebianで動作させることができました。

apt-get install bluetooth
apt-get install bluez-alsa
apt-get install blueman

これらのパッケージをインストールした後、まだ機能しませんでした。問題は、dbus権限にありました。私はユーザー(uid 1000)をグループBluetoothに追加することで解決しました。

usermod -a -G bluetooth martin

その後、すべてが機能し、ヘッドセットは毎回自動的に私のラップトップとペアリングします

0
Martin Vegter

私はArch Linuxでも同じ問題を抱えており、これらは私がしなければならなかったものです。「同等の」コマンドを実行することがLinuxディストリビューションで他の多くの人に役立つことはまずありません:

  • パッケージをインストールするpulseaudio-bluetooth pulseaudio-alsa bluez bluez-libs bluez-utilsおよび再起動Pulseaudio(bluetoothのインストール時にすでに実行されている場合):

    pulseaudio -k
    pulseaudio --start
    

    エラーメッセージが表示された場合

    XDG_RUNTIME_DIR (/var/snips-audio-server) is not owned by us (uid 0), but by uid  
    <some UID (probably yours)>!
    

    次に、これらのコマンドを非ルートとして、またはSudoなしで実行する必要があります。

  • 私の場合、モジュールbtusbをロードする必要があったので、modprobe btusbヘッドフォンが必要になるたび、または起動時にモジュールをロード

  • rfkillを実行して、Bluetoothデバイスがソフト/ハードブロックされているかどうかを確認し、ブロックされている場合はブロックを解除します
  • Bluetoothサービスが実行されているかどうかを確認します(つまり、systemdを使用すると、コマンドはおそらくsystemctl status bluetooth.serviceヘッドフォン用の内蔵オーディオ高忠実度用デジタルステレオ出力(a2dpシンク)

  • OPで言及されているように、設定は提案されているように調整する必要があります このSEの質問への回答で 。ここで説明を読むことができます。

    • 編集/etc/bluetooth/main.conf:を含む行を検索します
      #ControllerMode = dual
      
      それを次のように変更します:
      ControllerMode = bredr
      
      または次のみを含む新しいファイルを作成:
      [General]
      ControllerMode = bredr
      
      その後、Bluetoothを再起動してペアリング/接続します(systemctl restart bluetooth.serviceまたはいくつかのGUIフロントエンドを使用して、オフにしてからオンにします)

GitHubの誰か注:からの指示もあります私はこれらのGitHubリポジトリからの変更点が完全にわかりませんする(十分な時間をかけて物事がうまくいくように努力した)ので、注意して使用してください...グループの変更は、おそらくユーザー空間またはこれらの行の間の何かからのBluetooth制御を有効にするだけだと思います):

Bose QC35ヘッドセットBluetoothを機能させるには、次のようにします。

  • Sudo pacman -Syu pulseaudio-alsa pulseaudio-bluetooth bluez bluez-libs bluez-utils
  • turn off bluetooth from your computer
  • Sudo btmgmt ssp of
  • gpasswd -a YOUR_USER lp

再起動せずにグループを変更する場合は、次のように実行できます(前述の ここではSE )。

exec su -l $USER

再起動せずにグループの変更をすぐに有効にします。

0

Fedora 24のQC35でも同じ問題がありました。ここでカスタマイズされたbluezパッケージを試しました https://copr.fedorainfracloud.org/coprs/npmccallum/jelling/packages/

# dnf copr enable npmccallum/jelling
# dnf install bluez-5.37-1.gatt.fc24

5.40から変更された5.37-1バージョンにダウングレードした後、bluetoothctlでヘッドセットを手動でペアリングできました(残念ながらGNOME bluetooth設定)動作しません):

$ bluetoothctl
[bluetooth]# devices
Device 08:DF:xx:xx:xx:xx QC35
[bluetooth]# trust 08:DF:xx:xx:xx:xx 
[CHG] Device 08:DF:xx:xx:xx:xx Trusted: yes
Changing 08:DF:xx:xx:xx:xx trust succeede
[bluetooth]# pair 08:DF:xx:xx:xx:xx 
Attempting to pair with 08:DF:xx:xx:xx:xx
[CHG] Device 08:DF:xx:xx:xx:xx UUIDs: 00000000-deca-fade-deca-deafdecacaff
[CHG] Device 08:DF:xx:xx:xx:xx UUIDs: 00001101-0000-1000-8000-00805f9b34fb
[CHG] Device 08:DF:xx:xx:xx:xx UUIDs: 00001108-0000-1000-8000-00805f9b34fb
[CHG] Device 08:DF:xx:xx:xx:xx UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
[CHG] Device 08:DF:xx:xx:xx:xx UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
[CHG] Device 08:DF:xx:xx:xx:xx UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
[CHG] Device 08:DF:xx:xx:xx:xx UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
[CHG] Device 08:DF:xx:xx:xx:xx UUIDs: 00001200-0000-1000-8000-00805f9b34fb
[CHG] Device 08:DF:xx:xx:xx:xx UUIDs: 00001800-0000-1000-8000-00805f9b34fb
[CHG] Device 08:DF:xx:xx:xx:xx UUIDs: 00001801-0000-1000-8000-00805f9b34fb
[CHG] Device 08:DF:xx:xx:xx:xx UUIDs: 0000180a-0000-1000-8000-00805f9b34fb
[CHG] Device 08:DF:xx:xx:xx:xx UUIDs: 0000febe-0000-1000-8000-00805f9b34fb
[CHG] Device 08:DF:xx:xx:xx:xx Paired: yes
Pairing successful
[bluetooth]# connect 08:DF:xx:xx:xx:xx 
Attempting to connect to 08:DF:xx:xx:xx:xx
Connection successful
[QC35]# connect 08:DF:xx:xx:xx:xx 
Attempting to connect to 08:DF:xx:xx:xx:xx
[CHG] Device 08:DF:xx:xx:xx:xx RSSI is nil
Connection successful
[QC35]# info 08:DF:xx:xx:xx:xx 
Device 08:DF:xx:xx:xx:xx
    Name: QC35
    Alias: QC35
    Class: 0x240418
    Icon: audio-card
    Paired: yes
    Trusted: yes
    Blocked: no
    Connected: yes
    LegacyPairing: no
    UUID: Vendor specific           (00000000-deca-fade-deca-deafdecacaff)
    UUID: Serial Port               (00001101-0000-1000-8000-00805f9b34fb)
    UUID: Headset                   (00001108-0000-1000-8000-00805f9b34fb)
    UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)
    UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
    UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
    UUID: Handsfree                 (0000111e-0000-1000-8000-00805f9b34fb)
    UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
    UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
    UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
    UUID: Device Information        (0000180a-0000-1000-8000-00805f9b34fb)
    UUID: Bose Corporation          (0000febe-0000-1000-8000-00805f9b34fb)
    Modalias: bluetooth:v009Ep400Cd0103

次に、QC35をGNOMEサウンド設定でアクティブにできます。最初のペアリングの後で問題なく動作し、その後自動的に私のラップトップに再接続できました。

このバージョンのbluezは、私のBluetoothマウスとトラックパッドでも動作します。それが機能する正確な理由はわかりません。たぶん、最新バージョンのbluezは、bluetooth LEで何らかのリグレッションを持っているかもしれません(Jason Tibbittsの回答で指摘)。とにかく、この答えが役に立てば幸いです。 :)

0
Linus Yang