Talk:Bluetooth headset

From Gentoo Linux Wiki

Jump to: navigation, search

I can comfirm that the Sony Ericsson HDH-DS970 headset also works flavlessly.

A note on ALSA and a2player with Mplayer,Xine,XMMS and everything that you want to stream to your headset. Since I was unable to find *anything* about how to get a2play to work with a ALSA sound socket (ie, like /dev/dsp)

Run "a2play -d <bt-address> /dev/dsp" and take an adio cable from the audio output to line-in and you have a stereo bluetooth headset with alsa.

You may also need to have this .asoundrc file in your home directory

Code:
pcm.dsp0 {
        type plug
        slave.pcm "swmixer"
}

pcm.dsp1 {
        type plug
        slave.pcm "swmixer"
}

pcm.!default {
        type plug
        slave.pcm "swmixer"
}

pcm.swmixer {
        type dmix
        ipc_key 1234
        slave {
                pcm "hw:0,0"
                period_time 0
                period_size 1024
                buffer_size 8192
                rate 44100
        }
}

--Startail 21:09, 22 July 2006 (UTC)

Contents

[edit] Modifications to BTProximity for a more accurate value

I have modified the btproximity script to give a more accurate meridian value since when it lost connection and had to reconnect it always gave a few (1-3) results as 0 even tough the result should not had been that.

This is only the modified sections

Code:
function check_connection {
    connected=0;
    found=0
    for s in `$HCITOOL con`; do
        if [[ "$s" == "$DEVICE" ]]; then
            found=1;
        fi
    done
    if [[ $found == 1 ]]; then
                count=$(($count+1));
        connected=1;
    else
       msg 'Attempting connection...'
                count=1; rssi=0; rssi_data=0; rssi_total=0; # Reset the collected data
        if [ -z "`$HCITOOL cc $DEVICE 2>&1`" ]; then
            msg 'Connected.'
            connected=1;
        else
            msg "ERROR: Could not connect to device $DEVICE."
        fi
    fi
}
if [[ $connected -eq 1 ]]; then
    rssi_data=`$HCITOOL rssi $DEVICE | sed -e 's/RSSI return value: //g'`
    rssi_total=$(($rssi_total+$rssi_data));
    rssi=$(($rssi_total/$count));

        if [[ $count -ge 5 ]]; then # Only check rssi value if we have 5 or more results
            if (( $rssi <= $THRESHOLD )); then
                if [[ "$state" == "near" ]]; then
                    msg "*** Device \"$name\" [$DEVICE] has left proximity"
                    state="far"
                    $FAR_CMD > /dev/null 2>&1
                fi
                else
                    if [[ "$state" == "far" ]]; then
                        msg "*** Device \"$name\" [$DEVICE] is within proximity"
                        state="near"
                        $NEAR_CMD > /dev/null 2>&1
                        #$START_CMD &
                    fi
                fi
            fi
            msg "$count, state = $state, RSSI = $rssi, PID = $PID"
        fi
    sleep $CHECK_INTERVAL
done

--Startail 16:03, 24 July 2006 (UTC)

[edit] Sony Ericsson HBH-IV835

Bought this headset yesterday, works flawlessly with Skype. Had to upgrade btsco[-kernel] to 0.42 to get a reliable connection.

Music streaming marginal from a Bluetooth 1.2 (CSR) adapter, headset is mono anyway.

Volume controls seem inactive, but the headset is stated as having automatic volume adjustment so volume levels have not been an issue.

As stated (added to the table), the design of the headset is such that it drops the bluetooth link after a short period of inactivity. I'm not sure how easy it would be to script btsco to connect to the headset when a program requests audio i/o, but that would be the idea solution, rather than manual link initiation, or continuously reconnecting (and draining the battery). EDIT: This appears to be fixed with >=bluez-(libs|utils)-3.0, more testing appears to be necessary.

[edit] Needs an update

Several things about this howto and the ebuilds in bugzilla need to be updated, Boky please do so. Ofcourse these are my experiences, I could also be doing something wrong.

- Both the plugz-cvs and libsbc-cvs don't work with the very latest cvs (probably because of some quirk of them committing a little change upstream). The bootstrap.sh file has wrong permissions. So you need to insert a "chmod 755 bootstrap.sh" into both ebuilds before where it does "./bootstrap.sh ...".

- I'm really having a lot of difficulties with bluetooth-alsa-kernel (and with it's predecessor btsco-kernel). Maybe I'm just using a too new kernel or missing some unspecified dependency (emu10k1 in kernel crossed my mind but this isn't it). It just fails to emerge with lots of errors (actually I got it to emerge once some time ago, so I must be close) and I don't seem to need it. I just remove the dependency from the bluetooth-alsa-utils ebuild. I don't install bluetooth-alsa-kernel but apart from that I do everything the same.

- Why do both plugz-cvs and bluetooth-alsa-utils partly install the same files? Something is not right here. I need to install bluetooth-alsa-utils last (so I'm actually still using btsco-0.5) otherwise I only get silence.

Wouldn't it be time to consolidate and make non-cvs ebuilds (as the cvs ones will cause lots of headaches in the future)? And for heaven's sake someone with inside information please clean up the bugzilla page.

Cheers, pjv 21:36, 22 August 2007 (UTC)

[edit] Service Classes: Capturing, Object Transfer only?

Trying to use skype.

/etc> hciconfig -a hci0: Type: USB

       BD Address: 00:1E:37:00:B2:C5 ACL MTU: 310:10 SCO MTU: 64:8
       UP RUNNING PSCAN ISCAN
       RX bytes:3036 acl:0 sco:0 events:136 errors:0
       TX bytes:2255 acl:0 sco:0 commands:64 errors:0
       Features: 0xff 0xff 0x8f 0xfe 0x9b 0xff 0x59 0x83
       Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
       Link policy: RSWITCH HOLD SNIFF PARK
       Link mode: SLAVE ACCEPT
       Name: 'stan-0'
       Class: 0x180100
       Service Classes: Capturing, Object Transfer
       Device Class: Computer, Uncategorized
       HCI Ver: 2.1 (0x4) HCI Rev: 0x1306 LMP Ver: 2.1 (0x4) LMP Subver: 0x1306
       Manufacturer: Cambridge Silicon Radio (10)

As you can see, I do not have capabilities enough to do voice on this. What does this mean? What is the remedy?

Dell Latitude D630 with built-in wireless

[edit] USE=alsa emerge

Shouldn't the alsa USE flag be set in package.use or via ufed? 98.204.30.89 12:52, 4 July 2008 (UTC)

Personal tools