public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] problem in audio service
@ 2008-02-07  5:42 Andrew William
  2008-02-07  8:39 ` Johan Hedberg
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew William @ 2008-02-07  5:42 UTC (permalink / raw)
  To: Bluez-devel


[-- Attachment #1.1: Type: text/plain, Size: 4102 bytes --]

hi All
I am following the Audio How To for audio device 
These are contents of some files.....
# HCI daemon configuration file.
# HCId options
options {
         autoinit yes;
          security user;
        pairing multi;
#       passkey "0000";
} 

device {
        name "MyBD";
        class 0x000100;
        #pkt_type
 DH1,DM1,HV1;
        iscan enable; pscan enable;
        lp rswitch,hold,sniff,park;
}
/etc/bluetooth/audio.service

[Bluetooth Service]
Identifier=audio
Name=Audio service
Description=Bluetooth Audio service
Autostart=false

cat ~/.asoundrc
pcm.bluetooth {
        type bluetooth
        device 00:0F:DE:B1:02:42   #headset 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 commands
[root@localhost ~]# /etc/init.d/bluetooth start   ---------- without -s option
[root@localhost ~]# ps -ea | grep sdpd
[root@localhost ~]# /usr/local/lib/bluetooth/bluetoothd-service-audio &
[1] 4472
[root@localhost ~]# audio[4472]: Bluetooth Audio daemon
audio[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: key 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.conf: group A2DP not found
audio[4472]: SEP 0x9795040 registered: type:0 codec:0 seid:1
audio[4472]: add_service_record: got record id 0x10001
audio[4472]: add_service_record: got record id 0x10002
audio[4472]: add_service_record: got record id 0x10003
audio[4472]: Registered manager path:/org/bluez/audio
/usr/local/lib/bluetooth/bluetoothd-service-audio &
[2] 4604

/var/log/messages are -----------
                                                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  7 11:07:51 localhost hcid[32128]: Starting security manager 0
Feb  7 11:07:51 localhost hcid[32128]: Device hci0 has been activated
Feb  7 11:07:51 localhost hcid[32128]: Created local server at unix:abstract=/var/run/dbus-KmH44CDyJ1,guid=2f99aa4799c1691555c6259fb275d700
Feb  7 11:07:51 localhost input[32132]: Bluetooth Input daemon
Feb  7 11:07:51 localhost input[32132]: Registered input manager path:/org/bluez/input
                                            SDPD
Feb  7 11:08:23 localhost sdpd[32136]: Bluetooth SDP daemon
Feb  7 11:08:23 localhost sdpd[32136]: Starting SDP server
                                            BT AUDIO DAEMON
Feb  7 11:09:04 localhost audio[32141]: Bluetooth Audio daemon
Feb  7 11:09:04 localhost audio[32141]: Unix socket created: 5
Feb  7 11:09:04 localhost audio[32141]: Registered manager path:/org/bluez/audio

Now I tried running dbud commands from Audio HowTo

XYZ@localhost sbc]$ dbus-send --system --type=method_call --print-reply --dest=org.bluez /org/bluez org.bluez.Manager.ActivateService string:audio
method return sender=:1.56 -> dest=:1.59
   string ":1.60"

XYZ@localhost sbc]$ dbus-send --system --type=method_call --print-reply --dest=":1.59" /org/bluez/audio org.bluez.audio.Manager.CreateHeadset string:00:0F:DE:B1:02:42
Error org.freedesktop.DBus.Error.ServiceUnknown: The name :1.59 was not provided by any .service files

What is this error? Can someone tell me what is being missed here?


Thank In advance
Andrew








      Did you know? You can CHAT without downloading messenger. Go to http://in.messenger.yahoo.com/webmessengerpromo.php/ 

[-- Attachment #1.2: Type: text/html, Size: 5459 bytes --]

[-- Attachment #2: Type: text/plain, Size: 228 bytes --]

-------------------------------------------------------------------------
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/

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Bluez-devel] problem in audio service
  2008-02-07  5:42 [Bluez-devel] problem in audio service Andrew William
@ 2008-02-07  8:39 ` Johan Hedberg
  0 siblings, 0 replies; 5+ messages in thread
From: Johan Hedberg @ 2008-02-07  8:39 UTC (permalink / raw)
  To: BlueZ development

Hi Andrew,

