2007-12-06 11:27:57

by Frédéric Dalleau

[permalink] [raw]
Subject: [Bluez-devel] [Patch] org.bluez.audio.headset.Connect() to handsfree

Hello,

As of today, when calling org.bluez.audio.headset.Connect(), the hfp
profile is searched only if the headset->hfp_handle is initialized.
This member variable is initialized upon CreateDevice the first time the
device is created (during resolve_services).
The variable is not initialized when the audio service is restarted, so
after restarting audio service, it is no longer possible to connect to hfp.

The attached patch fix the problem as follow : first search the hfp
profile handle, then search an hsp profile handle, by getting rfcomm
channel to connect to.

It is based against latest git tree.

Frederic.


-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel


2007-12-06 15:16:01

by Frédéric Dalleau

[permalink] [raw]
Subject: Re: [Bluez-devel] [Patch] org.bluez.audio.headset.Connect() to handsfree

Right!

Here is an updated patch. It adds a parameter to headset_init() to know
whether hfp is enabled or not.

Let me know what you think,
Regards,

Frederic


Marcel Holtmann wrote:
> Hi Frederic,
>
>
>> As of today, when calling org.bluez.audio.headset.Connect(), the hfp
>> profile is searched only if the headset->hfp_handle is initialized.
>> This member variable is initialized upon CreateDevice the first time the
>> device is created (during resolve_services).
>> The variable is not initialized when the audio service is restarted, so
>> after restarting audio service, it is no longer possible to connect to hfp.
>>
>
> we had to disable HFP with a config setting since we are not fully
> supporting it at the moment. So this must depend on the config setting
> if we search for HFP and if we consider it for the connect. By default
> we only support HSP.
>
> Regards
>
> Marcel
>
>
>
>
> -------------------------------------------------------------------------
> SF.Net email is sponsored by: The Future of Linux Business White Paper
> from Novell. From the desktop to the data center, Linux is going
> mainstream. Let it simplify your IT future.
> http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
> _______________________________________________
> Bluez-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-devel
>


Attachments:
handsfreeconnect.patch (5.27 kB)
(No filename) (309.00 B)
(No filename) (164.00 B)
Download all attachments

2007-12-06 11:40:26

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] [Patch] org.bluez.audio.headset.Connect() to handsfree

Hi Frederic,

> As of today, when calling org.bluez.audio.headset.Connect(), the hfp
> profile is searched only if the headset->hfp_handle is initialized.
> This member variable is initialized upon CreateDevice the first time the
> device is created (during resolve_services).
> The variable is not initialized when the audio service is restarted, so
> after restarting audio service, it is no longer possible to connect to hfp.

we had to disable HFP with a config setting since we are not fully
supporting it at the moment. So this must depend on the config setting
if we search for HFP and if we consider it for the connect. By default
we only support HSP.

Regards

Marcel




-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel