From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 7 Feb 2008 16:05:43 +0530 (IST) From: Andrew William To: BlueZ development MIME-Version: 1.0 Message-ID: <682955.71764.qm@web94001.mail.in2.yahoo.com> Subject: Re: [Bluez-devel] problem in audio service Reply-To: BlueZ development List-Id: BlueZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1407173916==" Sender: bluez-devel-bounces@lists.sourceforge.net Errors-To: bluez-devel-bounces@lists.sourceforge.net --===============1407173916== Content-Type: multipart/alternative; boundary="0-519852096-1202380543=:71764" --0-519852096-1202380543=:71764 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable =0Ahi All=0AI am following the Audio How To for audio device =0AThese are c= ontents of some files.....=0A# HCI daemon configuration file.=0A# HCId opti= ons=0Aoptions {=0A autoinit yes;=0A security user;=0A = pairing multi;=0A# passkey "0000";=0A} =0A=0Adevice {=0A na= me "MyBD";=0A class 0x000100;=0A #pkt_type=0A DH1,DM1,HV1;=0A= iscan enable; pscan enable;=0A lp rswitch,hold,sniff,park;= =0A}=0A/etc/bluetooth/audio.service=0A=0A[Bluetooth Service]=0AIdentifier= =3Daudio=0AName=3DAudio service=0ADescription=3DBluetooth Audio service=0AA= utostart=3Dfalse=0A=0Acat ~/.asoundrc=0Apcm.bluetooth {=0A type blue= tooth=0A device 00:0F:DE:B1:02:42 #headset address=0A}=0A=0Acat /e= tc/asound.conf=0A#Generated by system-config-soundcard, do not edit by hand= =0A#SWCONF=0A#DEV 0=0Adefaults.pcm.card 0=0Adefaults.pcm.device 0=0Adefault= s.ctl.card 0=0A=0AI run following commands=0A[root@localhost ~]# /etc/init.= d/bluetooth start ---------- without -s option=0A[root@localhost ~]# ps -= ea | grep sdpd=0A[root@localhost ~]# /usr/local/lib/bluetooth/bluetoothd-se= rvice-audio &=0A[1]=0A 4472=0A[root@localhost ~]# audio[4472]: Bluetooth Au= dio daemon=0Aaudio[4472]: Unix socket created: 5=0Aaudio[4472]: audio.conf:= /etc/bluetooth/audio.conf: key Enable not found=0Aaudio[4472]: audio.conf:= /etc/bluetooth/audio.conf: key Disable not found=0Aaudio[4472]: add_servic= e_record: got record id 0x10000=0Aaudio[4472]: audio.conf: /etc/bluetooth/a= udio.conf: key Disable not found=0Aaudio[4472]: audio.conf: /etc/bluetooth/= audio.conf: group A2DP not found=0Aaudio[4472]: audio.conf: /etc/bluetooth/= audio.conf: group A2DP not found=0Aaudio[4472]: audio.conf: /etc/bluetooth/= audio.conf: group A2DP not found=0Aaudio[4472]: audio.conf: /etc/bluetooth/= audio.conf: group A2DP not found=0Aaudio[4472]: SEP 0x9795040 registered: t= ype:0 codec:0 seid:1=0Aaudio[4472]: add_service_record: got record id 0x100= 01=0Aaudio[4472]: add_service_record: got record id 0x10002=0Aaudio[4472]: = add_service_record: got record id 0x10003=0Aaudio[4472]: Registered manager= =0A path:/org/bluez/audio=0A/usr/local/lib/bluetooth/bluetoothd-service-aud= io &=0A[2] 4604=0A=0A/var/log/messages are -----------=0A = HCID=0AFeb 7 11:07:51 localhost hcid[32128]:= Bluetooth HCI daemon=0AFeb 7 11:07:51 localhost hcid[32128]: HCI dev 0 re= gistered=0AFeb 7 11:07:51 localhost hcid[32128]: HCI dev 0 already up=0AFe= b 7 11:07:51 localhost hcid[32128]: Device hci0 has been added=0AFeb 7 11= :07:51 localhost hcid[32128]: Starting security manager 0=0AFeb 7 11:07:51= localhost hcid[32128]: Device hci0 has been activated=0AFeb 7 11:07:51 lo= calhost hcid[32128]: Created local server at unix:abstract=3D/var/run/dbus-= KmH44CDyJ1,guid=3D2f99aa4799c1691555c6259fb275d700=0AFeb 7 11:07:51 localh= ost input[32132]: Bluetooth Input=0A daemon=0AFeb 7 11:07:51 localhost inp= ut[32132]: Registered input manager path:/org/bluez/input=0A = SDPD=0AFeb 7 11:08:23 localhost sdpd[32136]: = Bluetooth SDP daemon=0AFeb 7 11:08:23 localhost sdpd[32136]: Starting SDP = server=0A BT AUDIO DAEMON=0AFeb = 7 11:09:04 localhost audio[32141]: Bluetooth Audio daemon=0AFeb 7 11:09:0= 4 localhost audio[32141]: Unix socket created: 5=0AFeb 7 11:09:04 localhos= t audio[32141]: Registered manager path:/org/bluez/audio=0A=0AThen i run th= e passkey-agent command=0A$passkey-agent --default 0000 00:0F:DE:B1:02:42 &= =0A=0ANow when I run=0A[localhost ~]$ mplayer_install/bin/mplayer -ao alsa:= device=3Dbluetooth 1.mp3 =0AI get it working but some strange audio is play= ed...=0AThese are the logs of above=0Aaudio[2165]: Audio API: received BT_G= ETCAPABILITIES_REQ=0Aaudio[2165]: Audio API: sending BT_GETCAPABILITIES_RSP= =0Aaudio[2165]: Audio API: received BT_SETCONFIGURATION_REQ=0Aaudio[2165]: = config sbc - frequency =3D 0 channel_mode =3D 0 allocation =3D 0 subbands = =3D 0 blocks =3D 0 bitpool =3D 0=0Aaudio[2165]: State changed /org/bluez/au= dio/device0: HEADSET_STATE_CONNECTED -> HEADSET_STATE_PLAY_IN_PROGRESS=0Aau= dio[2165]: connect(): Connection timed out (110)=0Aaudio[2165]: config fail= ed=0Aaudio[2165]: Audio API: sending BT_SETCONFIGURATION_RSP=0Aaudio[2165]:= State changed /org/bluez/audio/device0: HEADSET_STATE_PLAY_IN_PROGRESS -> = HEADSET_STATE_CONNECTED=0A=0AThis happens only once ...After that when I tr= y mplayer again=0A[AO_ALSA] alsa-lib: pcm_bluetooth.c:459:(bluetooth_hsp_hw= _params) BT_SETCONFIGURATION failed : Input/output error(5)=0A[AO_ALSA] Una= ble to set hw-parameters: Input/output error=0A=0APLEASE someone help me ou= t...=0A=0AThank In advance=0AAndrew=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A = Now you can chat without downloading messenger. Click here to know how.=0A= =0A-----Inline Attachment Follows-----=0A=0A-------------------------------= ------------------------------------------=0AThis =0ASF.net =0Aemail =0Ais = =0Asponsored =0Aby: =0AMicrosoft=0ADefy =0Aall =0Achallenges. =0AMicrosoft(= R) =0AVisual =0AStudio =0A2008.=0Ahttp://clk.atdmt.com/MRT/go/vse0120000070= mrt/direct/01/=0A=0A=0A-----Inline Attachment Follows-----=0A=0A___________= ____________________________________=0ABluez-devel =0Amailing =0Alist=0ABlu= ez-devel@lists.sourceforge.net=0Ahttps://lists.sourceforge.net/lists/listin= fo/bluez-devel=0A=0A=0A=0A=0A=0A=0A=0A Get the freedom to save as many= mails as you wish. To know how, go to http://help.yahoo.com/l/in/yahoo/mai= l/yahoomail/tools/tools-08.html --0-519852096-1202380543=:71764 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

hi All
I am following t= he Audio How To for audio device
These are contents of some files.....<= br># HCI daemon configuration file.
# HCId options
options {
 = ;        autoinit yes;
  &n= bsp;       security user;
  &nbs= p;     pairing multi;
#     = ;  passkey "0000";
}

device {
    &n= bsp;   name "MyBD";
        class 0x000100;
        #pkt_type=0A= DH1,DM1,HV1;
        iscan enable; p= scan enable;
        lp rswitch,hold,= sniff,park;
}
/etc/bluetooth/audio.service

[Bluetooth Service]=
Identifier=3Daudio
Name=3DAudio service
Description=3DBluetooth A= udio service
Autostart=3Dfalse

cat ~/.asoundrc
pcm.bluetooth {=
        type bluetooth
 &nbs= p;      device 00:0F:DE:B1:02:42   #head= set address
}

cat /etc/asound.conf
#Generated by system-config= -soundcard, do not edit by hand
#SWCONF
#DEV 0
defaults.pcm.card 0=
defaults.pcm.device 0
defaults.ctl.card 0

I run following com= mands
[root@localhost ~]# /etc/init.d/bluetooth start   ------= ---- without -s option
[root@localhost ~]# ps -ea | grep sdpd
[root@l= ocalhost ~]# /usr/local/lib/bluetooth/bluetoothd-service-audio &
[1]= =0A 4472
[root@localhost ~]# audio[4472]: Bluetooth Audio daemon
audi= o[4472]: Unix socket created: 5
audio[4472]: audio.conf: /etc/bluetooth/= audio.conf: key Enable not found
audio[4472]: audio.conf: /etc/bluetooth= /audio.conf: key Disable not found
audio[4472]: add_service_record: got = record id 0x10000
audio[4472]: audio.conf: /etc/bluetooth/audio.conf: ke= y Disable not found
audio[4472]: audio.conf: /etc/bluetooth/audio.conf: = group A2DP not found
audio[4472]: audio.conf: /etc/bluetooth/audio.conf:= group A2DP not found
audio[4472]: audio.conf: /etc/bluetooth/audio.conf= : group A2DP not found
audio[4472]: audio.conf: /etc/bluetooth/audio.con= f: group A2DP not found
audio[4472]: SEP 0x9795040 registered: type:0 co= dec:0 seid:1
audio[4472]: add_service_record: got record id 0x10001
a= udio[4472]: add_service_record: got record id 0x10002
audio[4472]: add_s= ervice_record: got record id 0x10003
audio[4472]: Registered manager=0A = path:/org/bluez/audio
/usr/local/lib/bluetooth/bluetoothd-service-audio = &
[2] 4604

