Skip to contentSkip to conversation

SCO control in HansfreeGateway

DISCUSSION Mikel Astiz 2 participants 2 messages Sep 23, 2011 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Hi all,

Some recent patches have made that the State property in HandsfreeGateway exposes if the SCO connection is active or not. As far as I understand, the state Playing is specifically added for this reason.

However, I don't see any way in the D-Bus API to control the state of this connection. One example would be that a phone would drop the audio connection (it is allowed to do so at any time) but the user wants this connection to be re-established.

Wouldn't this require the addition of some methods like ConnectAudio and DisconnectAudio in the HandsfreeGateway interface?

Regards,
Mikel

#1 lore raw

Hi Mikel,

Quoted 10 lines · Mikel Astiz

Hi all,

Some recent patches have made that the State property in HandsfreeGateway exposes if the SCO connection is active or not. As far as I understand, the state Playing is specifically added for this reason.

However, I don't see any way in the D-Bus API to control the state of this connection. One example would be that a phone would drop the audio connection (it is allowed to do so at any time) but the user wants this connection to be re-established.

If you want to control the connection then you need to use the unix socket or register a endpoint with org.bluez.Media.RegisterEndpoint (recommended), for the latter you need this is your audio.conf

Enable=Media
Disable=Socket

There is some documentation about it in doc/media-api.txt and a test script test/simple-endpoint

Quoted 2 lines

Wouldn't this require the addition of some methods like ConnectAudio and DisconnectAudio in the HandsfreeGateway interface?

Nope, this was why we also deprecated Headset.Play/Stop, it is not up to the application to decide when to connect but to the endpoints e.g. if you are using PulseAudio make use of set_profile.

Signature · 1 line
Luiz Augusto von Dentz