Ah oui j'ai pas fait attention :s
j'ai un scripte qui me permet de me connecté je l'utilise car BlueZ ne démarre pas automatiquement et je sais pas comment l'exécute manuellement
voila le resultat
[Zikas@My-Laptop Bureau]$ su -c './CasqueBT.sh'
Mot de passe :
Please place your Bluetooth audio device into pairing mode, then press <Enter>
Scanning for Bluetooth audio device...
select device:
1) 00:03:C9:BB:A8:7D Wanadoo_1c01
2) 00:07:A4:F2:D9:29 Motorola HT820
#? 2
Selected bluetooth device: 00:07:A4:F2:D9:29
Writing new ~.asoundrc...
Getting default adapter...
/org/bluez/2214/hci0
Removing any stale Bluetooth audio device:
method return sender=:1.11 -> dest=:1.78 reply_serial=2
Creating Bluetooth audio device:
/org/bluez/2214/hci0/dev_00_07_A4_F2_D9_29
et voila le scripte
#!/bin/bash
#
# Copyright (c) 2008 Technetra Corp
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following
# conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
#
echo "Please place your Bluetooth audio device into pairing mode, then press <Enter>"
read
echo "Scanning for Bluetooth audio device..."
scan=`hcitool scan | sed 's/^\s*//' | grep -v 'Scanning'`
line=$scan
if [[ "`echo "$scan" | wc -l`" -gt "1" ]]; then
echo "select device:"
save_ifs=$IFS
IFS="
"
select line in $scan; do
#echo got $line
break
done
IFS=$save_ifs
fi
BT_BDADDR=`echo $line | awk '{print $1}'`
[[ -z "$BT_BDADDR" ]] && echo no bluetooth device found && exit
echo "Selected bluetooth device: $BT_BDADDR"
# => e.g., 00:11:22:33:44:55
echo "Writing new ~.asoundrc..."
cat >> ~/.asoundrc <<EOD
pcm.bt_audioraw {
type bluetooth
device $BT_BDADDR
profile "auto"
}
pcm.bt_audio {
type plug
slave.pcm "bt_audioraw"
hint {
show on
description "Bluetooth audio device"
}
}
EOD
echo "Getting default adapter..."
_BT_ADAPTER=`dbus-send --system --print-reply --dest=org.bluez / \
org.bluez.Manager.DefaultAdapter|awk '/object path/ {print $3}'`
BT_ADAPTER=${_BT_ADAPTER//\"/}
echo "$BT_ADAPTER"
echo "Removing any stale Bluetooth audio device:"
_OLD_BT_DEVICE=`dbus-send --system --print-reply --dest=org.bluez $BT_ADAPTER \
org.bluez.Adapter.FindDevice string:$BT_BDADDR|awk '/object path/ {print $3}'`
OLD_BT_DEVICE=${_OLD_BT_DEVICE//\"/}
dbus-send --system --print-reply --dest=org.bluez $BT_ADAPTER \
org.bluez.Adapter.RemoveDevice objpath:$OLD_BT_DEVICE
echo "Creating Bluetooth audio device:"
_BT_DEVICE=`dbus-send --system --print-reply --dest=org.bluez $BT_ADAPTER \
org.bluez.Adapter.CreateDevice string:$BT_BDADDR|awk '/object path/ {print $3}'`
BT_DEVICE=${_BT_DEVICE//\"/}
echo "$BT_DEVICE"
# optional: echo "Connecting -- BlueZ applet will prompt for pin..."
# optional: dbus-send --system --print-reply --dest=org.bluez \
# optional: $BT_DEVICE org.bluez.AudioSink.Connect
#
# NOTE: if the above dbus-send is NOT executed, then a pairing
# request for an A2DP device will be initiated the first time
# the ALSA virtual device bt_audio is used. Otherwise, when
# "AudioSink.Connect" is executed, a pairing request to the device
# will be initiated immediately and then ALSA will subsequently use
# this paired connection for playing sound through bt_audio. Executing
# "AudioSink.Connect" is useful for preparing devices ahead of time
# to avoid undesired delays and to avoid pairing mode timeouts.
#
# Also note that a device conforming to the headset profile (HSP)
# does not support "AudioSink.Connect". However, this script (without
# running "AudioSink.Connect") will still work because BlueZ will
# request pairing when "Adapter.CreateDevice" is executed for HSP
# devices. You can check out your device's specific capabilities
# using sdptool.
#echo "Test sound sample..."
#aplay -D bt_audio your_sound_file.wav