/var/log/messages are -----------
  &= nbsp;                =                &nbs= p;  HCID
Feb  7 11:07:51 localhost hcid[32128]: Bluetooth HCI= daemon
Feb  7 11:07:51 localhost hcid[32128]: HCI dev 0 registered=
Feb  7 11:07:51 localhost hcid[32128]: HCI dev 0 already up
Feb=   7 11:07:51 localhost hcid[32128]: Device hci0 has been added
Feb&= nbsp; 7 11:07:51 localhost hcid[32128]: Starting security manager 0
Feb&= nbsp; 7 11:07:51 localhost hcid[32128]: Device hci0 has been activated
F= eb  7 11:07:51 localhost hcid[32128]: Created local server at unix:abs= tract=3D/var/run/dbus-KmH44CDyJ1,guid=3D2f99aa4799c1691555c6259fb275d700Feb  7 11:07:51 localhost input[32132]: Bluetooth Input=0A daemon
= Feb  7 11:07:51 localhost input[32132]: Registered input manager path:= /org/bluez/input
           &n= bsp;                =       SDPD
Feb  7 11:08:23 localhost sdpd[32= 136]: Bluetooth SDP daemon
Feb  7 11:08:23 localhost sdpd[32136]: S= tarting SDP server
           =                 = ;       BT AUDIO DAEMON
Feb  7 11:09:04 loca= lhost audio[32141]: Bluetooth Audio daemon
Feb  7 11:09:04 localhos= t audio[32141]: Unix socket created: 5
Feb  7 11:09:04 localhost au= dio[32141]: Registered manager path:/org/bluez/audio

Then i run the = passkey-agent command
$passkey-agent --default 0000 00:0F:DE:B1:02:42 &a= mp;

Now when I run
[localhost ~]$ mplayer_install/bin/mplayer -ao alsa:device=3Dbluetooth 1.mp3
I get it= working but some strange audio is played...
These are the logs of above=
audio[2165]: Audio API: received BT_GETCAPABILITIES_REQ
audio[2165]:= Audio API: sending BT_GETCAPABILITIES_RSP
audio[2165]: Audio API: recei= ved BT_SETCONFIGURATION_REQ
audio[2165]: config sbc - frequency =3D 0 ch= annel_mode =3D 0 allocation =3D 0 subbands =3D 0 blocks =3D 0 bitpool =3D 0=
audio[2165]: State changed /org/bluez/audio/device0: HEADSET_STATE_CONN= ECTED -> HEADSET_STATE_PLAY_IN_PROGRESS
audio[2165]: connect(): Conne= ction timed out (110)
audio[2165]: config failed
audio[2165]: Audio A= PI: sending BT_SETCONFIGURATION_RSP
audio[2165]: State changed /org/blue= z/audio/device0: HEADSET_STATE_PLAY_IN_PROGRESS -> HEADSET_STATE_CONNECT= ED

This happens only once ...After that when I try mplayer again
= [AO_ALSA] alsa-lib: pcm_bluetooth.c:459:(bluetooth_hsp_hw_params) BT_SETCONFIGURATION failed : Input/output error(5)
[AO_ALSA] Unable to = set hw-parameters: Input/output error

PLEASE someone help me out...<= br>
Thank In advance
Andrew





=0A=0A= =0A
Now you can chat without downloading messenger. Click = here to know how.


-----Inline Attachment Follo= ws-----

------------------------------------------------------------= -------------
This =0ASF.net =0Aemail =0Ais =0Asponsored =0Aby: =0AMicro= soft
Defy =0Aall =0Achallenges. =0AMicrosoft(R) =0AVisual =0AStudio =0A2= 008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/<= /a>


=0A=0A=0A
Forgot the famous last words? Access your message archive onlin= e. Click here. --0-519852096-1202380543=:71764-- --===============1407173916== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ --===============1407173916== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Bluez-devel mailing list Bluez-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-devel --===============1407173916==--