Linux bluetooth development
 help / color / mirror / Atom feed
* BT_AMP_POLICY and RFCOMM
@ 2012-01-24  4:15 Greg Hazel
  2012-01-24  8:27 ` Andrei Emeltchenko
  0 siblings, 1 reply; 7+ messages in thread
From: Greg Hazel @ 2012-01-24  4:15 UTC (permalink / raw)
  To: linux-bluetooth

Hi,

I'm trying to set BT_AMP_POLICY on an RFCOMM socket to BT_AMP_POLICY_PREFER_AMP. In return I'm getting "Operation not supported on transport endpoint" (errno 95). Glancing at the code, it looks like RFCOMM sockets do not handle BT_AMP_POLICY, and the default policy for the underlying L2CAP socket is BT_AMP_POLICY_REQUIRE_BR_EDR. However, the L2CAP socket is L2CAP_MODE_ERTM, so my expectation is that it would work to use AMP.

So, why was BT_AMP_POLICY left out for RFCOMM sockets? Was it simply an oversight?

-Greg


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

* Re: BT_AMP_POLICY and RFCOMM
  2012-01-24  4:15 BT_AMP_POLICY and RFCOMM Greg Hazel
@ 2012-01-24  8:27 ` Andrei Emeltchenko
  2012-01-24  8:36   ` Greg Hazel
  0 siblings, 1 reply; 7+ messages in thread
From: Andrei Emeltchenko @ 2012-01-24  8:27 UTC (permalink / raw)
  To: Greg Hazel; +Cc: linux-bluetooth

On Mon, Jan 23, 2012 at 08:15:16PM -0800, Greg Hazel wrote:
> Hi,
> 
> I'm trying to set BT_AMP_POLICY on an RFCOMM socket to
> BT_AMP_POLICY_PREFER_AMP. In return I'm getting "Operation not supported

BTW: Why would you need to set this? Functionality is not supported yet so
nothing will change.

Best regards 
Andrei Emeltchenko 

> on transport endpoint" (errno 95). Glancing at the code, it looks like
> RFCOMM sockets do not handle BT_AMP_POLICY, and the default policy for
> the underlying L2CAP socket is BT_AMP_POLICY_REQUIRE_BR_EDR. However,
> the L2CAP socket is L2CAP_MODE_ERTM, so my expectation is that it would
> work to use AMP.
> 
> So, why was BT_AMP_POLICY left out for RFCOMM sockets? Was it simply an
> oversight?


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

* Re: BT_AMP_POLICY and RFCOMM
  2012-01-24  8:27 ` Andrei Emeltchenko
@ 2012-01-24  8:36   ` Greg Hazel
  2012-01-24  8:57     ` Andrei Emeltchenko
  0 siblings, 1 reply; 7+ messages in thread
From: Greg Hazel @ 2012-01-24  8:36 UTC (permalink / raw)
  To: Andrei Emeltchenko; +Cc: linux-bluetooth

On Jan 24, 2012, at 12:27 AM, Andrei Emeltchenko wrote:

> On Mon, Jan 23, 2012 at 08:15:16PM -0800, Greg Hazel wrote:
>> Hi,
>> 
>> I'm trying to set BT_AMP_POLICY on an RFCOMM socket to
>> BT_AMP_POLICY_PREFER_AMP. In return I'm getting "Operation not supported
> 
> BTW: Why would you need to set this? Functionality is not supported yet so
> nothing will change.

Oh, I had not made it far enough into bluez to notice it had not been implemented. My question still stands I suppose, but is obviously predicated on support being added eventually.

Out of curiosity, is there a bluetooth stack which does support AMP yet?

-Greg


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