On Feb 7, 2008, at 7:42, Andrew William wrote:
> XYZ@localhost sbc]$ dbus-send --system --type=method_call --print- 
> reply --dest=org.bluez /org/bluez org.bluez.Manager.ActivateService  
> string:audio
> method return sender=:1.56 -> dest=:1.59
>    string ":1.60"
>
> XYZ@localhost sbc]$ dbus-send --system --type=method_call --print- 
> reply --dest=":1.59" /org/bluez/audio  
> org.bluez.audio.Manager.CreateHeadset string:00:0F:DE:B1:02:42
> Error org.freedesktop.DBus.Error.ServiceUnknown: The name :1.59 was  
> not provided by any .service files
>
> What is this error? Can someone tell me what is being missed here?

The value of the string parameter in the reply was ":1.60" if you look  
closely. That's what you should have used. The "dest=:1.59" is just  
debug output from dbus-send telling properties of the method return  
message that it got (i.e. "1:59" being the unique name that dbus-send  
had during the short time that it was connected to the bus, which also  
explains the error you got in the second command since the first dbus- 
send process didn't exist anymore).

Johan

-------------------------------------------------------------------------
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/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Bluez-devel] problem in audio service
@ 2008-02-07  9:02 Andrew William
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew William @ 2008-02-07  9:02 UTC (permalink / raw)
  To: BlueZ development


[-- Attachment #1.1: Type: text/plain, Size: 2764 bytes --]

hi johan
Thanks for reply 
tried this but no change 
XYZ@localhost BlueZ]$ dbus-send --system --type=method_call --print-reply --dest=org.bluez /org/bluez org.bluez.Manager.ActivateService string:audio
method return sender=:1.86 -> dest=:1.110
   string ":1.111"
XYZ@localhost BlueZ]$ dbus-send --system --type=method_call --print-reply --dest=":1.111" /org/bluez/audio org.bluez.audio.Manager.CreateHeadset string:00:0F:DE:B1:02:42
Error org.freedesktop.DBus.Error.ServiceUnknown: The name :1.111 was not provided by any .service files


----- Original Message ----
From: Johan Hedberg <johan.hedberg@gmail.com>
To: BlueZ development <bluez-devel@lists.sourceforge.net>
Sent: Thursday, 7 February, 2008 2:09:15 PM
Subject: Re: [Bluez-devel] problem in audio service

Hi 
Andrew,

On 
Feb 
7, 
2008, 
at 
7:42, 
Andrew 
William 
wrote:
> 
XYZ@localhost 
sbc]$ 
dbus-send 
--system 
--type=method_call 
--print- 
> 
reply 
--dest=org.bluez 
/org/bluez 
org.bluez.Manager.ActivateService  
> 
string:audio
> 
method 
return 
sender=:1.56 
-> 
dest=:1.59
>  
  
string 
":1.60"
>
> 
XYZ@localhost 
sbc]$ 
dbus-send 
--system 
--type=method_call 
--print- 
> 
reply 
--dest=":1.59" 
/org/bluez/audio  
> 
org.bluez.audio.Manager.CreateHeadset 
string:00:0F:DE:B1:02:42
> 
Error 
org.freedesktop.DBus.Error.ServiceUnknown: 
The 
name 
:1.59 
was  
> 
not 
provided 
by 
any 
.service 
files
>
> 
What 
is 
this 
error? 
Can 
someone 
tell 
me 
what 
is 
being 
missed 
here?

The 
value 
of 
the 
string 
parameter 
in 
the 
reply 
was 
":1.60" 
if 
you 
look  
closely. 
That's 
what 
you 
should 
have 
used. 
The 
"dest=:1.59" 
is 
just  
debug 
output 
from 
dbus-send 
telling 
properties 
of 
the 
method 
return  
message 
that 
it 
got 
(i.e. 
"1:59" 
being 
the 
unique 
name 
that 
dbus-send  
had 
during 
the 
short 
time 
that 
it 
was 
connected 
to 
the 
bus, 
which 
also  
explains 
the 
error 
you 
got 
in 
the 
second 
command 
since 
the 
first 
dbus- 
send 
process 
didn't 
exist 
anymore).

Johan

-------------------------------------------------------------------------
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/
_______________________________________________
Bluez-devel 
mailing 
list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel






      Unlimited freedom, unlimited storage. Get it now, on http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/

[-- Attachment #1.2: Type: text/html, Size: 3708 bytes --]

[-- Attachment #2: Type: text/plain, Size: 228 bytes --]

-------------------------------------------------------------------------
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/

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Bluez-devel] problem in audio service
@ 2008-02-07 10:35 Andrew William
  2008-02-08 14:28 ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew William @ 2008-02-07 10:35 UTC (permalink / raw)
  To: BlueZ development


[-- Attachment #1.1: Type: text/plain, Size: 5314 bytes --]


hi All
I am following the Audio How To for audio device 
These are contents of some files.....
# HCI daemon configuration file.
# HCId options
options {
         autoinit yes;
          security user;
        pairing multi;
#       passkey "0000";
} 

device {
        name "MyBD";
        class 0x000100;
        #pkt_type
 DH1,DM1,HV1;
        iscan enable; pscan enable;
        lp rswitch,hold,sniff,park;
}
/etc/bluetooth/audio.service

[Bluetooth Service]
Identifier=audio
Name=Audio service
Description=Bluetooth Audio service
Autostart=false

cat ~/.asoundrc
pcm.bluetooth {
        type bluetooth
        device 00:0F:DE:B1:02:42   #headset 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 commands
[root@localhost ~]# /etc/init.d/bluetooth start   ---------- without -s option
[root@localhost ~]# ps -ea | grep sdpd
[root@localhost ~]# /usr/local/lib/bluetooth/bluetoothd-service-audio &
[1]
 4472
[root@localhost ~]# audio[4472]: Bluetooth Audio daemon
audio[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: key 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.conf: group A2DP not found
audio[4472]: SEP 0x9795040 registered: type:0 codec:0 seid:1
audio[4472]: add_service_record: got record id 0x10001
audio[4472]: add_service_record: got record id 0x10002
audio[4472]: add_service_record: got record id 0x10003
audio[4472]: Registered manager
 path:/org/bluez/audio
/usr/local/lib/bluetooth/bluetoothd-service-audio &
[2] 4604

/var/log/messages are -----------
                                                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  7 11:07:51 localhost hcid[32128]: Starting security manager 0
Feb  7 11:07:51 localhost hcid[32128]: Device hci0 has been activated
Feb  7 11:07:51 localhost hcid[32128]: Created local server at unix:abstract=/var/run/dbus-KmH44CDyJ1,guid=2f99aa4799c1691555c6259fb275d700
Feb  7 11:07:51 localhost input[32132]: Bluetooth Input
 daemon
Feb  7 11:07:51 localhost input[32132]: Registered input manager path:/org/bluez/input
                                            SDPD
Feb  7 11:08:23 localhost sdpd[32136]: Bluetooth SDP daemon
Feb  7 11:08:23 localhost sdpd[32136]: Starting SDP server
                                            BT AUDIO DAEMON
Feb  7 11:09:04 localhost audio[32141]: Bluetooth Audio daemon
Feb  7 11:09:04 localhost audio[32141]: Unix socket created: 5
Feb  7 11:09:04 localhost audio[32141]: Registered manager path:/org/bluez/audio

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

Now when I run
[localhost ~]$ mplayer_install/bin/mplayer -ao alsa:device=bluetooth 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: received BT_SETCONFIGURATION_REQ
audio[2165]: config sbc - frequency = 0 channel_mode = 0 allocation = 0 subbands = 0 blocks = 0 bitpool = 0
audio[2165]: State changed /org/bluez/audio/device0: HEADSET_STATE_CONNECTED -> HEADSET_STATE_PLAY_IN_PROGRESS
audio[2165]: connect(): Connection timed out (110)
audio[2165]: config failed
audio[2165]: Audio API: sending BT_SETCONFIGURATION_RSP
audio[2165]: State changed /org/bluez/audio/device0: HEADSET_STATE_PLAY_IN_PROGRESS -> HEADSET_STATE_CONNECTED

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...

Thank In advance
Andrew










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

-----Inline Attachment Follows-----

-------------------------------------------------------------------------
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/


-----Inline Attachment Follows-----

_______________________________________________
Bluez-devel 
mailing 
list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel







      Get the freedom to save as many mails as you wish. To know how, go to http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html

[-- Attachment #1.2: Type: text/html, Size: 7447 bytes --]

[-- Attachment #2: Type: text/plain, Size: 228 bytes --]

-------------------------------------------------------------------------
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/

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Bluez-devel] problem in audio service
  2008-02-07 10:35 Andrew William
@ 2008-02-08 14:28 ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 5+ messages in thread
From: Luiz Augusto von Dentz @ 2008-02-08 14:28 UTC (permalink / raw)
  To: BlueZ development

>>From the debug log what I can assume is that your device is not
responding to a sco connect request,
normally this happens when your device is off or not accepting connections.

ps: Make sure the device is in pairing state.

-- =

Luiz Augusto von Dentz
Engenheiro de Computa=E7=E3o

-------------------------------------------------------------------------
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/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-02-08 14:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-07  5:42 [Bluez-devel] problem in audio service Andrew William
2008-02-07  8:39 ` Johan Hedberg
  -- strict thread matches above, loose matches on Subject: below --
2008-02-07  9:02 Andrew William
2008-02-07 10:35 Andrew William
2008-02-08 14:28 ` Luiz Augusto von Dentz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox