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
On Tue, Jan 24, 2012 at 9:45 AM, Peter Krystad <[email protected]> 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
Greg,
> -----Original Message-----
> From: [email protected] [mailto:[email protected]]
> On Behalf Of Greg Hazel
> Sent: Tuesday, January 24, 2012 1:57 AM
> To: Andrei Emeltchenko
> Cc: [email protected]
> 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
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
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
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
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?