web-dev-qa-db-fra.com

Bluetooth HSP / HFP ne fonctionne pas mais A2DP est

J'ai un adaptateur Bluetooth interne Broadcom. Il s'agit du modèle BCM20702A0 (Vendor=0a5c ProdID=21e1 Rev=01.12). Je suis en mesure de faire fonctionner la fonction A2DP mais pas le mode HSP/HFP. J'ai essayé différents microprogrammes et différentes configurations sous /etc/bluetooth/audio.conf mais je n'ai pas eu de chance. Est-ce que quelqu'un a une idée de ce que je peux faire? J'ai cherché et cherché google et essayé diverses choses pendant deux heures. Je pensais que je pourrais essayer les gourous. Ci-dessous sont les détails de mon système, s'il vous plaît laissez-moi savoir si vous avez besoin de quelque chose d'autre.

dylan@laptop:~$ uname -a
Linux laptop 3.19.0-20-generic #20-Ubuntu SMP Fri May 29 10:10:47 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux


dylan@laptop:~$ dmesg | grep Bluetooth
[    4.179038] Bluetooth: Core ver 2.20
[    4.179051] Bluetooth: HCI device and connection manager initialized
[    4.179054] Bluetooth: HCI socket layer initialized
[    4.179056] Bluetooth: L2CAP socket layer initialized
[    4.179060] Bluetooth: SCO socket layer initialized
[    5.501272] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    5.501275] Bluetooth: BNEP filters: protocol multicast
[    5.501281] Bluetooth: BNEP socket layer initialized
[    5.508181] Bluetooth: RFCOMM TTY layer initialized
[    5.508188] Bluetooth: RFCOMM socket layer initialized
[    5.508193] Bluetooth: RFCOMM ver 1.11

USB-DEVICES...
T:  Bus=04 Lev=02 Prnt=02 Port=05 Cnt=01 Dev#=  3 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=0a5c ProdID=21e1 Rev=01.12
S:  Manufacturer=Broadcom Corp
S:  Product=BCM20702A0
S:  SerialNumber=083E8E9B280C
C:  #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
I:  If#= 1 Alt= 2 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
I:  If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
I:  If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=01 Driver=(none)


dylan@laptop:~$ dkms status; uname -a
bcmwl, 6.30.223.248+bdcom, 3.19.0-16-generic, x86_64: installed
bcmwl, 6.30.223.248+bdcom, 3.19.0-18-generic, x86_64: installed
bcmwl, 6.30.223.248+bdcom, 3.19.0-20-generic, x86_64: installed
bcmwl, 6.30.223.248+bdcom, 3.19.0-21-generic, x86_64: installed
vboxhost, 4.3.28, 3.19.0-16-generic, x86_64: installed
vboxhost, 4.3.28, 3.19.0-18-generic, x86_64: installed
vboxhost, 4.3.28, 3.19.0-20-generic, x86_64: installed
vboxhost, 4.3.28, 3.19.0-21-generic, x86_64: installed
Linux laptop 3.19.0-21-generic #21-Ubuntu SMP Sun Jun 14 18:31:11 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux


dylan@laptop:~$ dmesg | grep -i bluetooth; dmesg | grep firmware
[    4.085160] Bluetooth: Core ver 2.20
[    4.085171] Bluetooth: HCI device and connection manager initialized
[    4.085175] Bluetooth: HCI socket layer initialized
[    4.085176] Bluetooth: L2CAP socket layer initialized
[    4.085181] Bluetooth: SCO socket layer initialized
[    4.109764] bluetooth hci0: Direct firmware load for brcm/BCM20702A0-0a5c-21e1.hcd failed with error -2
[    4.109773] Bluetooth: hci0: BCM: patch brcm/BCM20702A0-0a5c-21e1.hcd not found
[    5.332794] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    5.332797] Bluetooth: BNEP filters: protocol multicast
[    5.332803] Bluetooth: BNEP socket layer initialized
[    5.346411] Bluetooth: RFCOMM TTY layer initialized
[    5.346419] Bluetooth: RFCOMM socket layer initialized
[    5.346425] Bluetooth: RFCOMM ver 1.11
[    4.109764] bluetooth hci0: Direct firmware load for brcm/BCM20702A0-0a5c-21e1.hcd failed with error -2
5
Dylan

Je voudrais essayer ceci:

wget https://www.dropbox.com/s/owropuric6iz898/BCM20702A0-05ac-21e1.hcd
Sudo cp BCM20702A0-05ac-21e1.hcd /lib/firmware/brcm/BCM20702A0-0a5c-21e1.hcd
Sudo modprobe -r btusb
Sudo modprobe btusb

Ensuite, vérifiez dmesg | tail pour toute information:

Sudo apt-get install linux-headers-$(uname -r) build-essential
wget https://www.dropbox.com/s/xu80svavlazttaf/bluetooth-3.19.tar.gz
tar xpvf bluetooth-3.19.tar.gz
cd bluetooth
cp /boot/config-$(uname -r) .config
cp /usr/src/linux-headers-$(uname -r)/Module.symvers Module.symvers
make -C /lib/modules/$(uname -r)/build M=$PWD modules
Sudo cp btusb.ko /lib/modules/$(uname -r)/kernel/drivers/bluetooth/
Sudo modprobe -r btusb
Sudo modprobe btusb

Voir si ça marche

Vous perdrez le HSP/HFP après une mise à jour du noyau. Quand cela se produit, vous devriez faire:

cd bluetooth
make -C /lib/modules/$(uname -r)/build M=$PWD clean
cp /boot/config-$(uname -r) .config
cp /usr/src/linux-headers-$(uname -r)/Module.symvers Module.symvers
make -C /lib/modules/$(uname -r)/build M=$PWD modules
Sudo cp btusb.ko /lib/modules/$(uname -r)/kernel/drivers/bluetooth/
Sudo modprobe -r btusb
Sudo modprobe btusb
5
Jeremy31

Mon hypothèse est que c'est un problème de profil bt avec pulseaudio, à moins que ce ne soit quelque chose de plus problématique.

Installez et exécutez pavucontrol (apt-get install pavucontrol) et accédez à la dernière page (configuration) pour vérifier si le profil Bluetooth est présent et essayez de le modifier.

Mon config audio est par défaut sans modification (Ubuntu 14.04) /etc/bluetooth/audio.conf

Maintenant, Just a testé ces étapes avec un casque-bt (cap2dp et hsp) et l'a fait fonctionner. Pas le meilleur moyen, mais a fonctionné.

  1. Paire bt-device
  2. Vérifiez auprès de pavucontrol que le profil est HSP depuis la page de configuration.
  3. Démarrer skype (Je sais, mais c'est facile à tester avec)
  4. Exécuter le script movesink.sh
  5. Démarrer un test d’appel vers le service de test de Skype
  6. Sélectionnez l'onglet Enregistrement de pavucontrol et sélectionnez "Entrée Skype de" pour correspondre à votre périphérique Bluetooth.
  7. Parlez et voyez si la barre de volume bouge.
  8. En cas de problème, relancez l'appel et lancez movesink.sh pendant l'appel test

a) Vérifiez le nom de l'appareil bt:

pactl list sinks|grep Name
# or
pactl list sinks|grep card:

b) Exécutez moveinks.sh avec ce nom

./movesink.sh bluez_sink.48_C1_AC_C1_C3_85.hsp
# or
./movesink.sh bluez_sink.48_C1_AC_C1_C3_85

Et voici le script moveink.sh que j'ai créé. Il déplace le son de votre programme en sortie sur votre appareil bt (cela ne déplace pas automatiquement le micro de bt-headset intégré):

#!/bin/bash 
echo "Setting default sink to: $1";
# where new pa should output sound for new programs
pacmd set-default-sink $1
# get "active" programs and with while read
pactl list sink-inputs short |cut -f1 | while read line    
do
echo "Moving input: ";
echo $line
#| cut -f2 -d' ';
echo "to sink: $1";
#  move audio to the newly assigned output.
pacmd move-sink-input `echo $line | cut -f2 -d' '` $1

done

J'espère que cela vérifiera que votre configuration fonctionne. (J'avais l'habitude d'avoir un raccourci clavier, qui a couplé le casque-bt, a déplacé les entrées vers celui-ci et lorsque je l'ai utilisé à nouveau, il est revenu à cette configuration.)

Vous devriez rétablir votre audio principal par défaut avec:

./movesink.sh alsa_output.pci-0000_00_1b.0.analog-stereo
# or
./movesink.sh alsa_output.pci-0000_00_1b.0
1
Manwe