2012-08-17 11:30:38

by Niklas Claesson

[permalink] [raw]
Subject: Setting up an A2DP server

Hi,

I would like to use a computer as an A2DP sink (bluetooth devices
should be able to play through the computers speakers). So far I can
manually connect from the computer using dbus signals with bluez/pulse
(org.bluez.AudioSource). But what I really want is for the external
device to connect to my service. The goal is to let anyone with
bluetooth play music in our common space at the university.

What would be the most straight forward way to implement this?

Med vänliga hälsningar
Niklas Claesson


2012-08-21 15:13:46

by Niklas Claesson

[permalink] [raw]
Subject: Re: Setting up an A2DP server

2012/8/20 Lucas De Marchi <[email protected]>:
> On Fri, Aug 17, 2012 at 6:50 PM, Niklas Claesson
> <[email protected]> wrote:
>> I've actually solved the issue myself by writing an Agent that accepts
>
> You could mark the device as trusted, so you don't have to do this.

I don't know which devices will connect, perhaps I could mark all
nearby devices as trusted. But I don't know how I would do that.

>
>
>> all incoming requests, and another python script that polls 'pacmd
>> list-sources' every 2 seconds for new bluetooth sources. And third and
>
> Why do you need this?

I have to set the bluetooth device as current source in Pulseaudio.

>
>
> Lucas De Marchi

Niklas Claesson

2012-08-20 17:44:03

by Lucas De Marchi

[permalink] [raw]
Subject: Re: Setting up an A2DP server

On Fri, Aug 17, 2012 at 6:50 PM, Niklas Claesson
<[email protected]> wrote:
> I've actually solved the issue myself by writing an Agent that accepts

You could mark the device as trusted, so you don't have to do this.


> all incoming requests, and another python script that polls 'pacmd
> list-sources' every 2 seconds for new bluetooth sources. And third and

Why do you need this?


Lucas De Marchi

2012-08-17 21:50:28

by Niklas Claesson

[permalink] [raw]
Subject: Re: Setting up an A2DP server

I've actually solved the issue myself by writing an Agent that accepts
all incoming requests, and another python script that polls 'pacmd
list-sources' every 2 seconds for new bluetooth sources. And third and
probably most important was setting "Master" option to "False" in
audio.conf.

Regards
Niklas Claesson


2012/8/17 Niklas Claesson <[email protected]>:
> Hi,
>
> I would like to use a computer as an A2DP sink (bluetooth devices
> should be able to play through the computers speakers). So far I can
> manually connect from the computer using dbus signals with bluez/pulse
> (org.bluez.AudioSource). But what I really want is for the external
> device to connect to my service. The goal is to let anyone with
> bluetooth play music in our common space at the university.
>
> What would be the most straight forward way to implement this?
>
> Med vänliga hälsningar
> Niklas Claesson

2012-09-09 01:38:30

by Maxim Levitsky

[permalink] [raw]
Subject: Re: Setting up an A2DP server

On Tue, 2012-08-21 at 17:13 +0200, Niklas Claesson wrote:
> 2012/8/20 Lucas De Marchi <[email protected]>:
> > On Fri, Aug 17, 2012 at 6:50 PM, Niklas Claesson
> > <[email protected]> wrote:
> >> I've actually solved the issue myself by writing an Agent that accepts
> >
> > You could mark the device as trusted, so you don't have to do this.
>
> I don't know which devices will connect, perhaps I could mark all
> nearby devices as trusted. But I don't know how I would do that.
>
> >
> >
> >> all incoming requests, and another python script that polls 'pacmd
> >> list-sources' every 2 seconds for new bluetooth sources. And third and
> >
> > Why do you need this?
>
> I have to set the bluetooth device as current source in Pulseaudio

I am also affected by this exact issue.
I also want to make my system be a 'A2DP' headset.
I managed to do so, but only when I initiate the connection from the
system, and using awkward dbus command.
When however I try to connect to it from my tablet nothing happens.

Any pointers will be welcome.

Best regards,
Maxim Levitsky