I'm having some trouble getting a bluetooth headset working with a raspberry pi as the default audio in/out device.

I tried connecting to the bluetooth device by doing the following:

pi@raspberrypi ~ $ hciconfig -a
hci0:   Type: BR/EDR  Bus: USB
    BD Address: 00:02:72:3A:C2:B6  ACL MTU: 1022:8  SCO MTU: 121:3
    RX bytes:3734 acl:7 sco:0 events:154 errors:0
    TX bytes:2560 acl:7 sco:0 commands:114 errors:0
    Features: 0xff 0xfe 0x0d 0xfe 0x98 0x7f 0x79 0x87
    Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
    Link policy: RSWITCH HOLD SNIFF 
    Link mode: SLAVE ACCEPT 
    Name: 'raspberrypi-0'
    Class: 0x4a0100
    Service Classes: Networking, Capturing, Telephony
    Device Class: Computer, Uncategorized
    HCI Version: 3.0 (0x5)  Revision: 0x9999
    LMP Version: 3.0 (0x5)  Subversion: 0x9999
    Manufacturer: Atheros Communications, Inc. (69)
pi@raspberrypi ~ $ hcitool dev
    hci0    00:02:72:3A:C2:B6
pi@raspberrypi ~ $ hcitool scan
Scanning ...
    00:61:11:11:01:C0   N95
pi@raspberrypi ~ $ sudo hcitool cc 00:61:11:11:01:C0
Can't create connection: Operation not permitted

I then bumped into a forum post here: http://forums.fedoraforum.org/showthread.php?t=193320 and thought that maybe I should be directly using rfcomm instead, so I tried the following:

pi@raspberrypi ~ $ sudo rfcomm bind hci0 00:61:11:11:01:C0 1
pi@raspberrypi ~ $ sudo rfcomm connect hci0 00:61:11:11:01:C0 1
Can't connect RFCOMM socket: Invalid exchange

My last attempt seemed to work in connecting, and involved using bluez as shown here: http://devasive.blogspot.ca/2012/11/ubuntu-1204-persistent-bluetooth-pairing.html

pi@raspberrypi ~ $ sudo bluez-simple-agent hci0 00:61:11:11:01:C0
RequestPinCode (/org/bluez/3316/hci0/dev_00_61_11_11_01_C0)
Enter PIN Code: 0000
New device (/org/bluez/3316/hci0/dev_00_61_11_11_01_C0)

The headset now periodically showed a blinking blue light to indicate that it was connected, however when I check using hcitool did not indicate any active connections:

pi@raspberrypi ~ $ hcitool con
pi@raspberrypi ~ $ 

I'm not sure if this is expected or not, but I'm assuming the headset is connected despite this. At this point the headset did not show up as a new audio card when I used aplay, instead showing only the following:

pi@raspberrypi ~ $ aplay -L
    Playback/recording through the PulseAudio sound server
    bcm2835 ALSA, bcm2835 ALSA
    Default Audio Device
pi@raspberrypi ~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7

I would also love to understand how to get the bluetooth headset to successfully show up as a card here, or otherwise any method that would let me use the bluetooth headset as the default audio in/out for the RPi.

So overall, not sure how to move forward here. This is a critical part of this project so any help or tips would be totally invaluable and appreciated. Thanks in advance!!!



Browse other questions tagged or ask your own question.