Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4715758imw; Tue, 12 Jul 2022 12:56:26 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uDyNMwSLVFez1LpgdTUSB5A60h0AsVs+GjNhARgLAbFQTdAOH1LG3A8TBZ5bl50AwBnL1m X-Received: by 2002:a05:6402:26d6:b0:43a:daa5:9f12 with SMTP id x22-20020a05640226d600b0043adaa59f12mr14151271edd.408.1657655786252; Tue, 12 Jul 2022 12:56:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657655786; cv=none; d=google.com; s=arc-20160816; b=sAnDtVbwdw9xHf0b22RILcYxejtAZfsuwYwKp8BXkvILwf1DNH0L31s2RmQjrC66Vr XznJ35vkrX1mj2oqpHLaEYEHNFKdRuOu9uvyW4WvaooDv0zEYvq7MTDvLXRIkC+ldiYf 4zavj1LbquQE348FpBjOVy1NYhIAC8LZRwPMvz+3PHC1UyaaQN27vRv1th7mB0UadveY B3omagrR348pH5/ob5qI/c3ZFiOv1tNp0/UIDAQ8CigndXMh0NI049sfE7N0AewXagz7 fDQBGA/UTmFTRl2fLKM75p6AEqtAX1QytgadW1reAuCaBc/75/hmpR9N91gzMFCuh/uA jvag== 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=yROFK4jI4+6AV7RIHB+FYCReHAB+j1nghwp6t7Uhvus=; b=oNGUd4eausMSjpITA1wKsoOjie79lbyfBEtAdACw+kzCCwBljBcOQHI0onfAcKiYfO 4yZ+4NmUEFwEIAba/nEvNQ6AA8GhJ7C5BXW2K71dzIOieJbZpUbzylk5VyPHeSe7Pq6d oEnam9oXauOPcKdXrXXCzIHJZIUW/yI60AtTVZs8vpFmw7Ut472ldxF4EXxkNvKFm2V7 7dPRGDsXaB/Jbohgdl1NVpMSMp2RoqwXDNlyohTsto2Ip8iCofkCzjTZLL3ZqcIYpi6x 1iMFrgr4lOkcGppSVNAUOrb6UnvxsQ/EYb0JXP9f2Rsahgp1BsS16eEfix6qAGhyAdyf TtZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=pDL9jYYG; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o6-20020a170906974600b0072a51fa07a2si18324881ejy.296.2022.07.12.12.55.29; Tue, 12 Jul 2022 12:56:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=pDL9jYYG; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S235123AbiGLTyp (ORCPT + 99 others); Tue, 12 Jul 2022 15:54:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235057AbiGLTyZ (ORCPT ); Tue, 12 Jul 2022 15:54:25 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D16EE2DFD for ; Tue, 12 Jul 2022 12:52:57 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id r9so7699390lfp.10 for ; Tue, 12 Jul 2022 12:52:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yROFK4jI4+6AV7RIHB+FYCReHAB+j1nghwp6t7Uhvus=; b=pDL9jYYGn+srzQlaYSDgtdRGp/DCDPo9EB9lS14Xvv0kTtmHSn8DPGjURxtxwkb57D olQTpBnA9nL291pMP887YWPqc0mk1RYz22K/yAqZGh0gcmHf3qd/ulMf1gf6jsbT5yn7 HMgo0IBEQ62LGGHfMmeIkPWYpCFz89sYh36LDo8lY0rbZ1veqa2JdapTYfkBZSsYiddO HlLXlroV0K4pkwFQexE7UcuOJqw/GHxlAaF/vRunarG3r0t5CRale53X+/UD0rfxJOpL zdfckKfSY93AuYoUz4rcrecbiDm0lXm+GJV6HCnXEd/Sro1/FA6ylbd1eAu4Df64HVs0 bPqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yROFK4jI4+6AV7RIHB+FYCReHAB+j1nghwp6t7Uhvus=; b=KsgX+dCf8iTX0bxirVutLv1RwFpekPho2novBJxeEJoo246mHdPpJp91odl2L8q0IT /90CghQ2+ER7FecNMQExWdtedUm9KDBuOIagcuwdOjczR6STWkOx6vIWXs+j0/3q2HYa CsXn3BdZUeoSuRrG0bhjjjv07rmJCAK98FVNGQizVK0E8kbxLVeur3+zijaUIPeNDO4l xZCBIgcd3ENl65UQekeWxKy6UNXXD81LBXYgWSQXuT05an2LC5p2826RjBgYM4DKJOyO IvHYU0sMGEyLaRxk4KPq8AEClWGiz3mwo1rAknULX/WQ/FL0IZkUl1nZm440maA1FB+z NL7g== X-Gm-Message-State: AJIora/XOGRNXmO3sgaH9LKFToHKzPE7/IStQTMZmvF1kKR2WJe7YV3Z a51Wtg0q1ogUMv+haeTK2/w4r3JW8zWSr9AVFjR15YD1 X-Received: by 2002:a05:6512:2621:b0:47f:d228:bdeb with SMTP id bt33-20020a056512262100b0047fd228bdebmr15355508lfb.121.1657655576033; Tue, 12 Jul 2022 12:52:56 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Luiz Augusto von Dentz Date: Tue, 12 Jul 2022 12:52:44 -0700 Message-ID: Subject: Re: How does bluetoothctl work from the command line with gatt? To: John Klug Cc: Linux-Bluetooth MailingList Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi John, On Tue, Jul 12, 2022 at 11:56 AM John Klug wrote: > > >You will probably need to wait for the daemon to resolve the services > >which will then export the attributes as D-Bus objects that can be > > >accessed by bluetoothctl, > > How long would one have to wait? The following was typed manually from the command line: > > >> # bluetoothctl gatt.select-attribute f000aa22-0451-4000-b000-000000000000 > > >> # bluetoothctl gatt.acquire-write > > >> No attribute selected > > >> # bluetoothctl gatt.write 0x01 > > >> No attribute selected > > I had no idea whether the above is the correct syntax or not. I merely guessed, since the procedure does not appear to be documented. I think the problem is that you are issuing the select-attribute and then exiting, instead you will need to enter all the commands at the same time otherwise the next time you call bluetoothctl it doesn't have any attribute selected. > > > > > > John Klug > > > > -- Luiz Augusto von Dentz