2009-01-28 05:16:10

by sreevani medhahal

[permalink] [raw]
Subject: Disconnect eSCO link from Command line

Hi,
After the headset has created the eSCO link. The Profile Tuning
Suite asks for Closing the Audio Connection from AG. Is there any
command line utiility to disable the eSCO link & not the service level
connection(ACL).[The eSCO link is visible on giving hcitool con ]
Regards,
Sreevani


2009-01-30 12:18:01

by sreevani medhahal

[permalink] [raw]
Subject: Re: Disconnect eSCO link from Command line

hi ,
> thanks for the kind update
>> On Wed, Jan 28, 2009, sreevani medhahal wrote:
>>> > On Wed, Jan 28, 2009, sreevani medhahal wrote:
>>> >> After the headset has created the eSCO link. The Profile Tuning
>>> >> Suite asks for Closing the Audio Connection from AG. Is there any
>>> >> command line utiility to disable the eSCO link & not the service level
>>> >> connection(ACL).[The eSCO link is visible on giving hcitool con ]
>>> >
>>> > You can do that by calling the Stop D-Bus method call on the
>>> > org.bluez.Headset interface of the corresponding device object. You can
>>> > e.g. use the test/test-telephony python script for this:
>>> > ./test-telephony stop <remote address>
>>> >
>>> The above method does not close the eSCO link ,because the
>>> sco_connect_cb has reported connection timed out. but the hcitool con
>>> still lists the eSCO link.
>>> I have another query bluez4.2x is compatible with which linux kernel
>>> version. does it have any strict requirement that it works best only
>>> if the kernel version is >= 2.6.27 .
>>
>> You might want to try Marcel's bluetooth-testing tree. I think that
>> issue might be fixed by the following patch:
>> http://git.kernel.org/?p=linux/kernel/git/holtmann/bluetooth-testing.git;a=commitdiff;h=d7461bfbd48bb76a1126a4f05bb16e4bb0187d31
>
> i cannot use the above git tree as i am on ubuntu hardy with kernel
> 2.6.24-19. Is there a repository of bluetooth kernel patches for
> version 2.6.24 . So that i can if any higher versions work for me...I
> am not allowed to use higher kernel versions due to other driver
> dependancy in 2.6.24.

one hack in the net/bluetooth/sco.c by disabling esco on AG ,passes
the PTS tests & the sco_connect does not report connection timed out ,
& now i can use the test-telephony stop to close the sco connection to
the headset.

thanks & regards,
Sreevani

2009-01-30 09:57:45

by sreevani medhahal

[permalink] [raw]
Subject: Re: Disconnect eSCO link from Command line

Hi Johan,

thanks for the kind update
> On Wed, Jan 28, 2009, sreevani medhahal wrote:
>> > On Wed, Jan 28, 2009, sreevani medhahal wrote:
>> >> After the headset has created the eSCO link. The Profile Tuning
>> >> Suite asks for Closing the Audio Connection from AG. Is there any
>> >> command line utiility to disable the eSCO link & not the service level
>> >> connection(ACL).[The eSCO link is visible on giving hcitool con ]
>> >
>> > You can do that by calling the Stop D-Bus method call on the
>> > org.bluez.Headset interface of the corresponding device object. You can
>> > e.g. use the test/test-telephony python script for this:
>> > ./test-telephony stop <remote address>
>> >
>> The above method does not close the eSCO link ,because the
>> sco_connect_cb has reported connection timed out. but the hcitool con
>> still lists the eSCO link.
>> I have another query bluez4.2x is compatible with which linux kernel
>> version. does it have any strict requirement that it works best only
>> if the kernel version is >= 2.6.27 .
>
> You might want to try Marcel's bluetooth-testing tree. I think that
> issue might be fixed by the following patch:
> http://git.kernel.org/?p=linux/kernel/git/holtmann/bluetooth-testing.git;a=commitdiff;h=d7461bfbd48bb76a1126a4f05bb16e4bb0187d31

i cannot use the above git tree as i am on ubuntu hardy with kernel
2.6.24-19. Is there a repository of bluetooth kernel patches for
version 2.6.24 . So that i can if any higher versions work for me...I
am not allowed to use higher kernel versions due to other driver
dependancy in 2.6.24.
thanks & Regards,
Sreevani M

2009-01-28 11:25:04

by Johan Hedberg

[permalink] [raw]
Subject: Re: Disconnect eSCO link from Command line

On Wed, Jan 28, 2009, sreevani medhahal wrote:
> > On Wed, Jan 28, 2009, sreevani medhahal wrote:
> >> After the headset has created the eSCO link. The Profile Tuning
> >> Suite asks for Closing the Audio Connection from AG. Is there any
> >> command line utiility to disable the eSCO link & not the service level
> >> connection(ACL).[The eSCO link is visible on giving hcitool con ]
> >
> > You can do that by calling the Stop D-Bus method call on the
> > org.bluez.Headset interface of the corresponding device object. You can
> > e.g. use the test/test-telephony python script for this:
> > ./test-telephony stop <remote address>
> >
> The above method does not close the eSCO link ,because the
> sco_connect_cb has reported connection timed out. but the hcitool con
> still lists the eSCO link.
> I have another query bluez4.2x is compatible with which linux kernel
> version. does it have any strict requirement that it works best only
> if the kernel version is >= 2.6.27 .

You might want to try Marcel's bluetooth-testing tree. I think that
issue might be fixed by the following patch:
http://git.kernel.org/?p=linux/kernel/git/holtmann/bluetooth-testing.git;a=commitdiff;h=d7461bfbd48bb76a1126a4f05bb16e4bb0187d31

Johan


2009-01-28 09:57:47

by Marcel Holtmann

[permalink] [raw]
Subject: Re: Disconnect eSCO link from Command line

Hi Sreevani,

> >> After the headset has created the eSCO link. The Profile Tuning
> >> Suite asks for Closing the Audio Connection from AG. Is there any
> >> command line utiility to disable the eSCO link & not the service level
> >> connection(ACL).[The eSCO link is visible on giving hcitool con ]
> >
> > not that I know of except hcitool cmd ;)
> >
> I tried modifying hcitool.c function cmd_dc by changing type of link
> to ESCO_LINK(instead of ACL_LINK). i got the error as disconnect
> failed operation not permitted.
> > You should also not be sheeting with sending a HCI command when it comes
> > to PTS tests. You program has to be able to disconnect eSCO by itself.
> >
> BlueZ is getting sco_connect result as Connection timed out. but where
> as when i list the connections using hcitool con, i see that there is
> a eSCO link.

you might wanna try bluetooth-testing.git since the SCO/eSCO connection
reject patch might do exactly what you expect here.

Regards

Marcel



2009-01-28 09:42:17

by sreevani medhahal

[permalink] [raw]
Subject: Re: Disconnect eSCO link from Command line

Hi Johan,
On Wed, Jan 28, 2009 at 1:53 PM, Johan Hedberg <[email protected]> wrote:
> Hi,
>
> On Wed, Jan 28, 2009, sreevani medhahal wrote:
>> After the headset has created the eSCO link. The Profile Tuning
>> Suite asks for Closing the Audio Connection from AG. Is there any
>> command line utiility to disable the eSCO link & not the service level
>> connection(ACL).[The eSCO link is visible on giving hcitool con ]
>
> You can do that by calling the Stop D-Bus method call on the
> org.bluez.Headset interface of the corresponding device object. You can
> e.g. use the test/test-telephony python script for this:
> ./test-telephony stop <remote address>
>
The above method does not close the eSCO link ,because the
sco_connect_cb has reported connection timed out. but the hcitool con
still lists the eSCO link.
I have another query bluez4.2x is compatible with which linux kernel
version. does it have any strict requirement that it works best only
if the kernel version is >= 2.6.27 .
Regards,
Sreevani M

2009-01-28 09:37:08

by sreevani medhahal

[permalink] [raw]
Subject: Re: Disconnect eSCO link from Command line

hi Marcel,
On Wed, Jan 28, 2009 at 11:09 AM, Marcel Holtmann <[email protected]> wrote:
> Hi Sreevani,
>
>> After the headset has created the eSCO link. The Profile Tuning
>> Suite asks for Closing the Audio Connection from AG. Is there any
>> command line utiility to disable the eSCO link & not the service level
>> connection(ACL).[The eSCO link is visible on giving hcitool con ]
>
> not that I know of except hcitool cmd ;)
>
I tried modifying hcitool.c function cmd_dc by changing type of link
to ESCO_LINK(instead of ACL_LINK). i got the error as disconnect
failed operation not permitted.
> You should also not be sheeting with sending a HCI command when it comes
> to PTS tests. You program has to be able to disconnect eSCO by itself.
>
BlueZ is getting sco_connect result as Connection timed out. but where
as when i list the connections using hcitool con, i see that there is
a eSCO link.
Regards,
Sreevani M

