Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1157344ybj; Thu, 7 May 2020 16:28:28 -0700 (PDT) X-Google-Smtp-Source: APiQypJLkuEMOAx+p6LQmM89lqA6b2GuftvuCzDTBiXXjRwx2ZVEiJ0JccMyQ1ee91hoVpfNXYm/ X-Received: by 2002:aa7:d78a:: with SMTP id s10mr14916418edq.319.1588894108107; Thu, 07 May 2020 16:28:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588894108; cv=none; d=google.com; s=arc-20160816; b=iX+0LOQnlxdJ3iDdtf/OFCjRT/Tq3xz9FB9BkTqEBZOlLPf11D/cghy0tTO+lIdA/G CB2PSEgSBuvc/1zdpiGbDNUtvyW0S2oeW0P8EMJPPfPngDSd9+y7DVuxCiseWO1Sg56T JpGbhnMy8HwgoabnERYk5DPFTYzqlJuNPBekyRcXluzwvDfOSaWuJ7KA0rTLb27ho3R7 dutVoFvJuS0LugXlPpZlZ2jMuy3q9pYpfDkvGkPbOdD+xvm85xZsdUUR6MYj/pCx4KUp NzV6uTF1GQbLaJlAK/uO6VO3IF6+/raCqhJkPi9O4yGW+XF1C+YP6btrO71u5CoMN9w+ GeAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=NzkqP53pZyPXuomW2aY73h25BilrON1kKaNP3r+4C3I=; b=r4LWCmt0TCYSI71ZCXnsowPCqwDLiogV2/tN1nzpdDx2dNvyE0NwYFNonkcFTxTNGl TgsYNu2S2VkzCCKmcf0dBZUmY3cafBmjJbtoFpQ/WrzIUz2/BE3bXjCx0GtOB9ECOm1E 4cnYv9uHPqke0rJLlMJRhfQj1DHDi1XvAVSnj+4z0/ESEWymwu83MdHgZwRNQ/MGgG65 Ux4PIVTx+jgMMbkipIH1rCfmlw9iAe9UmRxMNEg6aP/NMYCYAwwrUUYuFKiSaWoLamSs /o2xAGfJbDwqu75jDuJlrcD0g9lYj4WZ/WLv2USTEg6bFAZ8N7jQbolceHxL7wc/ngYo 0PTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uwOCpdZL; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cy5si3866991edb.327.2020.05.07.16.27.45; Thu, 07 May 2020 16:28:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uwOCpdZL; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726476AbgEGX1k (ORCPT + 99 others); Thu, 7 May 2020 19:27:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726445AbgEGX1j (ORCPT ); Thu, 7 May 2020 19:27:39 -0400 Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7ACAAC05BD43 for ; Thu, 7 May 2020 16:27:39 -0700 (PDT) Received: by mail-oi1-x22c.google.com with SMTP id c124so6602614oib.13 for ; Thu, 07 May 2020 16:27:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NzkqP53pZyPXuomW2aY73h25BilrON1kKaNP3r+4C3I=; b=uwOCpdZLAgLQ7D6nO3i2+R/xKUI+jgvwyJxfttkKxex+gSg0LaFdZdiIdRVDD95NJQ g8W5H/HImZRG386+MRQKZHUZa0zKmPEK0H+XiXGl3bs9H5JCMRWK/UeMLEDc21kz6gBW /OFJRh5CAPs0FRWFCcztoFVbNUbyKWor82GDiBY2iXaimqL7nxcNlmcFtadjUA++OGMf CpNGsjusSV5D63lj2mvySQvSmFBl7jxi1mNOO2t8OP6gv8yWSRe4Ni35tJ7svxRetEDM 835pTsyUKWS5ye024/LPPt1nAfWWtlTLlkJRDnZLh04M/qkdhbx/P+dsRCRe6SbRXDt/ w9Ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NzkqP53pZyPXuomW2aY73h25BilrON1kKaNP3r+4C3I=; b=tTiKlnjeNe3somUyfIhogcROcsCvt03mD8+RI+MvNHjBMw6yRX+s/J/ZEwVE6axb2n +v2EcYRY+pC1dvnSC5AtsxojLPpkorUBr2fyk5NqM21/nw7EZLLKz789rQMY5yAnAu0+ 3gv/ENUTx9zTrpikANkKJPvSiIqnUvat9S9/Mp5XTsY0ZoCtjodYzwpNyYZk/q0ZTuP6 60hi0Lvk+tGcQAmj1FZEDJuiyRaVnbhazxuAE60yGf0yFyk6dvzMn3AQFQXVC1coJj5+ 868dIFzW9vqJhEmo5457JUL2PddIsm56+m0BlpXtuXfwYnRe+mwxqq3chw0MGuZn1wT3 yhqw== X-Gm-Message-State: AGi0PuZTKJ2EzZ7BHC1zrkh/reFN4UwEXykL/FixX1vXcTOsq3neiAuV R/egKWjFVBQeUQj8DM8fdY8Odw4ktFtF5o/459sKlhxVMJY= X-Received: by 2002:aca:af4a:: with SMTP id y71mr8045432oie.101.1588894058644; Thu, 07 May 2020 16:27:38 -0700 (PDT) MIME-Version: 1.0 References: <7c4e6f59-d2ef-36c0-46df-0195fad40e7e@gmail.com> <76911d0f-dd24-5536-586a-a8e9bc7ad786@gmail.com> In-Reply-To: From: Andrey Semashev Date: Fri, 8 May 2020 02:27:26 +0300 Message-ID: Subject: Re: avrcp: Cannot connect Sennheiser Momentum True Wireless 2 To: Luiz Augusto von Dentz Cc: "linux-bluetooth@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org On Thu, May 7, 2020 at 11:58 PM Luiz Augusto von Dentz wrote: > > Hi Andrey, > > On Thu, May 7, 2020 at 1:29 PM Luiz Augusto von Dentz > wrote: > > > > Hi Andrey, > > > > On Wed, May 6, 2020 at 10:32 AM Andrey Semashev > > wrote: > > > > > > On 2020-05-06 19:56, Andrey Semashev wrote: > > > > Hello! > > > > > > > > I have a problem connecting Sennheiser Momentum True Wireless 2 > > > > headphones over Bluetooth. The headphones say "Connected" and then > > > > reboot immediately after. After reboot the headphones say "Power on" and > > > > try connecting again, and fail the same way, and so on. > > > > > > > > From the Bluetooth packet dump it looks like the problem happens after > > > > bluetoothd sends AVRCP ListPlayerApplicationSettingAttributes message to > > > > the headphones. The headphones send Not Implemented response and then > > > > reboot. Both in the request and the response Wireshark shows warnings > > > > about encoding issues. > > > > > > > > I'm attaching a packet dump captured from one of the connection > > > > attempts. The ListPlayerApplicationSettingAttributes message is in > > > > packet 262 and the response is in packet 264. > > > > > > > > This is on Kubuntu 20.04. I tried bluez 5.53 from Kubuntu and revision > > > > 3146b7a0785758be2d4e894d44e99d29c0db983e from git master - the behavior > > > > is the same. > > > > > > > > I've also verified that the headphones do work on Windows 10. On that > > > > system, ListPlayerApplicationSettingAttributes is not present in the > > > > packet exchange. I can provide the packet dump from Windows, if needed. > > > > > > > > I hope this is the right place to report problems like this one. If not > > > > - sorry, and please point me to the right place. > > > > > > > > Thank you. > > > > > > I'll add that I can connect the headphones if I disable AVRCP by adding > > > --noplugin=avrcp to bluetoothd command line. > > > > Weird the ListPlayerApplicationSettingAttributes should only really be > > used when the remote device claims to be have target role but I doubt > > the headsets would be implementing that so perhaps we are not > > detecting this properly, do you have the HCI traces in btsnoop format? > > You can collect that with use of btmon. > > Looks like the device is setting the bit for Category 1: > Player/Recorder which is why we are sending player related command, > other stacks might not do that because they are not dual-role, cannot > act as controllers, even if Player Application Settings is optional > for category 1 it still means that we could perhaps list them. It > looks like we are not parsing properly the ctype since it appears that > it returns AVC_CTYPE_NOT_IMPLEMENTED instead of AVC_CTYPE_REJECTED, is > that perhaps causing a crash on bluetoothd? It's not the bluetoothd what crashes, it's the headset. My understanding is that the headset doesn't support ListPlayerApplicationSettingAttributes and does a poor job of handling it. So after sending the (malformed) AVC_CTYPE_NOT_IMPLEMENTED response it reboots. If bluetoothd doesn't expect AVC_CTYPE_NOT_IMPLEMENTED, I suppose, it should be updated to handle it. But I don't think it is going to fix the problem of the headset rebooting. I think the fix should be to somehow avoid sending ListPlayerApplicationSettingAttributes. Or maybe encode it differently (e.g. by adding some parameters, if there are any required by the spec.) Also, since I never got beyond ListPlayerApplicationSettingAttributes, there may be more issues down the road. I'm willing to test any patches. Also, I filed a support request to Sennheiser regarding this issue. No reply so far, and I don't have much hope for them solving it, but still.