Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp362439pxb; Thu, 12 Nov 2020 05:54:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJwi5ysl2zCz1VSzj2nsSrorVRq8/eJCBX86NveJ0zlQTR2QfaRSGOUUdnIzorqVh3BOc7iC X-Received: by 2002:a17:906:3852:: with SMTP id w18mr29462256ejc.551.1605189241464; Thu, 12 Nov 2020 05:54:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605189241; cv=none; d=google.com; s=arc-20160816; b=AaYrpyyRyNsBI5m8apqPl48k473W49BztKqkIpnJfRxcTgNamdf796mZNTbqYNW/Sh tfxT3JIYPgAKV8VEUUXqmHUAZzysu2OK0ZBZB57M9OGRFEdhivZ3Ezgpbf4SXZzScRNi iID0PmDCPiw5BJPy5O8d5IVXycCkwGrjzj51rYwRgDaXRnqUxdcChUlYYOFd3WwS3/+L fO2eGhSwlgqTVWUj75e3xpEG8ETmnYCUpL4qtrhlwQKM14PhyK/WBbO6nU6OSXKE7OVo nlV+PwWlVrfs4Jyr/6k4QFzUgsVwxp4HRpL5HII9SuVNoM8qU8dQmchlb4OaagAX0lb7 09gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=U9q+U2tc/r5mBx+RFfNYTOA/BBF4NcJCzTG+bLRcO/g=; b=g4dgpEt0bStGzDZExDAy1/JeBfp6pXMZ67gXo3vpBy5C7EzDAxVxV/ggFsTaWzPX0x 6DprW6thqje8hy5VhugIVo2ZW3EZMGaJYgN7KmsoiaYiaYsrThlH5PRc+AbuIvR3UBMZ jJky4AwNFlx5BI6u+SbX71Y3JS1pDS5GMEyt7z/idNSNhn9MhCLZ6DKP7ZPc8hQeFxqN PAja3Bss5YQN0fCSslelcI1u2FKbhXyN0sWhIPlMNJzl9910HCPu2OzR6Uexc7/dBdXm gD7AXSWRXVoBhn4EFc58mS+mIenwfVXpHoE9ohDIWsts53vTGT2SO02F+D5hcX7vyTcs U0CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tzS7cx48; 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 dr1si3707866ejc.373.2020.11.12.05.53.22; Thu, 12 Nov 2020 05:54:01 -0800 (PST) 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=tzS7cx48; 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 S1727796AbgKLNxQ (ORCPT + 99 others); Thu, 12 Nov 2020 08:53:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727264AbgKLNxP (ORCPT ); Thu, 12 Nov 2020 08:53:15 -0500 Received: from mail-oo1-xc30.google.com (mail-oo1-xc30.google.com [IPv6:2607:f8b0:4864:20::c30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10A22C0613D1 for ; Thu, 12 Nov 2020 05:53:14 -0800 (PST) Received: by mail-oo1-xc30.google.com with SMTP id f8so1324322oou.0 for ; Thu, 12 Nov 2020 05:53:14 -0800 (PST) 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=U9q+U2tc/r5mBx+RFfNYTOA/BBF4NcJCzTG+bLRcO/g=; b=tzS7cx48dntJpkVtQUrcCqlmK7oExgN/iFemqaMA8odAerDTvgq5v3m9WmTRNlmqRL Cqk0+blvf5lWieC00H/yiCDdUG/hDNX42MaC/MrptM6fUPe/DwH0eEeIs8nLJVX/crSi cUezoTiTAeIdbf48AWgsiXHn65dlI3qxqdx71vlAiGCQR3RujHxZ1oOT6DxMCFEqerGN GkPkPMM5bTpiIRU1dJQYAueUW1B0hmmzO4JposgiqxT1IX4q0HWxGAFuMgyiB32D+lrv Th6CymgdsRJc+go4A7Iug/nFGZS8+gKujuVMjH/bagexgkb8t7zcDchD3TdNA33TO1sy yHwQ== 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=U9q+U2tc/r5mBx+RFfNYTOA/BBF4NcJCzTG+bLRcO/g=; b=edf8gCA3llmjDwcseR4DErNiQzcLb6S9DTgEHOaOJsvEk9XRoEMgOr11s8vDzJYC4a 4+FgxtBv/nvhEbnhX+VLMwqxQF56F6AOuZdrDMlOr5Q1quF4X1gBdauPyvsYBg7IB3Ji WGz+OCC+3IBPAQWOjOJ2Ei6aCWPYHlXvN3NO8B0Chwf3WwRSXEulDK7/7PqoLvwb9TdW ZDJVjtgVcDtD35si+ZZShN0cT4wd8+G0zakfAz9UlrAoJddZMdZxAasFR7/H99wnBHjO FeU4x6ibUlBVhDYErGKV5nGsVDtHCVdgxPWH4zx2MOwMJbcbKOHQtdPyV9gT6h129Uew mgBw== X-Gm-Message-State: AOAM533cOHj7KdvL91foQb282tckUkxdBQLxDuM30RGhhoe2WDJ0UrkV iGzSXUsrAkwe2a8UepywZdnlIwor/a/yyHjWe8TNoWbDch8= X-Received: by 2002:a4a:694a:: with SMTP id v10mr1003382oof.46.1605189193439; Thu, 12 Nov 2020 05:53:13 -0800 (PST) MIME-Version: 1.0 References: <20201112121614.c5kko4iofg32ckxs@orac> In-Reply-To: <20201112121614.c5kko4iofg32ckxs@orac> From: Emil Lenngren Date: Thu, 12 Nov 2020 14:53:05 +0100 Message-ID: Subject: Re: LE Advertising: Command Disallowed To: Devin Bayer Cc: Luiz Augusto von Dentz , "Michael N. Moran" , "linux-bluetooth@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Devin, Den tors 12 nov. 2020 kl 13:16 skrev Devin Bayer : > > On Wed, Nov 11, 2020 at 11:00:32PM +0000, Emil Lenngren wrote: > > > > It would be good to see the complete log from when the "Reset" command > > is issued, otherwise we don't know in which "state" the controller is > > in at the various commands. Also widen the command window when running > > btmon so we see the complete names. :) > > Seeing the result from "LE Read Supported States" would also be nice. > > > > Hi Emil, > > below is the complete log, starting with the the reset command. It > includes the "Supported States" call too. Let me know if there is > anything else I can do. > > ~ Devin > It's as Luiz said, you're mixing two different stacks and hence mixing legacy advertising commands with extended ones. The HCI standard says: "If, since the last power-on or reset, the Host has ever issued a legacy advertising command and then issues an extended advertising command, or has ever issued an extended advertising command and then issues a legacy advertising command, the Controller shall return the error code Command Disallowed (0x0C)." After Reset, you can see "LE Set Extended Advertising Parameters" during the `hciconfig` runs. Then later, when `python` runs, a "LE Set Advertise Enable" is sent. This is disallowed behaviour. One solution is that your python program sends a "Reset" command as the first thing, otherwise you don't know which state the controller is in. The other solution is to use BlueZ only. /Emil