2009-01-28 08:23:23

by Johan Hedberg

[permalink] [raw]
Subject: Re: Disconnect eSCO link from Command line

Hi,

On Wed, Jan 28, 2009, sreevani medhahal wrote:
> After the headset has created the eSCO link. The Profile Tuning
> Suite asks for Closing the Audio Connection from AG. Is there any
> command line utiility to disable the eSCO link & not the service level
> connection(ACL).[The eSCO link is visible on giving hcitool con ]

You can do that by calling the Stop D-Bus method call on the
org.bluez.Headset interface of the corresponding device object. You can
e.g. use the test/test-telephony python script for this:
./test-telephony stop <remote address>

Johan

2009-01-28 05:39:53

by Marcel Holtmann

[permalink] [raw]
Subject: Re: Disconnect eSCO link from Command line

Hi Sreevani,

> After the headset has created the eSCO link. The Profile Tuning
> Suite asks for Closing the Audio Connection from AG. Is there any
> command line utiility to disable the eSCO link & not the service level
> connection(ACL).[The eSCO link is visible on giving hcitool con ]

not that I know of except hcitool cmd ;)

You should also not be sheeting with sending a HCI command when it comes
to PTS tests. You program has to be able to disconnect eSCO by itself.

Regards

Marcel



2009-02-03 06:04:21

by sreevani medhahal

[permalink] [raw]
Subject: Re: Disconnect eSCO link from Command line

Hi Marcel,
>> >> > On Wed, Jan 28, 2009, sreevani medhahal wrote:
>> >> >> After the headset has created the eSCO link. The Profile Tuning
>> >> >> Suite asks for Closing the Audio Connection from AG. Is there any
>> >> >> command line utiility to disable the eSCO link & not the service level
>> >> >> connection(ACL).[The eSCO link is visible on giving hcitool con ]
>> >> >
>> >> > You can do that by calling the Stop D-Bus method call on the
>> >> > org.bluez.Headset interface of the corresponding device object. You can
>> >> > e.g. use the test/test-telephony python script for this:
>> >> > ./test-telephony stop <remote address>
>> >> >
>> >> The above method does not close the eSCO link ,because the
>> >> sco_connect_cb has reported connection timed out. but the hcitool con
>> >> still lists the eSCO link.
>> >> I have another query bluez4.2x is compatible with which linux kernel
>> >> version. does it have any strict requirement that it works best only
>> >> if the kernel version is >= 2.6.27 .
>> >
>> > You might want to try Marcel's bluetooth-testing tree. I think that
>> > issue might be fixed by the following patch:
>> > http://git.kernel.org/?p=linux/kernel/git/holtmann/bluetooth-testing.git;a=commitdiff;h=d7461bfbd48bb76a1126a4f05bb16e4bb0187d31
>>
>> i cannot use the above git tree as i am on ubuntu hardy with kernel
>> 2.6.24-19. Is there a repository of bluetooth kernel patches for
>> version 2.6.24 . So that i can if any higher versions work for me...I
>> am not allowed to use higher kernel versions due to other driver
>> dependancy in 2.6.24.
>
> if you wanna stick with an old kernel, then that is your choice and then
> you have to do the work of backporting. Nobody here is going to do it
> for you.
>
I have found a patch in one of the mailing list which helped to pass
the PTS tests & also works with SCO as well as eSCO headsets. below is
the patch for 2.6.24 (when the AG supports eSCO & the headset doesnt
support eSCO).
diff -uNr /linux-2.6.24/net/bluetooth/hci_event.c
linux-2.6.24/net/bluetooth/hci_event.c
--- /linux-2.6.24/net/bluetooth/hci_event.c 2008-01-25 04:28:37.000000000 +0530
+++ linux-2.6.24/net/bluetooth/hci_event.c 2009-02-02 17:44:38.000000000 +0530
@@ -1314,7 +1314,13 @@

conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdaddr);
if (!conn)
- goto unlock;
+ {
+ __u8 link_type = (ev->link_type == ESCO_LINK) ? SCO_LINK : ESCO_LINK;
+ conn = hci_conn_hash_lookup_ba(hdev, link_type, &ev->bdaddr);
+ if(!conn)
+ goto unlock;
+ conn->type = ev->link_type;
+ }

if (!ev->status) {
conn->handle = __le16_to_cpu(ev->handle);
Thanks & Regards,
Sreevani M

2009-02-01 16:57:46

by Marcel Holtmann

[permalink] [raw]
Subject: Re: Disconnect eSCO link from Command line

Hi Sreevani,

> >>> >> After the headset has created the eSCO link. The Profile Tuning
> >>> >> Suite asks for Closing the Audio Connection from AG. Is there any
> >>> >> command line utiility to disable the eSCO link & not the service level
> >>> >> connection(ACL).[The eSCO link is visible on giving hcitool con ]
> >>> >
> >>> > You can do that by calling the Stop D-Bus method call on the
> >>> > org.bluez.Headset interface of the corresponding device object. You can
> >>> > e.g. use the test/test-telephony python script for this:
> >>> > ./test-telephony stop <remote address>
> >>> >
> >>> The above method does not close the eSCO link ,because the
> >>> sco_connect_cb has reported connection timed out. but the hcitool con
> >>> still lists the eSCO link.
> >>> I have another query bluez4.2x is compatible with which linux kernel
> >>> version. does it have any strict requirement that it works best only
> >>> if the kernel version is >= 2.6.27 .
> >>
> >> You might want to try Marcel's bluetooth-testing tree. I think that
> >> issue might be fixed by the following patch:
> >> http://git.kernel.org/?p=linux/kernel/git/holtmann/bluetooth-testing.git;a=commitdiff;h=d7461bfbd48bb76a1126a4f05bb16e4bb0187d31
> >
> > i cannot use the above git tree as i am on ubuntu hardy with kernel
> > 2.6.24-19. Is there a repository of bluetooth kernel patches for
> > version 2.6.24 . So that i can if any higher versions work for me...I
> > am not allowed to use higher kernel versions due to other driver
> > dependancy in 2.6.24.
>
> one hack in the net/bluetooth/sco.c by disabling esco on AG ,passes
> the PTS tests & the sco_connect does not report connection timed out ,
> & now i can use the test-telephony stop to close the sco connection to
> the headset.

or you could just upgrade the kernel. We did fix the eSCO issues now and
tests with PTS confirmed that.

Regards

Marcel



2009-02-01 16:56:36

by Marcel Holtmann

[permalink] [raw]
Subject: Re: Disconnect eSCO link from Command line

Hi Sreevani,

> >> > On Wed, Jan 28, 2009, sreevani medhahal wrote:
> >> >> After the headset has created the eSCO link. The Profile Tuning
> >> >> Suite asks for Closing the Audio Connection from AG. Is there any
> >> >> command line utiility to disable the eSCO link & not the service level
> >> >> connection(ACL).[The eSCO link is visible on giving hcitool con ]
> >> >
> >> > You can do that by calling the Stop D-Bus method call on the
> >> > org.bluez.Headset interface of the corresponding device object. You can
> >> > e.g. use the test/test-telephony python script for this:
> >> > ./test-telephony stop <remote address>
> >> >
> >> The above method does not close the eSCO link ,because the
> >> sco_connect_cb has reported connection timed out. but the hcitool con
> >> still lists the eSCO link.
> >> I have another query bluez4.2x is compatible with which linux kernel
> >> version. does it have any strict requirement that it works best only
> >> if the kernel version is >= 2.6.27 .
> >
> > You might want to try Marcel's bluetooth-testing tree. I think that
> > issue might be fixed by the following patch:
> > http://git.kernel.org/?p=linux/kernel/git/holtmann/bluetooth-testing.git;a=commitdiff;h=d7461bfbd48bb76a1126a4f05bb16e4bb0187d31
>
> i cannot use the above git tree as i am on ubuntu hardy with kernel
> 2.6.24-19. Is there a repository of bluetooth kernel patches for
> version 2.6.24 . So that i can if any higher versions work for me...I
> am not allowed to use higher kernel versions due to other driver
> dependancy in 2.6.24.

if you wanna stick with an old kernel, then that is your choice and then
you have to do the work of backporting. Nobody here is going to do it
for you.

Regards

Marcel