* Re: BT_AMP_POLICY and RFCOMM
  2012-01-24  8:36   ` Greg Hazel
@ 2012-01-24  8:57     ` Andrei Emeltchenko
  2012-01-24  9:57       ` Greg Hazel
  0 siblings, 1 reply; 7+ messages in thread
From: Andrei Emeltchenko @ 2012-01-24  8:57 UTC (permalink / raw)
  To: Greg Hazel; +Cc: linux-bluetooth

Hi Greg,

On Tue, Jan 24, 2012 at 12:36:23AM -0800, Greg Hazel wrote:
> On Jan 24, 2012, at 12:27 AM, Andrei Emeltchenko wrote:
> 
> > On Mon, Jan 23, 2012 at 08:15:16PM -0800, Greg Hazel wrote:
> >> Hi,
> >> 
> >> I'm trying to set BT_AMP_POLICY on an RFCOMM socket to
> >> BT_AMP_POLICY_PREFER_AMP. In return I'm getting "Operation not supported
> > 
> > BTW: Why would you need to set this? Functionality is not supported yet so
> > nothing will change.
> 
> Oh, I had not made it far enough into bluez to notice it had not been implemented. My question still stands I suppose, but is obviously predicated on support being added eventually.
> 
> Out of curiosity, is there a bluetooth stack which does support AMP yet?

Look at git://codeaurora.org/kernel/msm.git

Best regards 
Andrei Emeltchenko 

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

* Re: BT_AMP_POLICY and RFCOMM
  2012-01-24  8:57     ` Andrei Emeltchenko
@ 2012-01-24  9:57       ` Greg Hazel
  2012-01-24 17:45         ` Peter Krystad
  0 siblings, 1 reply; 7+ messages in thread
From: Greg Hazel @ 2012-01-24  9:57 UTC (permalink / raw)
  To: Andrei Emeltchenko; +Cc: linux-bluetooth

On Jan 24, 2012, at 12:57 AM, Andrei Emeltchenko wrote:
> On Tue, Jan 24, 2012 at 12:36:23AM -0800, Greg Hazel wrote:
>> On Jan 24, 2012, at 12:27 AM, Andrei Emeltchenko wrote:
>>> On Mon, Jan 23, 2012 at 08:15:16PM -0800, Greg Hazel wrote:
>>>> Hi,
>>>> 
>>>> I'm trying to set BT_AMP_POLICY on an RFCOMM socket to
>>>> BT_AMP_POLICY_PREFER_AMP. In return I'm getting "Operation not supported
>>> 
>>> BTW: Why would you need to set this? Functionality is not supported yet so
>>> nothing will change.
>> 
>> Oh, I had not made it far enough into bluez to notice it had not been implemented. My question still stands I suppose, but is obviously predicated on support being added eventually.
>> 
>> Out of curiosity, is there a bluetooth stack which does support AMP yet?
> 
> Look at git://codeaurora.org/kernel/msm.git

Ah, it looks like android-msm (which I am using) tracks that to some extent. At least it contains this commit https://www.codeaurora.org/gitweb/quic/le/?p=kernel/msm.git;a=commit;h=5bf61204e8567df6be8583a258dba36343f87cb5 which seems to be an implementation, although I haven't tried it.

Is this the right mailing list to ask about the AMP bluetooth work contained in msm and android-msm?

-Greg


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

* RE: BT_AMP_POLICY and RFCOMM
  2012-01-24  9:57       ` Greg Hazel
@ 2012-01-24 17:45         ` Peter Krystad
  2012-01-24 20:59           ` ghazel
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Krystad @ 2012-01-24 17:45 UTC (permalink / raw)
  To: 'Greg Hazel', 'Andrei Emeltchenko'; +Cc: linux-bluetooth

Greg,

> -----Original Message-----
> From: linux-bluetooth-owner@vger.kernel.org [mailto:linux-bluetooth-owner@vger.kernel.org]
> On Behalf Of Greg Hazel
> Sent: Tuesday, January 24, 2012 1:57 AM
> To: Andrei Emeltchenko
> Cc: linux-bluetooth@vger.kernel.org
> Subject: Re: BT_AMP_POLICY and RFCOMM
> 
> On Jan 24, 2012, at 12:57 AM, Andrei Emeltchenko wrote:
> > On Tue, Jan 24, 2012 at 12:36:23AM -0800, Greg Hazel wrote:
> >> On Jan 24, 2012, at 12:27 AM, Andrei Emeltchenko wrote:
> >>> On Mon, Jan 23, 2012 at 08:15:16PM -0800, Greg Hazel wrote:
> >>>>
> >>>> I'm trying to set BT_AMP_POLICY on an RFCOMM socket to
> >>>> BT_AMP_POLICY_PREFER_AMP. In return I'm getting "Operation not supported
> >>>

> >>> BTW: Why would you need to set this? Functionality is not supported yet so
> >>> nothing will change.
> >>
> >> Oh, I had not made it far enough into bluez to notice it had not been implemented. My
> question still stands I suppose, but is obviously predicated on support being added
> eventually.

Since l2cap ertm is required for channels on AMP the rfcomm layer is unnecessary, it makes
more sense for obex profiles to be modified to use l2cap ertm sockets directly, which do/will
support AMP.

> Is this the right mailing list to ask about the AMP bluetooth work contained in msm and
> android-msm?

Probably not :)

E-mail me or post to https://www.codeaurora.org/forums/viewforum.php?f=4

Peter.

--Peter Krystad
  Employee of Qualcomm Innovation Center, Inc.
  Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum



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

* Re: BT_AMP_POLICY and RFCOMM
  2012-01-24 17:45         ` Peter Krystad
@ 2012-01-24 20:59           ` ghazel
  0 siblings, 0 replies; 7+ messages in thread
From: ghazel @ 2012-01-24 20:59 UTC (permalink / raw)
  To: Peter Krystad; +Cc: Andrei Emeltchenko, linux-bluetooth

On Tue, Jan 24, 2012 at 9:45 AM, Peter Krystad <pkrystad@codeaurora.org> wrote:
>> On Jan 24, 2012, at 12:57 AM, Andrei Emeltchenko wrote:
>> > On Tue, Jan 24, 2012 at 12:36:23AM -0800, Greg Hazel wrote:
>> >> On Jan 24, 2012, at 12:27 AM, Andrei Emeltchenko wrote:
>> >>> On Mon, Jan 23, 2012 at 08:15:16PM -0800, Greg Hazel wrote:
>> >>>>
>> >>>> I'm trying to set BT_AMP_POLICY on an RFCOMM socket to
>> >>>> BT_AMP_POLICY_PREFER_AMP. In return I'm getting "Operation not supported
>> >>>
>
>> >>> BTW: Why would you need to set this? Functionality is not supported yet so
>> >>> nothing will change.
>> >>
>> >> Oh, I had not made it far enough into bluez to notice it had not been implemented. My
>> question still stands I suppose, but is obviously predicated on support being added
>> eventually.
>
> Since l2cap ertm is required for channels on AMP the rfcomm layer is unnecessary, it makes
> more sense for obex profiles to be modified to use l2cap ertm sockets directly, which do/will
> support AMP.

I agree that rfcomm is no longer crucial in the presence of ertm.
However, there are existing applications which use rfcomm directly,
which could benefit from the AMP functionality with only a tiny
setsockopt modification, instead of switching to l2cap instead. Mine
is one such application.

-Greg

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

end of thread, other threads:[~2012-01-24 20:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-24  4:15 BT_AMP_POLICY and RFCOMM Greg Hazel
2012-01-24  8:27 ` Andrei Emeltchenko
2012-01-24  8:36   ` Greg Hazel
2012-01-24  8:57     ` Andrei Emeltchenko
2012-01-24  9:57       ` Greg Hazel
2012-01-24 17:45         ` Peter Krystad
2012-01-24 20:59           ` ghazel

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